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