Commit 8d8cd255 authored by 全洪江's avatar 全洪江

Merge branch 'dev' of http://git.local.topsunit.com/xinlu/topsun-bpm into dev

parents ae30ad6f cb3919d3
......@@ -11,19 +11,19 @@ function initializateUI() {
function loadCodeRuleListGrid() {
var toolbarOptions = UICtrl.getDefaultToolbarOptions({
addHandler: function(){
addHandler();
},
updateHandler: function(){
updateHandler();
}
// , getPurchaseCode:{id:'getPurchaseCode',text:'测试采购编号',img:'fa-link',click:function(){
// testGetNextCode('purchase');
// }}
// , getContractCode:{id:'getContractCode',text:'测试合同编号',img:'fa-link',click:function(){
// testGetNextCode('contract');
// }}
});
gridManager = UICtrl.grid("#productListGrid", {
columns: [
{ display: "产品名称", name: "productName", width: 140, minWidth: 60, type: "string", align: "left" },
{ display: "产品名称", name: "productName", width: 140, minWidth: 60, type: "string", align: "left", editor: {
type: 'text',
required: true
}},
{ display: "产品类别", name: "productCategoryId", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "产品状态", name: "productStatus", width: 120, minWidth: 60, type: "string", align: "left" },
{ display: "产品计量单位", name: "productUnit", width: 100, minWidth: 60, type: "string", align: "left" },
......@@ -36,6 +36,7 @@ function loadCodeRuleListGrid() {
pageSize: 20,
usePager: true,
toolbar: toolbarOptions,
enabledEdit: true,
width: "50%",
height: "100%",
heightDiff: -8,
......@@ -64,13 +65,14 @@ function updateHandler(data) {
}
var url=DataUtil.composeURLByParam('/product/forwardProductDetail.do',{ data: JSON.stringify(data) });
UICtrl.addTabItem({tabid:'viewFlowChart' + id, text:"产品信息",url:url});
// debugger;
// UICtrl.addTabItem({
// tabid: 'viewFlowChart' + id,
// text: "产品信息",
// url: web_app.name + '/bizFlowChart/showViewFlowchart.load?businessProcessId=' + id
// });
}
function addHandler() {
let data = {};
data.productId = 0;
var url=DataUtil.composeURLByParam('/product/forwardProductDetail.do',{ data: JSON.stringify(data) });
UICtrl.addTabItem({tabid:'viewFlowChart' + new Date().getTime(), text:"新增产品",url:url});
}
......@@ -19,6 +19,4 @@ public class AppConfig {
return new ObjectMapper();
}
@Bean
public Snowflake snowflake() { return new Snowflake(1); }
}
\ No newline at end of file
package com.huigou.topsun.config;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
/**
* JPAUtils 用于管理 JPA EntityManager 创建工厂
*
* @author qinzhenguan
* @createDate 2023/11/28 08:58
**/
public class JPAUtils {
public static EntityManagerFactory emf = createEntityManagerFactory();
private static EntityManagerFactory createEntityManagerFactory() {
EntityManagerFactory emf = Persistence.createEntityManagerFactory("mysql-jpa");
return emf;
}
public static EntityManager getEntityManger(){
EntityManager entityManager = emf.createEntityManager();
return entityManager;
}
}
\ No newline at end of file
package com.huigou.topsun.product.application;
import com.huigou.topsun.product.domain.Product;
import java.util.ArrayList;
......@@ -35,7 +36,7 @@ public interface ProductApplication {
/**
* description 对比所有对象,并保存更改的数据。
*
* @param rawMap 原数据
* @param newData 更新数据
* @return java.util.HashMap<java.lang.String, java.lang.Object>
* @author qinzhenguan
* @createDate 2023/12/8 17:19
......
......@@ -5,6 +5,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.huigou.cache.DictUtil;
import com.huigou.topsun.product.application.ProductApplication;
import com.huigou.topsun.product.domain.Product;
import com.huigou.uasp.annotation.ControllerMapping;
......@@ -13,6 +14,7 @@ import com.huigou.util.SDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
......@@ -64,9 +66,10 @@ public class ProductController extends CommonController {
public String forwardProductDetail() {
ObjectMapper objectMapper = new ObjectMapper();
SDO sdo = this.getSDO();
String str = sdo.getString("data");
HashMap<String, Object> param;
try {
param = objectMapper.readValue(sdo.getString("data"), new TypeReference<HashMap<String, Object>>() {});
param = objectMapper.readValue(str, new TypeReference<HashMap<String, Object>>() {});
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
......@@ -83,7 +86,10 @@ public class ProductController extends CommonController {
throw new RuntimeException(e);
}
Map<String, Object> resultMap = productService.queryDetailAll(product);
Map<String, Object> resultMap = new HashMap<>();
if(product.getProductId() != null) {
resultMap = productService.queryDetailAll(product);
}
return toResult(resultMap);
}
......
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;
import lombok.Data;
......@@ -10,7 +11,6 @@ import lombok.Data;
* @TableName brand
*/
@Table(name="brand")
@Data
@Entity
public class Brand implements Serializable {
/**
......@@ -18,7 +18,7 @@ public class Brand implements Serializable {
*/
@Id
@Column(name = "brand_id")
private Long brandId;
private BigDecimal brandId;
/**
* 品牌名称
......@@ -38,49 +38,35 @@ public class Brand implements Serializable {
@Column(name = "brand_remark")
private String brandRemark;
private static final long serialVersionUID = 1L;
public BigDecimal getBrandId() {
return brandId;
}
public void setBrandId(String brandId) {
this.brandId = (brandId != null) ? new BigDecimal(brandId) : null;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
public String getBrandName() {
return brandName;
}
if (that == null) {
return false;
public void setBrandName(String brandName) {
this.brandName = brandName;
}
if (getClass() != that.getClass()) {
return false;
public String getBrandCode() {
return brandCode;
}
Brand other = (Brand) that;
return (this.getBrandId() == null ? other.getBrandId() == null : this.getBrandId().equals(other.getBrandId()))
&& (this.getBrandName() == null ? other.getBrandName() == null : this.getBrandName().equals(other.getBrandName()))
&& (this.getBrandCode() == null ? other.getBrandCode() == null : this.getBrandCode().equals(other.getBrandCode()))
&& (this.getBrandRemark() == null ? other.getBrandRemark() == null : this.getBrandRemark().equals(other.getBrandRemark()));
public void setBrandCode(String brandCode) {
this.brandCode = brandCode;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getBrandId() == null) ? 0 : getBrandId().hashCode());
result = prime * result + ((getBrandName() == null) ? 0 : getBrandName().hashCode());
result = prime * result + ((getBrandCode() == null) ? 0 : getBrandCode().hashCode());
result = prime * result + ((getBrandRemark() == null) ? 0 : getBrandRemark().hashCode());
return result;
public String getBrandRemark() {
return brandRemark;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", brandId=").append(brandId);
sb.append(", brandName=").append(brandName);
sb.append(", brandCode=").append(brandCode);
sb.append(", brandRemark=").append(brandRemark);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
public void setBrandRemark(String brandRemark) {
this.brandRemark = brandRemark;
}
}
\ No newline at end of file
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;
import lombok.Data;
......@@ -10,7 +11,6 @@ import lombok.Data;
* @TableName color
*/
@Table(name="color")
@Data
@Entity
public class Color implements Serializable {
/**
......@@ -18,7 +18,7 @@ public class Color implements Serializable {
*/
@Id
@Column(name = "color_id")
private Long colorId;
private BigDecimal colorId;
/**
* 颜色名称
......@@ -38,49 +38,35 @@ public class Color implements Serializable {
@Column(name = "color_remark")
private String colorRemark;
private static final long serialVersionUID = 1L;
public BigDecimal getColorId() {
return colorId;
}
public void setColorId(String colorId) {
this.colorId = (colorId != null) ? new BigDecimal(colorId) : null;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
public String getColorName() {
return colorName;
}
if (that == null) {
return false;
public void setColorName(String colorName) {
this.colorName = colorName;
}
if (getClass() != that.getClass()) {
return false;
public String getColorCode() {
return colorCode;
}
Color other = (Color) that;
return (this.getColorId() == null ? other.getColorId() == null : this.getColorId().equals(other.getColorId()))
&& (this.getColorName() == null ? other.getColorName() == null : this.getColorName().equals(other.getColorName()))
&& (this.getColorCode() == null ? other.getColorCode() == null : this.getColorCode().equals(other.getColorCode()))
&& (this.getColorRemark() == null ? other.getColorRemark() == null : this.getColorRemark().equals(other.getColorRemark()));
public void setColorCode(String colorCode) {
this.colorCode = colorCode;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getColorId() == null) ? 0 : getColorId().hashCode());
result = prime * result + ((getColorName() == null) ? 0 : getColorName().hashCode());
result = prime * result + ((getColorCode() == null) ? 0 : getColorCode().hashCode());
result = prime * result + ((getColorRemark() == null) ? 0 : getColorRemark().hashCode());
return result;
public String getColorRemark() {
return colorRemark;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", colorId=").append(colorId);
sb.append(", colorName=").append(colorName);
sb.append(", colorCode=").append(colorCode);
sb.append(", colorRemark=").append(colorRemark);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
public void setColorRemark(String colorRemark) {
this.colorRemark = colorRemark;
}
}
\ No newline at end of file
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;
import lombok.Data;
......@@ -10,7 +11,6 @@ import lombok.Data;
* @TableName factory
*/
@Table(name="factory")
@Data
@Entity
public class Factory implements Serializable {
/**
......@@ -18,7 +18,7 @@ public class Factory implements Serializable {
*/
@Id
@Column(name = "factory_id")
private Long factoryId;
private BigDecimal factoryId;
/**
* 工厂名称
......@@ -32,46 +32,27 @@ public class Factory implements Serializable {
@Column(name = "factory_code")
private String factoryCode;
private static final long serialVersionUID = 1L;
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
public BigDecimal getFactoryId() {
return factoryId;
}
if (that == null) {
return false;
public void setFactoryId(String factoryId) {
this.factoryId = (factoryId != null) ? new BigDecimal(factoryId) : null;
}
if (getClass() != that.getClass()) {
return false;
public String getFactoryName() {
return factoryName;
}
Factory other = (Factory) that;
return (this.getFactoryId() == null ? other.getFactoryId() == null : this.getFactoryId().equals(other.getFactoryId()))
&& (this.getFactoryName() == null ? other.getFactoryName() == null : this.getFactoryName().equals(other.getFactoryName()))
&& (this.getFactoryCode() == null ? other.getFactoryCode() == null : this.getFactoryCode().equals(other.getFactoryCode()));
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getFactoryId() == null) ? 0 : getFactoryId().hashCode());
result = prime * result + ((getFactoryName() == null) ? 0 : getFactoryName().hashCode());
result = prime * result + ((getFactoryCode() == null) ? 0 : getFactoryCode().hashCode());
return result;
public String getFactoryCode() {
return factoryCode;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", factoryId=").append(factoryId);
sb.append(", factoryName=").append(factoryName);
sb.append(", factoryCode=").append(factoryCode);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
}
\ No newline at end of file
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;
import javax.persistence.*;
......@@ -22,7 +23,7 @@ public class Product implements Serializable {
*/
@Id
@Column(name = "product_id", nullable = false)
private Long productId;
private BigDecimal productId;
/**
* 产品名称
......@@ -34,7 +35,7 @@ public class Product implements Serializable {
* 产品类别
*/
@Column(name = "product_category_id", nullable = true)
private Long productCategoryId;
private BigDecimal productCategoryId;
/**
* 产品状态(码表status)
......@@ -170,12 +171,18 @@ public class Product implements Serializable {
.toString();
}
public Long getProductId() {
return this.productId;
public BigDecimal getProductId() { return productId; }
public void setProductId(String productId) {
this.productId = (productId != null) ? new BigDecimal(productId) : null;
}
public BigDecimal getProductCategoryId() {
return productCategoryId;
}
public void setProductId(Long productId) {
this.productId = productId;
public void setProductCategoryId(String productCategoryId) {
this.productCategoryId = (productCategoryId != null) ? new BigDecimal(productCategoryId) : null;
}
public String getProductName() {
......@@ -186,14 +193,6 @@ public class Product implements Serializable {
this.productName = productName;
}
public Long getProductCategoryId() {
return this.productCategoryId;
}
public void setProductCategoryId(Long productCategoryId) {
this.productCategoryId = productCategoryId;
}
public String getProductStatus() {
return this.productStatus;
}
......
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;
import lombok.Data;
......@@ -10,7 +11,6 @@ import lombok.Data;
* @TableName product_category
*/
@Table(name="product_category")
@Data
@Entity
public class ProductCategory implements Serializable {
/**
......@@ -18,7 +18,7 @@ public class ProductCategory implements Serializable {
*/
@Id
@Column(name = "product_category_id")
private Long productCategoryId;
private BigDecimal productCategoryId;
/**
* 产品类别名称
......@@ -38,49 +38,35 @@ public class ProductCategory implements Serializable {
@Column(name = "product_category_code")
private String productCategoryCode;
private static final long serialVersionUID = 1L;
public BigDecimal getProductCategoryId() {
return productCategoryId;
}
public void setProductCategoryId(String productCategoryId) {
this.productCategoryId = (productCategoryId != null) ? new BigDecimal(productCategoryId) : null;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
public String getProductCategoryName() {
return productCategoryName;
}
if (that == null) {
return false;
public void setProductCategoryName(String productCategoryName) {
this.productCategoryName = productCategoryName;
}
if (getClass() != that.getClass()) {
return false;
public String getProductCategoryStatus() {
return productCategoryStatus;
}
ProductCategory other = (ProductCategory) that;
return (this.getProductCategoryId() == null ? other.getProductCategoryId() == null : this.getProductCategoryId().equals(other.getProductCategoryId()))
&& (this.getProductCategoryName() == null ? other.getProductCategoryName() == null : this.getProductCategoryName().equals(other.getProductCategoryName()))
&& (this.getProductCategoryStatus() == null ? other.getProductCategoryStatus() == null : this.getProductCategoryStatus().equals(other.getProductCategoryStatus()))
&& (this.getProductCategoryCode() == null ? other.getProductCategoryCode() == null : this.getProductCategoryCode().equals(other.getProductCategoryCode()));
public void setProductCategoryStatus(String productCategoryStatus) {
this.productCategoryStatus = productCategoryStatus;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getProductCategoryId() == null) ? 0 : getProductCategoryId().hashCode());
result = prime * result + ((getProductCategoryName() == null) ? 0 : getProductCategoryName().hashCode());
result = prime * result + ((getProductCategoryStatus() == null) ? 0 : getProductCategoryStatus().hashCode());
result = prime * result + ((getProductCategoryCode() == null) ? 0 : getProductCategoryCode().hashCode());
return result;
public String getProductCategoryCode() {
return productCategoryCode;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", productCategoryId=").append(productCategoryId);
sb.append(", productCategoryName=").append(productCategoryName);
sb.append(", productCategoryStatus=").append(productCategoryStatus);
sb.append(", productCategoryCode=").append(productCategoryCode);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
public void setProductCategoryCode(String productCategoryCode) {
this.productCategoryCode = productCategoryCode;
}
}
\ No newline at end of file
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;
import javax.persistence.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
......@@ -12,7 +15,8 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
* @author Tison
* 产品详细信息
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonInclude(JsonInclude.Include.ALWAYS)
@JsonIgnoreProperties(ignoreUnknown = true)
@Entity
@Table(name = "product_detail")
public class ProductDetail implements Serializable {
......@@ -22,13 +26,13 @@ public class ProductDetail implements Serializable {
*/
@Id
@Column(name = "product_detail_id", nullable = false, length = 32)
private Long productDetailId;
private BigDecimal productDetailId;
/**
* 产品ID
*/
@Column(name = "product_id", nullable = true, length = 32)
private Long productId;
private BigDecimal productId;
/**
* 工厂名称
......@@ -139,20 +143,16 @@ public class ProductDetail implements Serializable {
.toString();
}
public Long getProductDetailId() {
return this.productDetailId;
}
public BigDecimal getProductDetailId() { return productDetailId; }
public void setProductDetailId(Long productDetailId) {
this.productDetailId = productDetailId;
public void setProductDetailId(String productDetailId) {
this.productDetailId = (productDetailId != null) ? new BigDecimal(productDetailId) : null;
}
public Long getProductId() {
return this.productId;
}
public BigDecimal getProductId() { return productId; }
public void setProductId(Long productId) {
this.productId = productId;
public void setProductId(String productId) {
this.productId = (productId != null) ? new BigDecimal(productId) : null;
}
public String getFactoryName() {
......
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;
import lombok.Data;
......@@ -10,7 +11,6 @@ import lombok.Data;
* @TableName product_face
*/
@Table(name="product_face")
@Data
@Entity
public class ProductFace implements Serializable {
/**
......@@ -18,7 +18,7 @@ public class ProductFace implements Serializable {
*/
@Id
@Column(name = "product_face_id")
private Long productFaceId;
private BigDecimal productFaceId;
/**
* 产品版面图片
......@@ -26,43 +26,19 @@ public class ProductFace implements Serializable {
@Column(name = "product_image")
private String productImage;
private static final long serialVersionUID = 1L;
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
public BigDecimal getProductFaceId() {
return productFaceId;
}
if (getClass() != that.getClass()) {
return false;
}
ProductFace other = (ProductFace) that;
return (this.getProductFaceId() == null ? other.getProductFaceId() == null : this.getProductFaceId().equals(other.getProductFaceId()))
&& (this.getProductImage() == null ? other.getProductImage() == null : this.getProductImage().equals(other.getProductImage()));
public void setProductFaceId(String productFaceId) {
this.productFaceId = (productFaceId != null) ? new BigDecimal(productFaceId) : null;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getProductFaceId() == null) ? 0 : getProductFaceId().hashCode());
result = prime * result + ((getProductImage() == null) ? 0 : getProductImage().hashCode());
return result;
public String getProductImage() {
return productImage;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", productFaceId=").append(productFaceId);
sb.append(", productImage=").append(productImage);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
public void setProductImage(String productImage) {
this.productImage = productImage;
}
}
\ No newline at end of file
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;
import lombok.Data;
......@@ -10,7 +11,6 @@ import lombok.Data;
* @TableName product_face_color
*/
@Table(name="product_face_color")
@Data
@Entity
public class ProductFaceColor implements Serializable {
/**
......@@ -18,19 +18,19 @@ public class ProductFaceColor implements Serializable {
*/
@Id
@Column(name = "product_face_color_id")
private Long productFaceColorId;
private BigDecimal productFaceColorId;
/**
* 产品版面ID
*/
@Column(name = "product_face_id")
private Long productFaceId;
private BigDecimal productFaceId;
/**
* 颜色ID
*/
@Column(name = "color_id")
private Long colorId;
private BigDecimal colorId;
/**
* 覆盖率(单位%)
......@@ -44,52 +44,43 @@ public class ProductFaceColor implements Serializable {
@Column(name = "sort_order")
private Integer sortOrder;
private static final long serialVersionUID = 1L;
public BigDecimal getProductFaceColorId() {
return productFaceColorId;
}
public void setProductFaceColorId(String productFaceColorId) {
this.productFaceColorId = (productFaceColorId != null) ? new BigDecimal(productFaceColorId) : null;
}
public BigDecimal getProductFaceId() {
return productFaceId;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
public void setProductFaceId(String productFaceId) {
this.productFaceId = (productFaceId != null) ? new BigDecimal(productFaceId) : null;
}
if (that == null) {
return false;
public BigDecimal getColorId() {
return colorId;
}
if (getClass() != that.getClass()) {
return false;
public void setColorId(String colorId) {
this.colorId = (colorId != null) ? new BigDecimal(colorId) : null;
}
ProductFaceColor other = (ProductFaceColor) that;
return (this.getProductFaceColorId() == null ? other.getProductFaceColorId() == null : this.getProductFaceColorId().equals(other.getProductFaceColorId()))
&& (this.getProductFaceId() == null ? other.getProductFaceId() == null : this.getProductFaceId().equals(other.getProductFaceId()))
&& (this.getColorId() == null ? other.getColorId() == null : this.getColorId().equals(other.getColorId()))
&& (this.getCoverageRate() == null ? other.getCoverageRate() == null : this.getCoverageRate().equals(other.getCoverageRate()))
&& (this.getSortOrder() == null ? other.getSortOrder() == null : this.getSortOrder().equals(other.getSortOrder()));
public Double getCoverageRate() {
return coverageRate;
}
public void setCoverageRate(Double coverageRate) {
this.coverageRate = coverageRate;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getProductFaceColorId() == null) ? 0 : getProductFaceColorId().hashCode());
result = prime * result + ((getProductFaceId() == null) ? 0 : getProductFaceId().hashCode());
result = prime * result + ((getColorId() == null) ? 0 : getColorId().hashCode());
result = prime * result + ((getCoverageRate() == null) ? 0 : getCoverageRate().hashCode());
result = prime * result + ((getSortOrder() == null) ? 0 : getSortOrder().hashCode());
return result;
public Integer getSortOrder() {
return sortOrder;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", productFaceColorId=").append(productFaceColorId);
sb.append(", productFaceId=").append(productFaceId);
sb.append(", colorId=").append(colorId);
sb.append(", coverageRate=").append(coverageRate);
sb.append(", sortOrder=").append(sortOrder);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
public void setSortOrder(Integer sortOrder) {
this.sortOrder = sortOrder;
}
}
\ No newline at end of file
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;
import javax.persistence.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
......@@ -12,7 +15,8 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
* @author Tison
* 产品外观
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonInclude(JsonInclude.Include.ALWAYS)
@JsonIgnoreProperties(ignoreUnknown = true)
@Entity
@Table(name = "product_looked")
public class ProductLooked implements Serializable {
......@@ -22,13 +26,13 @@ public class ProductLooked implements Serializable {
*/
@Id
@Column(name = "product_looked_id", nullable = false, length = 32)
private Long productLookedId;
private BigDecimal productLookedId;
/**
* 产品ID
*/
@Column(name = "product_id", nullable = true, length = 32)
private Long productId;
private BigDecimal productId;
/**
* 长;单位cm
......@@ -169,20 +173,17 @@ public class ProductLooked implements Serializable {
.toString();
}
public Long getProductLookedId() {
return this.productLookedId;
}
public BigDecimal getProductLookedId() { return productLookedId; }
public void setProductLookedId(Long productLookedId) {
this.productLookedId = productLookedId;
public void setProductLookedId(String productLookedId) {
this.productLookedId = (productLookedId != null) ? new BigDecimal(productLookedId) : null;
}
public Long getProductId() {
return this.productId;
}
public void setProductId(Long productId) {
this.productId = productId;
public BigDecimal getProductId() { return productId; }
public void setProductId(String productId) {
this.productId = (productId != null) ? new BigDecimal(productId) : null;
}
public Double getProductLength() {
......
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;
import lombok.Data;
......@@ -10,7 +11,6 @@ import lombok.Data;
* @TableName product_loss
*/
@Table(name="product_loss")
@Data
@Entity
public class ProductLoss implements Serializable {
/**
......@@ -18,13 +18,13 @@ public class ProductLoss implements Serializable {
*/
@Id
@Column(name = "product_loss_id")
private Long productLossId;
private BigDecimal productLossId;
/**
* 产品ID
*/
@Column(name = "product_id")
private Long productId;
private BigDecimal productId;
/**
* 产品最大loss数量
......@@ -56,58 +56,57 @@ public class ProductLoss implements Serializable {
@Column(name = "customer_name")
private String customerName;
private static final long serialVersionUID = 1L;
public BigDecimal getProductLossId() {
return productLossId;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
public void setProductLossId(String productLossId) {
this.productLossId = (productLossId != null) ? new BigDecimal(productLossId) : null;
}
if (that == null) {
return false;
public BigDecimal getProductId() { return productId; }
public void setProductId(String productId) {
this.productId = (productId != null) ? new BigDecimal(productId) : null;
}
if (getClass() != that.getClass()) {
return false;
public Integer getProductLossMax() {
return productLossMax;
}
ProductLoss other = (ProductLoss) that;
return (this.getProductLossId() == null ? other.getProductLossId() == null : this.getProductLossId().equals(other.getProductLossId()))
&& (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
&& (this.getProductLossMax() == null ? other.getProductLossMax() == null : this.getProductLossMax().equals(other.getProductLossMax()))
&& (this.getProductLossRate() == null ? other.getProductLossRate() == null : this.getProductLossRate().equals(other.getProductLossRate()))
&& (this.getProductLossRedundance() == null ? other.getProductLossRedundance() == null : this.getProductLossRedundance().equals(other.getProductLossRedundance()))
&& (this.getProductLossRemark() == null ? other.getProductLossRemark() == null : this.getProductLossRemark().equals(other.getProductLossRemark()))
&& (this.getCustomerName() == null ? other.getCustomerName() == null : this.getCustomerName().equals(other.getCustomerName()));
public void setProductLossMax(Integer productLossMax) {
this.productLossMax = productLossMax;
}
public Double getProductLossRate() {
return productLossRate;
}
public void setProductLossRate(Double productLossRate) {
this.productLossRate = productLossRate;
}
public Double getProductLossRedundance() {
return productLossRedundance;
}
public void setProductLossRedundance(Double productLossRedundance) {
this.productLossRedundance = productLossRedundance;
}
public String getProductLossRemark() {
return productLossRemark;
}
public void setProductLossRemark(String productLossRemark) {
this.productLossRemark = productLossRemark;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getProductLossId() == null) ? 0 : getProductLossId().hashCode());
result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
result = prime * result + ((getProductLossMax() == null) ? 0 : getProductLossMax().hashCode());
result = prime * result + ((getProductLossRate() == null) ? 0 : getProductLossRate().hashCode());
result = prime * result + ((getProductLossRedundance() == null) ? 0 : getProductLossRedundance().hashCode());
result = prime * result + ((getProductLossRemark() == null) ? 0 : getProductLossRemark().hashCode());
result = prime * result + ((getCustomerName() == null) ? 0 : getCustomerName().hashCode());
return result;
public String getCustomerName() {
return customerName;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", productLossId=").append(productLossId);
sb.append(", productId=").append(productId);
sb.append(", productLossMax=").append(productLossMax);
sb.append(", productLossRate=").append(productLossRate);
sb.append(", productLossRedundance=").append(productLossRedundance);
sb.append(", productLossRemark=").append(productLossRemark);
sb.append(", customerName=").append(customerName);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
}
\ No newline at end of file
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;
import lombok.Data;
......@@ -10,7 +11,6 @@ import lombok.Data;
* @TableName product_material
*/
@Table(name="product_material")
@Data
@Entity
public class ProductMaterial implements Serializable {
/**
......@@ -18,19 +18,19 @@ public class ProductMaterial implements Serializable {
*/
@Id
@Column(name = "product_material_id")
private Long productMaterialId;
private BigDecimal productMaterialId;
/**
* 产品ID
*/
@Column(name = "product_id")
private Long productId;
private BigDecimal productId;
/**
* 物料ID
*/
@Column(name = "material_id")
private String materialId;
private BigDecimal materialId;
/**
* 物料数量
......@@ -50,55 +50,51 @@ public class ProductMaterial implements Serializable {
@Column(name = "bom_type")
private String bomType;
private static final long serialVersionUID = 1L;
public BigDecimal getProductMaterialId() {
return productMaterialId;
}
public void setProductMaterialId(String productMaterialId) {
this.productMaterialId = (productMaterialId != null) ? new BigDecimal(productMaterialId) : null;
}
public BigDecimal getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = (productId != null) ? new BigDecimal(productId) : null;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
public BigDecimal getMaterialId() {
return materialId;
}
if (that == null) {
return false;
public void setMaterialId(String materialId) {
this.materialId = (materialId != null) ? new BigDecimal(materialId) : null;
}
public Integer getMaterialNumber() {
return materialNumber;
}
if (getClass() != that.getClass()) {
return false;
public void setMaterialNumber(Integer materialNumber) {
this.materialNumber = materialNumber;
}
ProductMaterial other = (ProductMaterial) that;
return (this.getProductMaterialId() == null ? other.getProductMaterialId() == null : this.getProductMaterialId().equals(other.getProductMaterialId()))
&& (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
&& (this.getMaterialId() == null ? other.getMaterialId() == null : this.getMaterialId().equals(other.getMaterialId()))
&& (this.getMaterialNumber() == null ? other.getMaterialNumber() == null : this.getMaterialNumber().equals(other.getMaterialNumber()))
&& (this.getBomVersion() == null ? other.getBomVersion() == null : this.getBomVersion().equals(other.getBomVersion()))
&& (this.getBomType() == null ? other.getBomType() == null : this.getBomType().equals(other.getBomType()));
public String getBomVersion() {
return bomVersion;
}
public void setBomVersion(String bomVersion) {
this.bomVersion = bomVersion;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getProductMaterialId() == null) ? 0 : getProductMaterialId().hashCode());
result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
result = prime * result + ((getMaterialId() == null) ? 0 : getMaterialId().hashCode());
result = prime * result + ((getMaterialNumber() == null) ? 0 : getMaterialNumber().hashCode());
result = prime * result + ((getBomVersion() == null) ? 0 : getBomVersion().hashCode());
result = prime * result + ((getBomType() == null) ? 0 : getBomType().hashCode());
return result;
public String getBomType() {
return bomType;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", productMaterialId=").append(productMaterialId);
sb.append(", productId=").append(productId);
sb.append(", materialId=").append(materialId);
sb.append(", materialNumber=").append(materialNumber);
sb.append(", bomVersion=").append(bomVersion);
sb.append(", bomType=").append(bomType);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
public void setBomType(String bomType) {
this.bomType = bomType;
}
}
\ No newline at end of file
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;
import javax.persistence.*;
......@@ -22,13 +23,13 @@ public class ProductProcess implements Serializable {
*/
@Id
@Column(name = "product_process_id", nullable = false, length = 32)
private Long productProcessId;
private BigDecimal productProcessId;
/**
* 工艺id
*/
@Column(name = "product_technology_id", nullable = true, length = 32)
private Long productTechnologyId;
private BigDecimal productTechnologyId;
/**
* 生成顺序
......@@ -92,20 +93,20 @@ public class ProductProcess implements Serializable {
.toString();
}
public Long getProductProcessId() {
return this.productProcessId;
public BigDecimal getProductProcessId() {
return productProcessId;
}
public void setProductProcessId(Long productProcessId) {
this.productProcessId = productProcessId;
public void setProductProcessId(String productProcessId) {
this.productProcessId = (productProcessId != null) ? new BigDecimal(productProcessId) : null;
}
public Long getProductTechnologyId() {
return this.productTechnologyId;
public BigDecimal getProductTechnologyId() {
return productTechnologyId;
}
public void setProductTechnologyId(Long productTechnologyId) {
this.productTechnologyId = productTechnologyId;
public void setProductTechnologyId(String productTechnologyId) {
this.productTechnologyId = (productTechnologyId != null) ? new BigDecimal(productTechnologyId) : null;
}
public Integer getProductionSequence() {
......
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
/**
......@@ -10,7 +13,8 @@ import lombok.Data;
* @TableName product_published_conf
*/
@Table(name="product_published_conf")
@Data
@JsonInclude(JsonInclude.Include.ALWAYS)
@JsonIgnoreProperties(ignoreUnknown = true)
@Entity
public class ProductPublishedConf implements Serializable {
/**
......@@ -18,13 +22,13 @@ public class ProductPublishedConf implements Serializable {
*/
@Id
@Column(name = "product_published_conf_id")
private Long productPublishedConfId;
private BigDecimal productPublishedConfId;
/**
* 产品ID
*/
@Column(name = "product_id")
private Long productId;
private BigDecimal productId;
/**
* 模数
......@@ -86,73 +90,99 @@ public class ProductPublishedConf implements Serializable {
@Column(name = "product_sheet_conf")
private String productSheetConf;
private static final long serialVersionUID = 1L;
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
ProductPublishedConf other = (ProductPublishedConf) that;
return (this.getProductPublishedConfId() == null ? other.getProductPublishedConfId() == null : this.getProductPublishedConfId().equals(other.getProductPublishedConfId()))
&& (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
&& (this.getModulus() == null ? other.getModulus() == null : this.getModulus().equals(other.getModulus()))
&& (this.getRowNum() == null ? other.getRowNum() == null : this.getRowNum().equals(other.getRowNum()))
&& (this.getColumnNum() == null ? other.getColumnNum() == null : this.getColumnNum().equals(other.getColumnNum()))
&& (this.getContactNum() == null ? other.getContactNum() == null : this.getContactNum().equals(other.getContactNum()))
&& (this.getRowDoubleBlade() == null ? other.getRowDoubleBlade() == null : this.getRowDoubleBlade().equals(other.getRowDoubleBlade()))
&& (this.getColumnDoubleBlade() == null ? other.getColumnDoubleBlade() == null : this.getColumnDoubleBlade().equals(other.getColumnDoubleBlade()))
&& (this.getDispatchMultiple() == null ? other.getDispatchMultiple() == null : this.getDispatchMultiple().equals(other.getDispatchMultiple()))
&& (this.getSheetLength() == null ? other.getSheetLength() == null : this.getSheetLength().equals(other.getSheetLength()))
&& (this.getSheetWidth() == null ? other.getSheetWidth() == null : this.getSheetWidth().equals(other.getSheetWidth()))
&& (this.getProductSheetConf() == null ? other.getProductSheetConf() == null : this.getProductSheetConf().equals(other.getProductSheetConf()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getProductPublishedConfId() == null) ? 0 : getProductPublishedConfId().hashCode());
result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
result = prime * result + ((getModulus() == null) ? 0 : getModulus().hashCode());
result = prime * result + ((getRowNum() == null) ? 0 : getRowNum().hashCode());
result = prime * result + ((getColumnNum() == null) ? 0 : getColumnNum().hashCode());
result = prime * result + ((getContactNum() == null) ? 0 : getContactNum().hashCode());
result = prime * result + ((getRowDoubleBlade() == null) ? 0 : getRowDoubleBlade().hashCode());
result = prime * result + ((getColumnDoubleBlade() == null) ? 0 : getColumnDoubleBlade().hashCode());
result = prime * result + ((getDispatchMultiple() == null) ? 0 : getDispatchMultiple().hashCode());
result = prime * result + ((getSheetLength() == null) ? 0 : getSheetLength().hashCode());
result = prime * result + ((getSheetWidth() == null) ? 0 : getSheetWidth().hashCode());
result = prime * result + ((getProductSheetConf() == null) ? 0 : getProductSheetConf().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", productPublishedConfId=").append(productPublishedConfId);
sb.append(", productId=").append(productId);
sb.append(", modulus=").append(modulus);
sb.append(", rowNum=").append(rowNum);
sb.append(", columnNum=").append(columnNum);
sb.append(", contactNum=").append(contactNum);
sb.append(", rowDoubleBlade=").append(rowDoubleBlade);
sb.append(", columnDoubleBlade=").append(columnDoubleBlade);
sb.append(", dispatchMultiple=").append(dispatchMultiple);
sb.append(", sheetLength=").append(sheetLength);
sb.append(", sheetWidth=").append(sheetWidth);
sb.append(", productSheetConf=").append(productSheetConf);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
public BigDecimal getProductPublishedConfId() {
return productPublishedConfId;
}
public void setProductPublishedConfId(String productPublishedConfId) {
this.productPublishedConfId = (productPublishedConfId != null) ? new BigDecimal(productPublishedConfId) : null;
}
public BigDecimal getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = (productId != null) ? new BigDecimal(productId) : null;
}
public Integer getModulus() {
return modulus;
}
public void setModulus(Integer modulus) {
this.modulus = modulus;
}
public Integer getRowNum() {
return rowNum;
}
public void setRowNum(Integer rowNum) {
this.rowNum = rowNum;
}
public Integer getColumnNum() {
return columnNum;
}
public void setColumnNum(Integer columnNum) {
this.columnNum = columnNum;
}
public Integer getContactNum() {
return contactNum;
}
public void setContactNum(Integer contactNum) {
this.contactNum = contactNum;
}
public Double getRowDoubleBlade() {
return rowDoubleBlade;
}
public void setRowDoubleBlade(Double rowDoubleBlade) {
this.rowDoubleBlade = rowDoubleBlade;
}
public Double getColumnDoubleBlade() {
return columnDoubleBlade;
}
public void setColumnDoubleBlade(Double columnDoubleBlade) {
this.columnDoubleBlade = columnDoubleBlade;
}
public Integer getDispatchMultiple() {
return dispatchMultiple;
}
public void setDispatchMultiple(Integer dispatchMultiple) {
this.dispatchMultiple = dispatchMultiple;
}
public Double getSheetLength() {
return sheetLength;
}
public void setSheetLength(Double sheetLength) {
this.sheetLength = sheetLength;
}
public Double getSheetWidth() {
return sheetWidth;
}
public void setSheetWidth(Double sheetWidth) {
this.sheetWidth = sheetWidth;
}
public String getProductSheetConf() {
return productSheetConf;
}
public void setProductSheetConf(String productSheetConf) {
this.productSheetConf = productSheetConf;
}
}
\ No newline at end of file
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;
import javax.persistence.*;
......@@ -22,13 +23,13 @@ public class ProductRiskDescription implements Serializable {
*/
@Id
@Column(name = "product_risk_description_id", nullable = false, length = 32)
private Long productRiskDescriptionId;
private BigDecimal productRiskDescriptionId;
/**
* 产品id
*/
@Column(name = "product_id", nullable = true, length = 32)
private Long productId;
private BigDecimal productId;
/**
* 序号
......@@ -67,20 +68,20 @@ public class ProductRiskDescription implements Serializable {
.toString();
}
public Long getProductRiskDescriptionId() {
return this.productRiskDescriptionId;
public BigDecimal getProductRiskDescriptionId() {
return productRiskDescriptionId;
}
public void setProductRiskDescriptionId(Long productRiskDescriptionId) {
this.productRiskDescriptionId = productRiskDescriptionId;
public void setProductRiskDescriptionId(String productRiskDescriptionId) {
this.productRiskDescriptionId = (productRiskDescriptionId != null) ? new BigDecimal(productRiskDescriptionId) : null;
}
public Long getProductId() {
return this.productId;
public BigDecimal getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
public void setProductId(String productId) {
this.productId = (productId != null) ? new BigDecimal(productId) : null;
}
public Integer getSequence() {
......
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;
import javax.persistence.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* @author Tison
* 产品工艺
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonInclude(JsonInclude.Include.ALWAYS)
@JsonIgnoreProperties(ignoreUnknown = true)
@Entity
@Table(name = "product_technology")
public class ProductTechnology implements Serializable {
......@@ -22,13 +25,13 @@ public class ProductTechnology implements Serializable {
*/
@Id
@Column(name = "product_technology_id", nullable = false)
private Long productTechnologyId;
private BigDecimal productTechnologyId;
/**
* 产品id
*/
@Column(name = "product_id", nullable = true)
private Long productId;
private BigDecimal productId;
/**
* 产品工艺制程
......@@ -211,20 +214,18 @@ public class ProductTechnology implements Serializable {
.toString();
}
public Long getProductTechnologyId() {
return this.productTechnologyId;
}
public BigDecimal getProductTechnologyId() { return productTechnologyId; }
public void setProductTechnologyId(Long productTechnologyId) {
this.productTechnologyId = productTechnologyId;
public void setProductTechnologyId(String productTechnologyId) {
this.productTechnologyId = (productTechnologyId != null) ? new BigDecimal(productTechnologyId) : null;
}
public Long getProductId() {
return this.productId;
public BigDecimal getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
public void setProductId(String productId) {
this.productId = (productId != null) ? new BigDecimal(productId) : null;
}
public String getProductTechnologyName() {
......
package com.huigou.topsun.product.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;
import lombok.Data;
......@@ -10,7 +11,6 @@ import lombok.Data;
* @TableName product_typeset_conf
*/
@Table(name="product_typeset_conf")
@Data
@Entity
public class ProductTypesetConf implements Serializable {
/**
......@@ -18,13 +18,13 @@ public class ProductTypesetConf implements Serializable {
*/
@Id
@Column(name = "product_typeset_conf_id")
private Long productTypesetConfId;
private BigDecimal productTypesetConfId;
/**
* 产品ID
*/
@Column(name = "product_id")
private Long productId;
private BigDecimal productId;
/**
* 印张长度(单位cm)
......@@ -47,55 +47,51 @@ public class ProductTypesetConf implements Serializable {
@Column(name = "loss_rate")
private Double lossRate;
private static final long serialVersionUID = 1L;
public BigDecimal getProductTypesetConfId() {
return productTypesetConfId;
}
public void setProductTypesetConfId(String productTypesetConfId) {
this.productTypesetConfId = (productTypesetConfId != null) ? new BigDecimal(productTypesetConfId) : null;
}
public BigDecimal getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = (productId != null) ? new BigDecimal(productId) : null;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
public Double getLength() {
return length;
}
if (that == null) {
return false;
public void setLength(Double length) {
this.length = length;
}
public Double getWidth() {
return width;
}
if (getClass() != that.getClass()) {
return false;
public void setWidth(Double width) {
this.width = width;
}
ProductTypesetConf other = (ProductTypesetConf) that;
return (this.getProductTypesetConfId() == null ? other.getProductTypesetConfId() == null : this.getProductTypesetConfId().equals(other.getProductTypesetConfId()))
&& (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
&& (this.getLength() == null ? other.getLength() == null : this.getLength().equals(other.getLength()))
&& (this.getWidth() == null ? other.getWidth() == null : this.getWidth().equals(other.getWidth()))
&& (this.getNumber() == null ? other.getNumber() == null : this.getNumber().equals(other.getNumber()))
&& (this.getLossRate() == null ? other.getLossRate() == null : this.getLossRate().equals(other.getLossRate()));
public Integer getNumber() {
return number;
}
public void setNumber(Integer number) {
this.number = number;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getProductTypesetConfId() == null) ? 0 : getProductTypesetConfId().hashCode());
result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
result = prime * result + ((getLength() == null) ? 0 : getLength().hashCode());
result = prime * result + ((getWidth() == null) ? 0 : getWidth().hashCode());
result = prime * result + ((getNumber() == null) ? 0 : getNumber().hashCode());
result = prime * result + ((getLossRate() == null) ? 0 : getLossRate().hashCode());
return result;
public Double getLossRate() {
return lossRate;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", productTypesetConfId=").append(productTypesetConfId);
sb.append(", productId=").append(productId);
sb.append(", length=").append(length);
sb.append(", width=").append(width);
sb.append(", number=").append(number);
sb.append(", lossRate=").append(lossRate);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
public void setLossRate(Double lossRate) {
this.lossRate = lossRate;
}
}
\ No newline at end of file
......@@ -3,11 +3,13 @@ package com.huigou.topsun.product.repository;
import com.huigou.topsun.product.domain.ProductDetail;
import org.springframework.data.jpa.repository.JpaRepository;
import java.math.BigDecimal;
/**
* @Auther: xin.lu
* @Date: 2023/11/22/10:41
* @Description:
*/
public interface ProductDetailRepository extends JpaRepository<ProductDetail,String> {
ProductDetail findByProductId(Long productId);
ProductDetail findByProductId(BigDecimal productId);
}
......@@ -3,6 +3,8 @@ package com.huigou.topsun.product.repository;
import com.huigou.topsun.product.domain.ProductLooked;
import org.springframework.data.jpa.repository.JpaRepository;
import java.math.BigDecimal;
/**
* @author qinzhenguan
* @Auther: xin.lu
......@@ -10,7 +12,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
* @Description:
*/
public interface ProductLookedRepository extends JpaRepository<ProductLooked,String> {
ProductLooked findByProductId(Long productId);
ProductLooked findByProductId(BigDecimal productId);
ProductLooked findByProductIdEquals(Long productId);
......
......@@ -3,6 +3,7 @@ package com.huigou.topsun.product.repository;
import com.huigou.topsun.product.domain.ProductLoss;
import org.springframework.data.jpa.repository.JpaRepository;
import java.math.BigDecimal;
import java.util.List;
/**
......@@ -11,6 +12,6 @@ import java.util.List;
* @Description:
*/
public interface ProductLossRepository extends JpaRepository<ProductLoss,String> {
List<ProductLoss> findByProductId(Long productId);
List<ProductLoss> findByProductId(BigDecimal productId);
}
......@@ -3,6 +3,7 @@ package com.huigou.topsun.product.repository;
import com.huigou.topsun.product.domain.ProductMaterial;
import org.springframework.data.jpa.repository.JpaRepository;
import java.math.BigDecimal;
import java.util.List;
/**
......@@ -11,5 +12,5 @@ import java.util.List;
* @Description:
*/
public interface ProductMaterialRepository extends JpaRepository<ProductMaterial,String> {
List<ProductMaterial> findByProductId(Long productId);
List<ProductMaterial> findByProductId(BigDecimal productId);
}
package com.huigou.topsun.product.repository;
import com.huigou.topsun.product.domain.ProductProcess;
import org.springframework.data.jpa.repository.JpaRepository;
import java.math.BigDecimal;
import java.util.List;
/**
* @author qinzhenguan
*/
public interface ProductProcessRepository extends JpaRepository<ProductProcess, Long> {
List<ProductProcess> findByProductTechnologyId(BigDecimal productTechnologyId);
}
\ No newline at end of file
......@@ -3,13 +3,15 @@ package com.huigou.topsun.product.repository;
import com.huigou.topsun.product.domain.ProductPublishedConf;
import org.springframework.data.jpa.repository.JpaRepository;
import java.math.BigDecimal;
/**
* @Auther: xin.lu
* @Date: 2023/11/22/10:46
* @Description:
*/
public interface ProductPublishedConfRepository extends JpaRepository<ProductPublishedConf,String> {
ProductPublishedConf findByProductId(Long productId);
ProductPublishedConf findByProductId(BigDecimal productId);
ProductPublishedConf getProductPublishedConfByProductId(Long productId);
}
package com.huigou.topsun.product.repository;
import com.huigou.topsun.product.domain.ProductTechnology;
import org.springframework.data.jpa.repository.JpaRepository;
import java.math.BigDecimal;
/**
* @author qinzhenguan
*/
public interface ProductTechnologyRepository extends JpaRepository<ProductTechnology, Long> {
ProductTechnology findByProductId(BigDecimal productId);
}
\ No newline at end of file
......@@ -3,11 +3,13 @@ package com.huigou.topsun.product.repository;
import com.huigou.topsun.product.domain.ProductTypesetConf;
import org.springframework.data.jpa.repository.JpaRepository;
import java.math.BigDecimal;
/**
* @Auther: xin.lu
* @Date: 2023/11/22/10:46
* @Description:
*/
public interface ProductTypesetConfRepository extends JpaRepository<ProductTypesetConf,String> {
ProductTypesetConf findByProductId(Long productId);
ProductTypesetConf findByProductId(BigDecimal productId);
}
......@@ -64,8 +64,8 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
}
@SneakyThrows
// @Transactional(propagation = Propagation.REQUIRES_NEW)
@Transactional(propagation = Propagation.NEVER)
@Transactional(propagation = Propagation.REQUIRES_NEW)
// @Transactional(propagation = Propagation.NEVER)
@Override
protected String saveBizAndApprovalData() {
super.saveBizAndApprovalData();
......@@ -75,15 +75,7 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
} else {
proofingApply = (ProofingApplyBaseInfo) commonDomainService.loadAndFillinProperties(proofingApply);
}
//二次保存不添加id
if (proofingApply.getId() == null || proofingApply.getId().isEmpty()) {
String id = UUID.randomUUID().toString().replace("-", "");
proofingApply.setProofingApplyId(id);
}else{
ProofingApplyBaseInfo one = this.loadProofingApplyById(proofingApply.getId());
proofingApply.setProofingApplyId(one.getProofingApplyId());
}
//如果录入了ng重新打样原因,则更改状态为不通过
if(!StringUtil.isBlank(proofingApply.getProofingApplyNgReReason())){
proofingApply.setProofingApplyApplicationStatus("2");
......
......@@ -138,10 +138,10 @@ public class ProofingMakeApplicationImpl extends BaseApplication implements Proo
ProductLooked productLooked = sdo.toObject(ProductLooked.class);
ProductPublishedConf productPublishedConf = sdo.toObject(ProductPublishedConf.class);
ProductLooked looked = productLookedRepository.findByProductId(productLooked.getProductId());
productLooked.setProductLookedId(looked==null?null:looked.getProductLookedId());
productLooked.setProductLookedId(looked==null?null:looked.getProductLookedId().toString());
productLookedRepository.save(productLooked);
ProductPublishedConf publishedConf = productPublishedConfRepository.getProductPublishedConfByProductId(productPublishedConf.getProductId());
productPublishedConf.setProductPublishedConfId(publishedConf==null?null:publishedConf.getProductPublishedConfId());
ProductPublishedConf publishedConf = productPublishedConfRepository.getProductPublishedConfByProductId(productPublishedConf.getProductId().longValue());
productPublishedConf.setProductPublishedConfId(publishedConf==null?null:publishedConf.getProductPublishedConfId().toString());
productPublishedConfRepository.save(productPublishedConf);
return idMap;
......
......@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
@Controller
......@@ -71,6 +72,8 @@ public class ProofingApplyController extends CommonController {
Operator operator = getOperator();//获取当前操作员的详情信息
proofingApply.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
proofingApply.setProofingApplyNo(proofingApply.getBillCode()); //将生成的单号赋予实体类对应字段
String id = UUID.randomUUID().toString().replace("-", "");
proofingApply.setProofingApplyId(id);
return forward("proofingApply",proofingApply);
}
......@@ -97,7 +100,7 @@ public class ProofingApplyController extends CommonController {
SDO sdo = this.getSDO();
String productId = sdo.getString("productId");
ProductLooked productLooked = new ProductLooked();
productLooked.setProductId(Long.valueOf(productId));
productLooked.setProductId(productId);
ProductLooked newProductLooked = productLookedApplication.getProductLookedByEntity(productLooked);
return toResult(newProductLooked);
}
......
......@@ -12,7 +12,7 @@ public class Snowflake {
// 开始时间
private static final long OFFSET = 1686211627000L;
private static long WORKER_ID ;
private static long WORKER_ID = 1L;
/** 机器ID位 **/
private static final long WORKER_ID_BITS = 4L;
......@@ -28,9 +28,9 @@ public class Snowflake {
private static long lastTimestamp = 0L;
private static long sequence = 0L;
public Snowflake(long workerId) {
WORKER_ID = workerId;
}
// public Snowflake(long workerId) {
// WORKER_ID = workerId;
// }
public static synchronized long nextId() {
long timestamp = timeGen();
......
......@@ -18,7 +18,7 @@ public class TestSnowflake {
generateTest();
new Snowflake(1);
// new Snowflake(1);
final Long id = Snowflake.nextId();
Date date = new Date();
date.setTime( (id>>18) + 1686211627000L );
......@@ -55,11 +55,12 @@ public class TestSnowflake {
public class TreadA extends Thread {
@Override
public void run() {
super.run();
//long timestamp = timeGen();
for(int i = 0; i < 30000; i++) {
new Snowflake(1);
// new Snowflake(1);
long id = Snowflake.nextId();
list.add(id);
}
......@@ -69,10 +70,11 @@ public class TestSnowflake {
public class TreadB extends Thread {
@Override
public void run() {
super.run();
for(int i = 0; i < 30000; i++) {
new Snowflake(1);
// new Snowflake(1);
long id = Snowflake.nextId();
list.add(id);
}
......
......@@ -3,12 +3,13 @@
<query name="slicedQuery" table="proofing_apply">
<sql-query>
select t.* from proofing_apply_base_info t where 1=1
select t.* from proofing_apply_base_info t
<!-- where 1=1-->
</sql-query>
<permissions>
<permission column="person_member_id" symbol="half_like" alias="t" kind="personId"/>
<permission column="full_id" symbol="half_like" alias="t" kind="fullId" manageType="demoQueryLeave,admin"/>
</permissions>
<!-- <permissions>-->
<!-- <permission column="person_member_id" symbol="half_like" alias="t" kind="personId"/>-->
<!-- <permission column="full_id" symbol="half_like" alias="t" kind="fullId" manageType="demoQueryLeave,admin"/>-->
<!-- </permissions>-->
</query>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment