|
|
@@ -0,0 +1,218 @@
|
|
|
+package com.uas.eis.entity;
|
|
|
+
|
|
|
+import com.uas.eis.utils.BaseUtil;
|
|
|
+import com.uas.eis.utils.NumberUtil;
|
|
|
+import com.uas.eis.utils.StringUtil;
|
|
|
+
|
|
|
+import java.io.Serializable;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+public class ScrapRecord implements Serializable {
|
|
|
+ private Integer object_rrn;
|
|
|
+ private String scrap_code;
|
|
|
+ private String create_time;
|
|
|
+ private String create_mancode;
|
|
|
+ private String created_manname;
|
|
|
+ private String lotno;
|
|
|
+ private String makecode;
|
|
|
+ private String step_code;
|
|
|
+ private String responsible_process;
|
|
|
+ private String responsible_processname;
|
|
|
+ private String customer_code;
|
|
|
+ private String prod_code;
|
|
|
+ private Integer pqty;
|
|
|
+ private Integer sqty;
|
|
|
+ private Integer uqty;
|
|
|
+ private List<ScrapRecordDet> items;
|
|
|
+
|
|
|
+ public Integer getObject_rrn() {
|
|
|
+ return object_rrn==null?0:object_rrn;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setObject_rrn(Integer object_rrn) {
|
|
|
+ this.object_rrn = object_rrn;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getScrap_code() {
|
|
|
+ return scrap_code==null?"":scrap_code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setScrap_code(String scrap_code) {
|
|
|
+ this.scrap_code = scrap_code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getCreate_time() {
|
|
|
+ return create_time==null?"":create_time;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCreate_time(String create_time) {
|
|
|
+ this.create_time = create_time;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getCreate_mancode() {
|
|
|
+ return create_mancode==null?"":create_mancode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCreate_mancode(String create_mancode) {
|
|
|
+ this.create_mancode = create_mancode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getCreated_manname() {
|
|
|
+ return created_manname==null?"":created_manname;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCreated_manname(String created_manname) {
|
|
|
+ this.created_manname = created_manname;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getLotno() {
|
|
|
+ return lotno==null?"":lotno;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setLotno(String lotno) {
|
|
|
+ this.lotno = lotno;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getMakecode() {
|
|
|
+ return makecode==null?"":makecode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setMakecode(String makecode) {
|
|
|
+ this.makecode = makecode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getStep_code() {
|
|
|
+ return step_code==null?"":step_code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setStep_code(String step_code) {
|
|
|
+ this.step_code = step_code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getResponsible_process() {
|
|
|
+ return responsible_process==null?"":responsible_process;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setResponsible_process(String responsible_process) {
|
|
|
+ this.responsible_process = responsible_process;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getResponsible_processname() {
|
|
|
+ return responsible_processname==null?"":responsible_processname;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setResponsible_processname(String responsible_processname) {
|
|
|
+ this.responsible_processname = responsible_processname;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getCustomer_code() {
|
|
|
+ return customer_code==null?"":customer_code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCustomer_code(String customer_code) {
|
|
|
+ this.customer_code = customer_code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getProd_code() {
|
|
|
+ return prod_code==null?"":prod_code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setProd_code(String prod_code) {
|
|
|
+ this.prod_code = prod_code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getPqty() {
|
|
|
+ return pqty == null?0:pqty;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPqty(Integer pqty) {
|
|
|
+ this.pqty = pqty;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getSqty() {
|
|
|
+ return sqty == null?0:sqty;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setSqty(Integer sqty) {
|
|
|
+ this.sqty = sqty;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getUqty() {
|
|
|
+ return uqty == null?0:uqty;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setUqty(Integer uqty) {
|
|
|
+ this.uqty = uqty;
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<ScrapRecordDet> getItems() {
|
|
|
+ return items;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setItems(List<ScrapRecordDet> items) {
|
|
|
+ this.items = items;
|
|
|
+ }
|
|
|
+ public List<String> getSqls(String source_){
|
|
|
+ List<String> sqls = new ArrayList<>();
|
|
|
+ StringBuffer sqlStr = new StringBuffer();
|
|
|
+ sqlStr.append("INSERT INTO DOCKING_SCRAP_RECORD(CODE,LOTNO,PRODCODE,PQTY,SQTY,UQTY" +
|
|
|
+ ",MAKECODE,CCCODE,INDATE,INTIME,INMANCODE,INMAN,SOURCE_, SOURCEID,RESPONSIBLE_PROCESSCODE,RESPONSIBLE_PROCESSNAME)")
|
|
|
+ .append("values (")
|
|
|
+ .append("'").append(scrap_code).append("',")
|
|
|
+ .append("'").append(lotno).append("',")
|
|
|
+ .append("'").append(prod_code).append("',")
|
|
|
+ .append("'").append(getPqty()).append("',")
|
|
|
+ .append("'").append(getSqty()).append("',")
|
|
|
+ .append("'").append(getUqty()).append("',")
|
|
|
+ .append("'").append(getMakecode()).append("',")
|
|
|
+ .append("'").append(getStep_code()).append("',")
|
|
|
+ .append("'").append(getCreate_time()).append("',")
|
|
|
+ .append("to_date('"+getCreate_time()+"','yyyy-mm-dd hh24:mi:ss')").append(",")
|
|
|
+ .append("'").append(getCreate_mancode()).append("',")
|
|
|
+ .append("'").append(getCreated_manname()).append("',")
|
|
|
+ .append("'").append(source_).append("',")
|
|
|
+ .append("'").append(getObject_rrn()).append("',")
|
|
|
+ .append("'").append(getResponsible_process()).append("',")
|
|
|
+ .append("'").append(getResponsible_processname()).append("'")
|
|
|
+ .append(")");
|
|
|
+ sqls.add(sqlStr.toString());
|
|
|
+ //缺陷代码等信息 List<ScrapRecordDet>
|
|
|
+ if(getItems()!=null &&getItems().size()>0){
|
|
|
+ for (ScrapRecordDet item : getItems()) {
|
|
|
+ sqlStr = new StringBuffer();
|
|
|
+ sqlStr.append("INSERT INTO DOCKING_SCRAP_RECORD_DET(CODE, INDATE, INMANCODE, INMAN, LOTNO, PROD_CODE, STEP_CODE, PQTY, SQTY, UQTY, CUSTOMER_CODE, MAKECODE, LAYER" +
|
|
|
+ ",RESPONSIBLE_PROCESSCODE, RESPONSIBLE_PROCESSNAME, DEFECT_CODE, DEFECT_CODENAME, DEFECT_GROUPCODE, DEFECT_GROUPCODENAME, SCRAP_AREA" +
|
|
|
+ ", SCRAP_ACTION,SOURCE_,SOURCEID)")
|
|
|
+ .append("values (")
|
|
|
+ .append("'").append(getScrap_code()).append("',")
|
|
|
+ .append("to_date('"+getCreate_time()+"','yyyy-mm-dd hh24:mi:ss')").append(",")
|
|
|
+ .append("'").append(getCreate_mancode()).append("',")
|
|
|
+ .append("'").append(getCreated_manname()).append("',")
|
|
|
+ .append("'").append(getLotno()).append("',")
|
|
|
+ .append("'").append(getProd_code()).append("',")
|
|
|
+ .append("'").append(getScrap_code()).append("',")
|
|
|
+ .append("'").append(item.getPqty()).append("',")
|
|
|
+ .append("'").append(item.getSqty()).append("',")
|
|
|
+ .append("'").append(item.getUqty()).append("',")
|
|
|
+ .append("'").append(getCustomer_code()).append("',")
|
|
|
+ .append("'").append(getMakecode()).append("',")
|
|
|
+ .append("'").append(item.getLayer()).append("',")
|
|
|
+ .append("'").append(getResponsible_process()).append("',")
|
|
|
+ .append("'").append(getResponsible_processname()).append("',")
|
|
|
+ .append("'").append(item.getDefect_code()).append("',")
|
|
|
+ .append("'").append(item.getDefect_codename()).append("',")
|
|
|
+ .append("'").append(item.getDefect_groupcode()).append("',")
|
|
|
+ .append("'").append(item.getDefect_groupcodename()).append("',")
|
|
|
+ .append("'").append(item.getScrap_area()).append("',")
|
|
|
+ .append("'").append(item.getScrap_action()).append("',")
|
|
|
+ .append("'").append(source_).append("',")
|
|
|
+ .append("'").append(getObject_rrn()).append("'")
|
|
|
+ .append(")");
|
|
|
+ sqls.add(sqlStr.toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return sqls;
|
|
|
+ }
|
|
|
+}
|