Merge pull request 'test' (#299) from dominic.xiao/i3plus-pojo:test into test

Reviewed-on: http://git.estsh.com/i3-IMPP/i3plus-pojo/pulls/299
yun-zuoyi
聂帅 4 years ago
commit 98706bcc20

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

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

@ -26,4 +26,8 @@ public class CancelPlanRule extends BaseRule {
@Column(name="WORK_FILTERS")
@ApiParam(value ="工作筛选")
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.InsertGroup;
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.ApiParam;
import lombok.Data;
@ -46,4 +47,9 @@ public class DayShift extends BaseAPS {
@FieldAnnotation(notEmpty = true)
@ShiftTimeAnnotation(groups = {InsertGroup.class, UpdateGroup.class, ImportGroup.class})
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 ="最小加工批量")
private Integer minProductBatch;
@Column(name="FIX_PLAN")
@ApiParam(value ="固定组炉的计划")
private Boolean fixPlan;
@JsonBackReference
public List<WorkPlan> getWorkPlans() { return BeanRelation.list(this, EFurnacePlan.WorkPlans); }
}

@ -31,6 +31,11 @@ public class HeuristicOptimize extends BaseRule {
@ApiParam(value ="工作筛选")
private String workFilter;
@Lob
@Column(name="WORK_SORT")
@ApiParam(value ="工作排序")
private String workSort;
@Column(name="RES_FILTER")
@ApiParam(value ="资源筛选")
private String resFilter;
@ -40,7 +45,19 @@ public class HeuristicOptimize extends BaseRule {
@ApiParam(value ="资源选择")
private String resSelect;
@Column(name="WAITING_TIME")
@ApiParam(value ="最大等待时间")
private String waitingTime;
@Column(name="OPTIMIZE_INTERVAL")
@ApiParam(value ="优化间隔")
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 ="组炉区间")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.DURATION)
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 ="完工数")
private Double finishCount;
@Column(name="QUALIFIED_COUNT")
@ApiParam(value ="检验合格数量")
private Double qualifiedCount;
@Column(name="REMARK")
@ApiParam(value ="备注")
private String remark;

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

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

