条码规则管理

微服条码解析
yun-zuoyi
yunhao.wang 6 years ago
parent 85d3463348
commit 307f07e7ed

@ -0,0 +1,52 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : yunhao
* @CreateDate : 2019-03-12 14:45
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="SYS_BARCODE_RULE")
@Api(value="条码规则",description = "条码规则")
public class SysBarcodeRule extends BaseBean {
@Column(name = "NAME")
@ApiParam(value = "规则名称")
private String name;
@Column(name = "BARCODE_RULE_CODE")
@ApiParam(value = "规则代码")
private String barcodeRuleCode;
@Column(name = "BARCODE_RULE")
@ApiParam(value = "条码规则")
private String barcodeRule;
@Column(name = "BARCODE_SEPARATOR")
@ApiParam(value = "条码分隔符")
private String barcodeSeparator;
@Column(name="BARCODE_RULE_DESCRIPTION")
@ApiParam(value ="条码规则描述")
private String barcodeRuleDescription;
}

@ -41,7 +41,7 @@ public class SysOrderNoRule extends BaseBean {
@ApiParam(value = "规则代码")
private String orderNoRuleCode;
@Column(name = "numberRule")
@Column(name = "ORDER_NO_RULE")
@ApiParam(value = "单号规则")
private String orderNoRule;

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.platform.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.platform.bean.SysBarcodeRule;
/**
* @Description :
* @Reference :
* @Author : yunhao
* @CreateDate : 2019-03-12 16:02
* @Modify:
**/
public interface SysBarcodeRuleRepository extends BaseRepository<SysBarcodeRule, Long> {
}

@ -635,4 +635,34 @@ public class CoreHqlPack {
return result.toString();
}
/**
*
* @param sysBarcodeRule
* @return
*/
public static String packHqlSysBarcodeRuleCode(SysBarcodeRule sysBarcodeRule){
StringBuffer result = new StringBuffer();
// and
HqlPack.getStringEqualPack(sysBarcodeRule.getBarcodeRuleCode(),"barcodeRuleCode",result);
// not
HqlPack.getNumNOEqualPack(sysBarcodeRule.getId(),"id",result);
return result.toString();
}
/**
*
* @param sysBarcodeRule
* @return
*/
public static String packHqlSysBarcodeRule(SysBarcodeRule sysBarcodeRule){
StringBuffer result = new StringBuffer();
HqlPack.getStringLikerPack(sysBarcodeRule.getName(),"name",result);
HqlPack.getStringLikerPack(sysBarcodeRule.getBarcodeRuleCode(),"barcodeRuleCode",result);
return result.toString();
}
}
Loading…
Cancel
Save