去除事务sop

yun-zuoyi
钮海涛 4 years ago
parent 919db8451e
commit a63334c5a1

@ -15,4 +15,6 @@ import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface ExcludeImportExport {
boolean excludeImport() default true;
boolean excludeExport() default true;
}

@ -8,6 +8,7 @@ import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import com.fasterxml.jackson.annotation.JsonBackReference;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
@ -93,6 +94,11 @@ public class BaseOrder extends BaseAPS {
@ApiParam(value ="专料号")
private String specifyMaterialNum;
@Column(name="VALID_ORDER")
@ApiParam(value ="有效订单")
@FieldAnnotation(modify = false)
private Integer validOrder = CommonEnumUtil.VALID;
@JsonBackReference
public List<Work> getWorks() {
return BeanRelation.list(this, EBaseOrder.Works);

@ -61,6 +61,7 @@ public class ImportDetail extends BaseAPS {
@Column(name="IN_NAME")
@ApiParam(value ="内部表名")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.QUERY_LIST, notEmpty = true)
private String inName;
@Column(name="PORT")

@ -0,0 +1,60 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import cn.estsh.i3plus.pojo.aps.holders.EInsertedOrder;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import com.fasterxml.jackson.annotation.JsonIgnore;
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-03-02
* @Modify:
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_INSERTED_ORDER")
@Api("插单管理")
public class InsertedOrder extends BaseOrder {
private static final long serialVersionUID = -5036380772996107234L;
@Column(name="ORDER_STATUS")
@ApiParam(value ="订单状态")
@FieldAnnotation(defaultValue = "UNCOMMIT")
private ApsEnumUtil.INSERTED_ORDER_STATUS orderStatus;
@Column(name="STAND_OPERATIONS")
@ApiParam("工序")
private String standOperations;
@Column(name="PRODUCT_ROUTING_ID")
@ApiParam(value ="工艺路线")
@FieldAnnotation(property = false)
private Long productRoutingId;
public ProductRouting getProductRouting() {
return BeanRelation.get(this, EInsertedOrder.ProductRouting);
}
public void setProductRouting(ProductRouting routing) {
this.productRoutingId = routing != null ? routing.getId() : 0l;
BeanRelation.set(this, EInsertedOrder.ProductRouting, routing);
}
@JsonIgnore
public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works);
}
}

@ -3,6 +3,8 @@ package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import cn.estsh.i3plus.pojo.aps.holders.EInventory;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
@ -13,6 +15,7 @@ import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;
/**
* @Description :
@ -66,4 +69,7 @@ public class Inventory extends BaseOrder {
public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works);
}
@JsonBackReference
public List<SafeStockOrder> getSafeStockOrders() { return BeanRelation.list(this, EInventory.SafeStockOrders); }
}

@ -28,6 +28,7 @@ import java.util.Date;
@Table(name = "APS_MATERIAL_DELIVERY_PROMISE")
@Api("物料交期承诺")
public class MaterialDeliveryPromise extends BaseBean {
private static final long serialVersionUID = 831759543772896829L;
@Column(name="QTY")
@ApiParam(value ="到货数量")
private Double count;

@ -1,12 +1,16 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import cn.estsh.i3plus.pojo.aps.holders.ESafeStockOrder;
import com.fasterxml.jackson.annotation.JsonIgnore;
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;
@ -30,4 +34,16 @@ public class SafeStockOrder extends BaseOrder {
public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works);
}
@Column(name="INVENTORY_ID")
@ApiParam(value ="库存")
@FieldAnnotation(relation = "Inventory", notEmpty = true)
private Long inventoryId;
public Inventory getInventory() { return BeanRelation.get(this, ESafeStockOrder.Inventory); }
public void setInventory(Inventory inventory) {
this.inventoryId = inventory != null ? inventory.getId() : 0;
BeanRelation.set(this, ESafeStockOrder.Inventory, inventory);
}
}

@ -56,6 +56,11 @@ public class SalesOrder extends BaseOrder {
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.DURATION)
private String allowDelayTime;
@Column(name="ORDER_STATUS")
@ApiParam(value ="订单状态")
@FieldAnnotation(defaultValue = "WAITING")
private ApsEnumUtil.SALES_ORDER_STATUS orderStatus;
@JsonIgnore
public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works);

@ -45,6 +45,14 @@ public abstract class BaseAPS extends BaseBean {
customFields.put(code, value);
}
public String getCustomString(String code) {
Object value = customFields.get(code);
if (value == null) {
return "";
}
return value.toString();
}
public Integer getCustomInteger(String code) {
Object value = customFields.get(code);
if (value == null) {

@ -0,0 +1,5 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EInsertedOrder {
ProductRouting
}

@ -0,0 +1,5 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EInventory {
SafeStockOrders
}

@ -0,0 +1,5 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum ESafeStockOrder {
Inventory
}

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

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="InsertedOrder" extends="BaseOrder">
<Relation field="ProductRouting" name="ProductRouting" type="ONE_TO_ONE" owner="true">
</Relation>
</Class>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="Inventory" extends="BaseOrder">
<Relation field="SafeStockOrders" name="SafeStockOrder" reverse="Inventory" type="ONE_TO_MULTI" owner="true">
</Relation>
</Class>

@ -999,7 +999,8 @@ public class ApsEnumUtil {
STRING("STRING", "字符串,文本框编辑"),
OBJECT("OBJECT", "关联对象下来选择关联对象的Code值"),
LIST("LIST", "对象集合,不可编辑。"),
MULTI_OBJECT("MULTI_OBJECT", "多选对象,弹出框选择,可以选择全部对象,以*表示选择全部");
MULTI_OBJECT("MULTI_OBJECT", "多选对象,弹出框选择,可以选择全部对象,以*表示选择全部"),
QUERY_LIST("QUERY_LIST", "通过接口获取下拉选项");
private String value;
private String description;
@ -1116,4 +1117,55 @@ public class ApsEnumUtil {
return description;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SALES_ORDER_STATUS {
WAITING("WAITING", "待处理"),
CHANGE("CHANGE", "改带"),
COMMIT("COMMIT", "确认");
private String value;
private String description;
SALES_ORDER_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)
public enum INSERTED_ORDER_STATUS {
UNCOMMIT("UNCOMMIT", "未提交"),
COMMIT("COMMIT", "提交");
private String value;
private String description;
INSERTED_ORDER_STATUS(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
}

Loading…
Cancel
Save