yun-zuoyi
luweihao 6 years ago
commit a094473333

@ -34,21 +34,24 @@ public class OperInput extends BaseAPS {
@FieldAnnotation(relation = "Operation", notEmpty = true, display = false) @FieldAnnotation(relation = "Operation", notEmpty = true, display = false)
private Long operationId; private Long operationId;
@Column(name="MATERIAL_ID") @Column(name="INPUT_MATERIAL_ID")
@ApiParam(value ="物料") @ApiParam(value ="物料")
@FieldAnnotation(relation = "Material", notEmpty = true) @FieldAnnotation(relation = "InputMaterial", notEmpty = true)
private Long materialId; private Long inputMaterialId;
@Column(name="INPUT_COUNT", columnDefinition = "decimal(18,8)") @Column(name="INPUT_COUNT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="单位输入量") @ApiParam(value ="单位输入量")
@FieldAnnotation(defaultValue = "1.0")
private Double inputCount; private Double inputCount;
@Column(name="YIELD", columnDefinition = "decimal(18,8)") @Column(name="YIELD", columnDefinition = "decimal(18,8)")
@ApiParam(value ="成品率") @ApiParam(value ="成品率")
@FieldAnnotation(defaultValue = "1.0")
private Double yield; private Double yield;
@Column(name="FIX_SCRAP_COUNT", columnDefinition = "decimal(18,8)") @Column(name="FIX_SCRAP_COUNT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="固定报废数") @ApiParam(value ="固定报废数")
@FieldAnnotation(defaultValue = "0.0")
private Double fixScrapCount; private Double fixScrapCount;
@Column(name="CONS_TYPE") @Column(name="CONS_TYPE")
@ -73,13 +76,13 @@ public class OperInput extends BaseAPS {
BeanRelation.set(this, EOperInput.Operation, oper); BeanRelation.set(this, EOperInput.Operation, oper);
} }
public Material getMaterial() { public Material getInputMaterial() {
return BeanRelation.get(this, EOperInput.Material); return BeanRelation.get(this, EOperInput.InputMaterial);
} }
public void setMaterial(Material material) { public void setInputMaterial(Material material) {
this.materialId = material != null ? material.getId() : 0l; this.inputMaterialId = material != null ? material.getId() : 0l;
BeanRelation.set(this, EOperInput.Material, material); BeanRelation.set(this, EOperInput.InputMaterial, material);
} }
@JsonBackReference @JsonBackReference

@ -33,21 +33,24 @@ public class OperOutput extends BaseAPS {
@FieldAnnotation(relation = "Operation", notEmpty = true, display = false) @FieldAnnotation(relation = "Operation", notEmpty = true, display = false)
private Long operationId; private Long operationId;
@Column(name="MATERIAL_ID") @Column(name="OUTPUT_MATERIAL_ID")
@ApiParam(value ="物料") @ApiParam(value ="物料")
@FieldAnnotation(relation = "Material", notEmpty = true) @FieldAnnotation(relation = "Material", notEmpty = true)
private Long materialId; private Long outputMaterialId;
@Column(name="OUTPUT_COUNT", columnDefinition = "decimal(18,8)") @Column(name="OUTPUT_COUNT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="单位输出量") @ApiParam(value ="单位输出量")
@FieldAnnotation(defaultValue = "1.0")
private Double outputCount; private Double outputCount;
@Column(name="YIELD", columnDefinition = "decimal(18,8)") @Column(name="YIELD", columnDefinition = "decimal(18,8)")
@ApiParam(value ="成品率") @ApiParam(value ="成品率")
@FieldAnnotation(defaultValue = "1.0")
private Double yield; private Double yield;
@Column(name="FIX_SCRAP_COUNT", columnDefinition = "decimal(18,8)") @Column(name="FIX_SCRAP_COUNT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="固定报废数") @ApiParam(value ="固定报废数")
@FieldAnnotation(defaultValue = "0.0")
private Double fixScrapCount; private Double fixScrapCount;
public Operation getOperation() { public Operation getOperation() {
@ -59,13 +62,13 @@ public class OperOutput extends BaseAPS {
BeanRelation.set(this, EOperOutput.Operation, oper); BeanRelation.set(this, EOperOutput.Operation, oper);
} }
public Material getMaterial() { public Material getOutputMaterial() {
return BeanRelation.get(this, EOperOutput.Material); return BeanRelation.get(this, EOperOutput.OutputMaterial);
} }
public void setMaterial(Material material) { public void setOutputMaterial(Material material) {
this.materialId = material != null ? material.getId() : 0l; this.outputMaterialId = material != null ? material.getId() : 0l;
BeanRelation.set(this, EOperOutput.Material, material); BeanRelation.set(this, EOperOutput.OutputMaterial, material);
} }
@JsonBackReference @JsonBackReference

@ -4,6 +4,7 @@ import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation; import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EProductOrder; import cn.estsh.i3plus.pojo.aps.holders.EProductOrder;
import cn.estsh.i3plus.pojo.aps.holders.EProductRouting; import cn.estsh.i3plus.pojo.aps.holders.EProductRouting;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonBackReference;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
@ -51,6 +52,7 @@ public class ProductOrder extends BaseOrder {
@Column(name="SPECIFY_ROUTING") @Column(name="SPECIFY_ROUTING")
@ApiParam(value ="指定工艺路线") @ApiParam(value ="指定工艺路线")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.OBJECT, typeName = "ProductRouting")
private String specifyRouting; private String specifyRouting;
@Column(name="RECALC_COUNT") @Column(name="RECALC_COUNT")

@ -211,7 +211,12 @@ public class BeanInfo {
} }
public static Set<Class<? extends BaseBean>> getBeanClasses() { public static Set<Class<? extends BaseBean>> getBeanClasses() {
return beanInfos.keySet(); Set<Class<? extends BaseBean>> beanClasses = new HashSet<>();
for (Map.Entry<Class<? extends BaseBean>, BeanInfo> entry : beanInfos.entrySet()) {
beanClasses.add(entry.getKey());
}
return beanClasses;
} }
public static BeanInfo getBeanInfo(Class<? extends BaseBean> cls) { public static BeanInfo getBeanInfo(Class<? extends BaseBean> cls) {
@ -234,9 +239,9 @@ public class BeanInfo {
public static List<Class<? extends BaseBean>> getChildClasses(Class<? extends BaseBean> cls) { public static List<Class<? extends BaseBean>> getChildClasses(Class<? extends BaseBean> cls) {
List<Class<? extends BaseBean>> beanClasses = new ArrayList<>(); List<Class<? extends BaseBean>> beanClasses = new ArrayList<>();
List<BeanInfo> beanInfos = getBeanInfo(cls).childsBeanInfos; List<BeanInfo> childBeanInfos = getBeanInfo(cls).childsBeanInfos;
for (BeanInfo beanInfo : beanInfos) { for (BeanInfo childBeanInfo : childBeanInfos) {
beanClasses.add(beanInfo.getBeanClass()); beanClasses.add(childBeanInfo.getBeanClass());
} }
return beanClasses; return beanClasses;
} }

@ -2,6 +2,6 @@ package cn.estsh.i3plus.pojo.aps.holders;
public enum EOperInput { public enum EOperInput {
Operation, Operation,
Material, InputMaterial,
WorkInputs WorkInputs
} }

@ -2,6 +2,6 @@ package cn.estsh.i3plus.pojo.aps.holders;
public enum EOperOutput { public enum EOperOutput {
Operation, Operation,
Material, OutputMaterial,
WorkOutputs WorkOutputs
} }

@ -40,4 +40,5 @@ public class APSPager extends Pager {
} }
private String filter; private String filter;
private List<SortData> sorts; private List<SortData> sorts;
private String query;
} }

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Class name="OperInput"> <Class name="OperInput">
<Relation field="Material" name="Material" reverse="OperInputs" type="MULTI_TO_ONE" owner="false"> <Relation field="InputMaterial" name="Material" reverse="OperInputs" type="MULTI_TO_ONE" owner="false">
</Relation> </Relation>
</Class> </Class>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Class name="OperOutput"> <Class name="OperOutput">
<Relation field="Material" name="Material" reverse="OperOutputs" type="MULTI_TO_ONE" owner="false"> <Relation field="OutputMaterial" name="Material" reverse="OperOutputs" type="MULTI_TO_ONE" owner="false">
</Relation> </Relation>
</Class> </Class>

@ -333,7 +333,7 @@ public class ApsEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum RESOURCE_LOCK_TYPE { public enum RESOURCE_LOCK_TYPE {
NONE("NONE", "不锁定"), // NONE("NONE", "不锁定"),
PRODUCE_BEGIN("PRODUCE_BEGIN", "后工序生产开始时刻"), PRODUCE_BEGIN("PRODUCE_BEGIN", "后工序生产开始时刻"),
PRODUCE_END("PRODUCE_END", "后工序生产结束时刻"); PRODUCE_END("PRODUCE_END", "后工序生产结束时刻");

@ -174,6 +174,7 @@ public class WmsEnumUtil {
return tmp; return tmp;
} }
} }
/** /**
* *
*/ */
@ -1470,6 +1471,7 @@ public class WmsEnumUtil {
return valueOf(val); return valueOf(val);
} }
} }
/** /**
* :10=,20=,30= * :10=,20=,30=
*/ */
@ -2936,64 +2938,56 @@ public class WmsEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum IMPORT_ORDER_TYPE { public enum IMPORT_ORDER_TYPE {
PO("PO", "要货计划"), PO("1", "PO", "要货计划"),
ASN("ASN", "ASN"), ASN("2", "ASN", "ASN"),
INSTRUCTIONS("INSTRUCTIONS", "指令"), INSTRUCTIONS("3", "INSTRUCTIONS", "指令"),
SCATTERED_OUT("C00", "零星出库指令"), SCATTERED_OUT("C00", "C00", "零星出库指令"),
SCATTERED_INT("C01", "零星入指令"), SCATTERED_INT("C01", "C01", "零星入指令"),
NC_DISMANTLING_PICKING("C02", "NC拆解领料"), NC_DISMANTLING_PICKING("C02", "C02", "NC拆解领料"),
NC_DISMANTLING_RETURN("C03", "NC拆解退料"), NC_DISMANTLING_RETURN("C03", "C03", "NC拆解退料"),
NC_SCRAPPED("C04", "NC报废指令"), NC_SCRAPPED("C04", "C04", "NC报废指令"),
NOT_JIS("NOTJIS", "非JIS指令"), NOT_JIS("NOTJIS", "NOTJIS", "非JIS指令"),
STOCK_DUMP("D00", "库存转储指令"), STOCK_DUMP("D00", "D00", "库存转储指令"),
NC_INSTOCK("D01", "NC入库指令"), NC_INSTOCK("D01", "D01", "NC入库指令"),
SMRR("B00", "SMRR退货"), SMRR("B00", "B00", "SMRR退货"),
DMR("B01", "DMR退货"), DMR("B01", "B01", "DMR退货"),
OUT_SOURCING("A00", "委外发料指令"), OUT_SOURCING("A00", "A00", "委外发料指令"),
OUT_REBACK("A01", "委外退料指令"), OUT_REBACK("A01", "A01", "委外退料指令"),
OUT_RETURN_SOURCING("A02", "委外返工发料指令"), OUT_RETURN_SOURCING("A02", "A02", "委外返工发料指令"),
OUT_RETURN_("A03", "委外返工退料指令"), OUT_RETURN_("A03", "A03", "委外返工退料指令"),
SALES_RETURN_REBACK("SALES_RETURN", "销售退货指令"), SALES_RETURN_REBACK("SALES_RETURN", "SALES_RETURN", "销售退货指令"),
CS("CS", "盘点指令"), CS("CS", "CS", "盘点指令"),
CS_ADUJUST("CS_ADUJUST", "盘点调差指令"); CS_ADUJUST("CS_ADUJUST", "CS_ADUJUST", "盘点调差指令");
private String value; private String value;
private String code;
private String description; private String description;
IMPORT_ORDER_TYPE(String value, String description) { IMPORT_ORDER_TYPE(String value, String code, String description) {
this.value = value; this.value = value;
this.code = code;
this.description = description; this.description = description;
} }
public String getDescription() { public String getValue() {
return description; return value;
} }
public String getCode() { public String getCode() {
return value; return code;
} }
public String getValue() { public String getDescription() {
return value; return description;
} }
public static IMPORT_ORDER_TYPE codeOf(String value) { public static IMPORT_ORDER_TYPE codeOf(String code) {
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(value)) { if (values()[i].code.equals(code)) {
return values()[i]; return values()[i];
} }
} }
return null; return null;
} }
public static String getDes(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
} }
/** /**
@ -3083,7 +3077,6 @@ public class WmsEnumUtil {
} }
/** /**
* *
*/ */

@ -2,6 +2,7 @@ package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsConfig; import cn.estsh.i3plus.pojo.wms.bean.WmsConfig;
import org.springframework.stereotype.Repository;
/** /**
* @Description : * @Description :
@ -10,6 +11,7 @@ import cn.estsh.i3plus.pojo.wms.bean.WmsConfig;
* @CreateDate : 2019-03-07 10:00 * @CreateDate : 2019-03-07 10:00
* @Modify: * @Modify:
**/ **/
@Repository
public interface WmsConfigRepository extends BaseRepository<WmsConfig, Long> { public interface WmsConfigRepository extends BaseRepository<WmsConfig, Long> {
/** /**

Loading…
Cancel
Save