add export function

yun-zuoyi
钮海涛 4 years ago
parent 52644c1deb
commit f31071afc6

@ -31,6 +31,22 @@ import java.util.List;
public class ImportDetail extends BaseAPS {
private static final long serialVersionUID = 1264030397500660450L;
@Column(name="group_Name")
@ApiParam(value ="组名称")
@FieldAnnotation(notEmpty = true)
private String groupName;
@Column(name="LINK_TYPE")
@ApiParam(value ="链接类型")
@FieldAnnotation(defaultValue = "EXCEL")
private ApsEnumUtil.DATA_LINK_TYPE linkType;
@Column(name="PATH")
@ApiParam(value ="IP/文件路径")
@FieldAnnotation(notEmpty = true)
private String path;
@Column(name="OUT_NAME")
@ApiParam(value ="外部表名")
private String outName;
@ -39,6 +55,22 @@ public class ImportDetail extends BaseAPS {
@ApiParam(value ="内部表名")
private String inName;
@Column(name="PORT")
@ApiParam(value ="端口")
private Integer port;
@Column(name="DB_NAME")
@ApiParam(value ="数据库名")
private String dbName;
@Column(name="USER_NAME")
@ApiParam(value ="用户名")
private String userName;
@Column(name="PASSWORD")
@ApiParam(value ="密码")
private String password;
@Column(name="IMPORT_TYPE")
@ApiParam(value ="导入类型")
@FieldAnnotation(defaultValue = "REPLACE")

@ -34,6 +34,10 @@ public class ImportField extends BaseAPS {
@ApiParam("字段名")
private String fieldName;
@Column(name="LABEL_NAME")
@ApiParam("标签名称")
private String labelName;
@Column(name="DEFAULT_VALUE")
@ApiParam("默认值")
private String defaultValue;
@ -58,19 +62,19 @@ public class ImportField extends BaseAPS {
private String relationField;
@Transient
private boolean hasDeal = false;
private transient boolean hasDeal = false;
@Column(name="DETAIL_ID")
@Column(name="IMPORT_DETAIL_ID")
@ApiParam(value ="导入明细ID")
@FieldAnnotation(relation = "ImportDetail")
private Long detailId;
@FieldAnnotation(relation = "ImportDetail", notEmpty = true)
private Long importDetailId;
public ImportDetail getDetail() {
return BeanRelation.get(this, EImportField.Detail);
public ImportDetail getImportDetail() {
return BeanRelation.get(this, EImportField.ImportDetail);
}
public void setDetail(ImportDetail detail) {
this.detailId = detail != null ? detail.getId() : 0l;
BeanRelation.set(this, EImportField.Detail, detail);
public void setImportDetail(ImportDetail detail) {
this.importDetailId = detail != null ? detail.getId() : 0l;
BeanRelation.set(this, EImportField.ImportDetail, detail);
}
}

@ -12,6 +12,7 @@ import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
* @Description :
@ -45,6 +46,22 @@ public class Inventory extends BaseOrder {
@FieldAnnotation(modify = false)
private Double excessCount;
@Column(name="SINGLE_SUPPLY_COUNT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="单次补充数量")
private Double singleSupplyCount;
@Column(name="SAFE_COUNT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="安全库存数量")
private Double safeCount;
@Column(name="SUPPLY_INTERVAL")
@ApiParam(value ="补充间隔(天)")
private Integer supplyInterval;
@Column(name="LAST_SUPPLY")
@ApiParam(value ="最后补充时间")
private Date lastSupply;
@JsonIgnore
public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works);

@ -37,6 +37,14 @@ public class MatCalcRule extends BaseRule {
@ApiParam(value ="输出筛选")
private String outputFilter;
@Column(name="INPUT_MATCH")
@ApiParam(value ="输入匹配")
private String inputMatch;
@Column(name="OUTPUT_MATCH")
@ApiParam(value ="输出匹配")
private String outputMatch;
@Column(name="DEL_AUTO")
@ApiParam(value ="自动删除补充订单")
@FieldAnnotation(defaultValue = "1")

@ -0,0 +1,33 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.Api;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2021-02-23
* @Modify:
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_SAFE_STOCK_ORDER")
@Api("安全库存订单")
public class SafeStockOrder extends BaseOrder {
private static final long serialVersionUID = 5944067344390531794L;
@JsonIgnore
public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works);
}
}

@ -44,4 +44,18 @@ public abstract class BaseAPS extends BaseBean {
public void setCustomField(String code, Object value) {
customFields.put(code, value);
}
public Integer getCustomInteger(String code) {
Object value = customFields.get(code);
if (value == null) {
return null;
}
if (value.getClass() == String.class) {
return Integer.valueOf((String) value);
} else if(value.getClass() == Integer.class) {
return (Integer)value;
}
return null;
}
}

@ -1,5 +1,5 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EImportField {
Detail
ImportDetail
}

@ -0,0 +1,21 @@
package cn.estsh.i3plus.pojo.aps.model;
import io.swagger.annotations.Api;
import lombok.Data;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2020-02-25
* @Modify:
**/
@Data
@Api("表格导出查询参数")
public class ExportModelRequest {
private String filter;
private List<APSPager.SortData> sorts;
private String tableName;
}

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

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="ImportDetail">
<Relation field="Fields" name="ImportField" reverse="Detail" type="ONE_TO_MULTI" owner="true">
<Relation field="Fields" name="ImportField" reverse="ImportDetail" type="ONE_TO_MULTI" owner="true">
</Relation>
</Class>
Loading…
Cancel
Save