@ -34,6 +34,10 @@ public class OrderFeedback extends BaseAPS {
@FieldAnnotation(relation = "Order", modify = false)
private Long orderId;
@Column(name="ORDER_COUNT")
@ApiParam(value ="订单数量")
private Double orderCount;
@Column(name="DELIVER_RATE")
@ApiParam(value ="发货百分比")
private Double deliverRate;
@ -42,14 +46,6 @@ public class OrderFeedback extends BaseAPS {
@ApiParam(value ="成品合格百分比")
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")
@ApiParam(value ="不良数量")
private Double unqualifiedCount;

@ -83,11 +83,6 @@ public class ProductOrder extends BaseOrder {
@FieldAnnotation(modify = false)
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)")
@ApiParam(value ="缺少量")
@FieldAnnotation(modify = false)
@ -102,6 +97,10 @@ public class ProductOrder extends BaseOrder {
@ApiParam(value ="完工数")
private Double finishCount;
@Column(name="QUALIFIED_COUNT")
@ApiParam(value ="检验合格数量")
private Double qualifiedCount;
@Column(name="PRODUCT_ROUTING_ID")
@ApiParam(value ="工艺路线")
@FieldAnnotation(property = false)

@ -50,10 +50,10 @@ public class PurchaseOrder extends BaseOrder {
@FieldAnnotation(modify = false)
private String calcLeadTime;
@Column(name="EXCESS_COUNT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="多余量")
@FieldAnnotation(modify = false)
private Double excessCount;
// @Column(name="EXCESS_COUNT", columnDefinition = "decimal(18,8)")
// @ApiParam(value ="多余量")
// @FieldAnnotation(modify = false)
// private Double excessCount;
@Column(name="AUTO_SUPPLY")
@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.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;
/**
@ -127,6 +128,8 @@ public class Resource extends BaseAPS {
@Transient
private boolean hasConflict;
private transient Date rightLimit;
public WorkShop getWorkShop() { return BeanRelation.get(this, EResource.WorkShop); }
public void setWorkShop(WorkShop workShop) {

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

@ -61,14 +61,35 @@ public class SalesOrder extends BaseOrder {
@FieldAnnotation(defaultValue = "WAITING")
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")
@ApiParam(value ="发货百分比")
private Double deliverRate;
@Column(name="FINISH_COUNT")
@ApiParam(value ="完工数")
@FieldAnnotation(modify = false)
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
public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works);

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

@ -52,5 +52,21 @@ public class SysParam extends BaseAPS {
@Column(name="RECORD_RESULT")
@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)
private Long operationId;
@Column(name="ORIGIN_OPERATION_ID")
@ApiParam(value ="原始工序")
@FieldAnnotation(property = false)
private Long originOperationId;
@Column(name="PARENT_WORK_ID")
@ApiParam(value ="父工作")
@FieldAnnotation(property = false)
@ -166,13 +171,25 @@ public class Work extends BaseAPS {
@ApiParam(value ="动态拆分工作ID")
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 ="工作排序顺序")
private Integer workSeqNumber;
// 排程时,找插入位置的评估值
private transient double evaluateValue = 0;
private transient boolean supplyCount = false;
private transient boolean hasOptimized = false;
// 排程时确定工作是正向排程还是逆向排程。
private transient boolean positive = true;
public BaseOrder getOrder() {
return BeanRelation.get(this, EWork.Order);
@ -192,6 +209,15 @@ public class Work extends BaseAPS {
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() {
return BeanRelation.get(this, EWork.ParentWork);
}

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

@ -70,6 +70,20 @@ public abstract class BaseAPS extends BaseBean {
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) {
Object value = customFields.get(code);
if (value == null) {

@ -204,10 +204,17 @@ public class BeanRelation {
public static <T extends BaseBean> List<T> lastList(BaseBean bean, Enum<?>... holders) {
List<T> result = new ArrayList<>();
lastListImpl(result, bean, bean, holders, 0);
lastListImpl(result, bean, bean, null, holders, 0);
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) {
if (index >= holders.length) {
if (self == bean) {
@ -215,15 +222,18 @@ public class BeanRelation {
}
index = 0;
self = bean;
if (pred != null && pred.test((T)bean)) {
return true;
}
}
boolean bNotLast = true;
List<BaseBean> nextBeans = list(bean, holders[index]);
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);
bNotLast = false;
}
bNotLast = false;
}
return index == 0 && bNotLast;
}
@ -394,7 +404,6 @@ public class BeanRelation {
* @param index
* @param <T>
*/
@SuppressWarnings("unchecked")
private final static <T extends BaseBean> void recursionImpl(BaseBean bean, Predicate<T> fun,
Enum<?>[] holders, int index) {
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, // 前关联
PostRelations, // 后关联
Operation, // 工序
OriginOperation, // 原始工序
PlanFeedback, // 工作计划反馈
MainPlan, // 关联的为主资源的计划
WorkPlans, // 关联的工作计划

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

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

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

@ -1,14 +1,34 @@
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 java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Data
public class GanttOrderModel {
private Long id;
private String id;
private String code;
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<GanttLineModel> lineModels = new ArrayList<>();
}

@ -24,4 +24,5 @@ public class GanttPlanModel {
private Long workId;
private List<Long> resIds;
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 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) {
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 field="Operation" name="Operation" type="MULTI_TO_ONE" owner="false">
</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>
<Relation field="WorkPlans" name="WorkPlan" reverse="Work" type="ONE_TO_MULTI" owner="true">

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

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

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

@ -1862,8 +1862,8 @@ public class CommonEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_SOURCE_TYPE {
SOURCE_MARIA_DB(100, "MariaDB", "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_MARIA_DB(100, "SOURCE_MARIA_DB", "MariaDB 10.1", "com.mysql.jdbc.Driver", 3306, null),
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_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);

@ -1850,7 +1850,9 @@ public class WmsEnumUtil {
CLOSE(40, "已关闭"),
CANCEL(50, "已取消"),
REJECT(60, "全部退货"),
SPECIAL(70, "全部特采");
SPECIAL(70, "全部特采"),
SECOND_JUDGMENT(80, "二次判定"),
XUANBIE_JUDGMENT(90, "全部选别");
private int value;
private String description;
@ -1886,7 +1888,8 @@ public class WmsEnumUtil {
public enum QC_ITEM_STATUS {
NORMAL(10, "正常"),
CANCELLATION(20, "已处理"),
SPECIAL(30, "部分特采");
SPECIAL(30, "部分特采"),
XUANBIE(40, "选别");
private int value;
private String description;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>1.0.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<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.ApiParam;
import lombok.Data;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.*;
/**
* @Description :
@ -116,6 +111,10 @@ public class SwebPurchaseOrderSn extends BaseBean {
@Column(name = "IS_SYN")
private String isSyn;
@ApiParam("是否同步至WMS")
@Column(name = "IS_SYNC")
private Integer isSync = 2;
@Column(name = "REC_TIME")
@ApiParam(value = "收货时间")
private String recTime;

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

@ -241,4 +241,10 @@ public class WmsCSOrderDetails extends BaseBean {
this.partNo=partNo;
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
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name="WMS_FILE",
uniqueConstraints = {@UniqueConstraint(columnNames = {"FILE_NAME", "REF_SRC", "REF_TYPE"})})
@Table(name="WMS_FILE")
@Api("附件信息")
public class WmsFile extends BaseBean{

@ -309,6 +309,11 @@ public class WmsPart extends BaseBean {
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER, isRequire = 2)
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)")
@ApiParam(value = "标托", example = "1")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER, isRequire = 2)

@ -143,6 +143,21 @@ public class WmsStockSn extends BaseBean {
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
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")
@ApiParam(value = "单位")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
@ -240,6 +255,14 @@ public class WmsStockSn extends BaseBean {
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
private String ctNo;
@Column(name="WO_NO")
@ApiParam("ERP工单号")
public String woNo;
@Column(name = "SHIFT_CODE")
@ApiParam("班次代码")
private String shiftCode;
@ApiParam(value = "仓库名称")
@Transient
public String whNameRdd;
@ -624,6 +647,15 @@ public class WmsStockSn extends BaseBean {
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) {
this.snCount = snCount;
this.sumPartQty = sumPartQty;

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

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

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

@ -7,7 +7,7 @@ sonar.projectKey=i3plus.pojo:i3plus-pojo
sonar.projectName=i3plus-pojo
# 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 .
#sonar.sources=./

Loading…
Cancel
Save