Commit c90e8451 by 宋祥

Merge remote-tracking branch 'origin/dev' into dev

parents bb24660c 01962209
......@@ -72,22 +72,22 @@ public enum DdynamicEnum {
WH_RECORD_BLOCK_ID("wh_record_block_id","whCode","whName","HPPZ007.queryComboBox"),
/**
* 模块:物料类型
* 用途:物料类型下拉框
* 模块:存货类型
* 用途:存货类型下拉框
* 编写:yk
*/
MAT_TYPE_BLOCK_ID("mat_type_block_id","matType","matType","HPPZ007.queryMatTypeComboBox"),
/**
* 模块:物料编码
* 用途:物料编码下拉框
* 模块:存货编码
* 用途:存货编码下拉框
* 编写:yk
*/
MAT_CODE_BLOCK_ID("mat_code_block_id","matCode","matCode","HPPZ007.queryMatCodeComboBox"),
/**
* 模块:物料编码
* 用途:物料编码下拉框
* 模块:存货编码
* 用途:存货编码下拉框
* 编写:yk
*/
USER_BLOCK_ID("user_block_id","loginName","userName","HPXSUser.queryComboBox"),
......
......@@ -33,10 +33,10 @@ public class HPKC001 extends DaoEPBase {
private String documentTime = " "; /* 单据日期*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String materialType = " "; /* 物料类型编码*/
private String materialTypeName = " "; /* 物料类型名称*/
private String materialCode = " "; /* 物料编码*/
private String materialName = " "; /* 物料名称*/
private String materialType = " "; /* 存货类型编码*/
private String materialTypeName = " "; /* 存货类型名称*/
private String materialCode = " "; /* 存货编码*/
private String materialName = " "; /* 存货名称*/
private String spec = " "; /* 规格*/
private String unit = " "; /* 单位*/
private Long quantity = 0L; /* 数量*/
......@@ -112,19 +112,19 @@ EiColumn eiColumn;
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("materialType");
eiColumn.setDescName("物料类型编码");
eiColumn.setDescName("存货类型编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("materialTypeName");
eiColumn.setDescName("物料类型名称");
eiColumn.setDescName("存货类型名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("materialCode");
eiColumn.setDescName("物料编码");
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("materialName");
eiColumn.setDescName("物料名称");
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("spec");
......
......@@ -33,10 +33,10 @@ public class HPKC002 extends DaoEPBase {
private String documentTime = " "; /* 单据日期*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String materialType = " "; /* 物料类型编码*/
private String materialTypeName = " "; /* 物料类型名称*/
private String materialCode = " "; /* 物料编码*/
private String materialName = " "; /* 物料名称*/
private String materialType = " "; /* 存货类型编码*/
private String materialTypeName = " "; /* 存货类型名称*/
private String materialCode = " "; /* 存货编码*/
private String materialName = " "; /* 存货名称*/
private String spec = " "; /* 规格*/
private String unit = " "; /* 单位*/
private Long quantity = 0L; /* 数量*/
......@@ -112,19 +112,19 @@ public class HPKC002 extends DaoEPBase {
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("materialType");
eiColumn.setDescName("物料类型编码");
eiColumn.setDescName("存货类型编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("materialTypeName");
eiColumn.setDescName("物料类型名称");
eiColumn.setDescName("存货类型名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("materialCode");
eiColumn.setDescName("物料编码");
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("materialName");
eiColumn.setDescName("物料名称");
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("spec");
......
......@@ -29,9 +29,9 @@ public class HPKC006 extends DaoEPBase {
public static final String FIELD_OTHER_ENTER_NO = "otherEnterNo"; /* 其他入库单号*/
public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
public static final String FIELD_INVENT_TYPE = "inventType"; /* 物料类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 物料编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 物料名称*/
public static final String FIELD_INVENT_TYPE = "inventType"; /* 存货类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 规格*/
public static final String FIELD_AMOUNT = "amount"; /* 数量*/
public static final String FIELD_WEIGHT = "weight"; /* 重量*/
......@@ -53,9 +53,9 @@ public class HPKC006 extends DaoEPBase {
public static final String COL_OTHER_ENTER_NO = "OTHER_ENTER_NO"; /* 其他入库单号*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 物料类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 物料编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 物料名称*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 规格*/
public static final String COL_AMOUNT = "AMOUNT"; /* 数量*/
public static final String COL_WEIGHT = "WEIGHT"; /* 重量*/
......@@ -83,9 +83,9 @@ public class HPKC006 extends DaoEPBase {
private String otherEnterNo = " "; /* 其他入库单号*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String inventType = " "; /* 物料类型*/
private String inventCode = " "; /* 物料编码*/
private String inventName = " "; /* 物料名称*/
private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Long inventRecordId = null; /* 规格*/
private BigDecimal amount = new BigDecimal(0.00); /* 数量*/
private BigDecimal weight = new BigDecimal(0.00); /* 重量*/
......@@ -136,15 +136,15 @@ public class HPKC006 extends DaoEPBase {
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("物料类型");
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("物料编码");
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("物料名称");
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
......@@ -328,7 +328,7 @@ public class HPKC006 extends DaoEPBase {
this.whName = whName;
}
/**
* get the inventType - 物料类型.
* get the inventType - 存货类型.
* @return the inventType
*/
public String getInventType() {
......@@ -336,15 +336,15 @@ public class HPKC006 extends DaoEPBase {
}
/**
* set the inventType - 物料类型.
* set the inventType - 存货类型.
*
* @param inventType - 物料类型
* @param inventType - 存货类型
*/
public void setInventType(String inventType) {
this.inventType = inventType;
}
/**
* get the inventCode - 物料编码.
* get the inventCode - 存货编码.
* @return the inventCode
*/
public String getInventCode() {
......@@ -352,15 +352,15 @@ public class HPKC006 extends DaoEPBase {
}
/**
* set the inventCode - 物料编码.
* set the inventCode - 存货编码.
*
* @param inventCode - 物料编码
* @param inventCode - 存货编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventName - 物料名称.
* get the inventName - 存货名称.
* @return the inventName
*/
public String getInventName() {
......@@ -368,9 +368,9 @@ public class HPKC006 extends DaoEPBase {
}
/**
* set the inventName - 物料名称.
* set the inventName - 存货名称.
*
* @param inventName - 物料名称
* @param inventName - 存货名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
......
......@@ -29,9 +29,9 @@ public class HPKC007 extends DaoEPBase {
public static final String FIELD_OTHER_OUTER_NO = "otherOuterNo"; /* 其他出库单号*/
public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
public static final String FIELD_INVENT_TYPE = "inventType"; /* 物料类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 物料编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 物料名称*/
public static final String FIELD_INVENT_TYPE = "inventType"; /* 存货类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 规格ID*/
public static final String FIELD_AMOUNT = "amount"; /* 数量*/
public static final String FIELD_WEIGHT = "weight"; /* 重量*/
......@@ -54,9 +54,9 @@ public class HPKC007 extends DaoEPBase {
public static final String COL_OTHER_OUTER_NO = "OTHER_OUTER_NO"; /* 其他出库单号*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 物料类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 物料编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 物料名称*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 规格ID*/
public static final String COL_AMOUNT = "AMOUNT"; /* 数量*/
public static final String COL_WEIGHT = "WEIGHT"; /* 重量*/
......@@ -85,9 +85,9 @@ public class HPKC007 extends DaoEPBase {
private String otherOuterNo = " "; /* 其他出库单号*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String inventType = " "; /* 物料类型*/
private String inventCode = " "; /* 物料编码*/
private String inventName = " "; /* 物料名称*/
private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Long inventRecordId = null; /* 规格ID*/
private BigDecimal amount = new BigDecimal(0.00); /* 数量*/
private BigDecimal weight = new BigDecimal(0.00); /* 重量*/
......@@ -139,15 +139,15 @@ public class HPKC007 extends DaoEPBase {
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("物料类型");
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("物料编码");
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("物料名称");
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
......@@ -335,7 +335,7 @@ public class HPKC007 extends DaoEPBase {
this.whName = whName;
}
/**
* get the inventType - 物料类型.
* get the inventType - 存货类型.
* @return the inventType
*/
public String getInventType() {
......@@ -343,15 +343,15 @@ public class HPKC007 extends DaoEPBase {
}
/**
* set the inventType - 物料类型.
* set the inventType - 存货类型.
*
* @param inventType - 物料类型
* @param inventType - 存货类型
*/
public void setInventType(String inventType) {
this.inventType = inventType;
}
/**
* get the inventCode - 物料编码.
* get the inventCode - 存货编码.
* @return the inventCode
*/
public String getInventCode() {
......@@ -359,15 +359,15 @@ public class HPKC007 extends DaoEPBase {
}
/**
* set the inventCode - 物料编码.
* set the inventCode - 存货编码.
*
* @param inventCode - 物料编码
* @param inventCode - 存货编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventName - 物料名称.
* get the inventName - 存货名称.
* @return the inventName
*/
public String getInventName() {
......@@ -375,9 +375,9 @@ public class HPKC007 extends DaoEPBase {
}
/**
* set the inventName - 物料名称.
* set the inventName - 存货名称.
*
* @param inventName - 物料名称
* @param inventName - 存货名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
......
......@@ -27,9 +27,9 @@ public class HPKC010 extends DaoEPBase {
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
public static final String FIELD_INVENT_TYPE = "inventType"; /* 物料类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 物料编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 物料名称*/
public static final String FIELD_INVENT_TYPE = "inventType"; /* 存货类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/
public static final String FIELD_AMOUNT = "amount"; /* 账面数量*/
public static final String FIELD_WEIGHT = "weight"; /* 账面重量*/
......@@ -45,9 +45,9 @@ public class HPKC010 extends DaoEPBase {
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 物料类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 物料编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 物料名称*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/
public static final String COL_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/
public static final String COL_AMOUNT = "amount"; /* 数量*/
public static final String COL_WEIGHT = "weight"; /* 重量*/
......@@ -69,9 +69,9 @@ public class HPKC010 extends DaoEPBase {
private String companyCode = " "; /* 企业编码 预留*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String inventType = " "; /* 物料类型*/
private String inventCode = " "; /* 物料编码*/
private String inventName = " "; /* 物料名称*/
private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Long inventRecordId = new Long(0); /* 存货档案ID*/
private BigDecimal amount = new BigDecimal(0.00); /* 数量*/
private BigDecimal weight = new BigDecimal(0.00); /* 重量*/
......@@ -240,7 +240,7 @@ public class HPKC010 extends DaoEPBase {
this.whName = whName;
}
/**
* get the matType - 物料类型.
* get the matType - 存货类型.
* @return the matType
*/
public String getInventType() {
......@@ -248,15 +248,15 @@ public class HPKC010 extends DaoEPBase {
}
/**
* set the matType - 物料类型.
* set the matType - 存货类型.
*
* @param inventType - 物料类型
* @param inventType - 存货类型
*/
public void setInventType(String inventType) {
this.inventType = inventType;
}
/**
* get the matCode - 物料编码.
* get the matCode - 存货编码.
* @return the matCode
*/
public String getInventCode() {
......@@ -264,15 +264,15 @@ public class HPKC010 extends DaoEPBase {
}
/**
* set the matCode - 物料编码.
* set the matCode - 存货编码.
*
* @param inventCode - 物料编码
* @param inventCode - 存货编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the matName - 物料名称.
* get the matName - 存货名称.
* @return the matName
*/
public String getInventName() {
......@@ -280,9 +280,9 @@ public class HPKC010 extends DaoEPBase {
}
/**
* set the matName - 物料名称.
* set the matName - 存货名称.
*
* @param inventName - 物料名称
* @param inventName - 存货名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
......
......@@ -76,7 +76,7 @@ public class ServiceHPKC001 extends ServiceBase {
params.put("whCode", insertEntity.getWhCode());
List query = dao.query("HPPZ007.queryByWhCode", params);
insertEntity.setWhName(((HPPZ007) query.get(0)).getWhName());
//物料类型
//存货类型
insertEntity.setMaterialTypeName(InventTypeEnun.getNameByCode(insertEntity.getMaterialType()));
// 生成单据号
insertEntity.setDocumentCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC001_NUMBER));
......@@ -108,7 +108,7 @@ public class ServiceHPKC001 extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) {
HPKC001 entity = new HPKC001();
entity.fromMap(resultRows.get(i));
AssertUtils.isEmpty(entity.getMaterialType(), "物料类型不能为空");
AssertUtils.isEmpty(entity.getMaterialType(), "存货类型不能为空");
AssertUtils.isEmpty(entity.getMaterialCode(), "物料不能为空");
AssertUtils.isEmpty(entity.getWhCode(), "仓库不能为空");
......@@ -193,7 +193,7 @@ public class ServiceHPKC001 extends ServiceBase {
params.put("whCode", updateEntity.getWhCode());
List query = dao.query("HPPZ007.queryByWhCode", params);
updateEntity.setWhName(((HPPZ007) query.get(0)).getWhName());
//物料类型
//存货类型
updateEntity.setMaterialTypeName(InventTypeEnun.getNameByCode(updateEntity.getMaterialType()));
dao.insert("HPKC001.update", updateEntity);
}
......
......@@ -75,7 +75,7 @@ public class ServiceHPKC002 extends ServiceBase {
params.put("whCode", insertEntity.getWhCode());
List query = dao.query("HPPZ007.queryByWhCode", params);
insertEntity.setWhName(((HPPZ007) query.get(0)).getWhName());
//物料类型
//存货类型
insertEntity.setMaterialTypeName(InventTypeEnun.getNameByCode(insertEntity.getMaterialType()));
// 生成单据号
insertEntity.setDocumentCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC002_NUMBER));
......@@ -107,7 +107,7 @@ public class ServiceHPKC002 extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) {
HPKC002 entity = new HPKC002();
entity.fromMap(resultRows.get(i));
AssertUtils.isEmpty(entity.getMaterialType(), "物料类型不能为空");
AssertUtils.isEmpty(entity.getMaterialType(), "存货类型不能为空");
AssertUtils.isEmpty(entity.getMaterialCode(), "物料不能为空");
AssertUtils.isEmpty(entity.getWhCode(), "仓库不能为空");
......@@ -134,7 +134,7 @@ public class ServiceHPKC002 extends ServiceBase {
params.put("whCode", updateEntity.getWhCode());
List query = dao.query("HPPZ007.queryByWhCode", params);
updateEntity.setWhName(((HPPZ007) query.get(0)).getWhName());
//物料类型
//存货类型
updateEntity.setMaterialTypeName(InventTypeEnun.getNameByCode(updateEntity.getMaterialType()));
dao.insert("HPKC002.update", updateEntity);
}
......
......@@ -6,6 +6,7 @@ import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
......@@ -14,13 +15,14 @@ import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* @author:songx
......@@ -83,11 +85,14 @@ public class ServiceHPKC003 extends ServiceBase {
fKc003.setDocumentDate(StringUtil.removeHorizontalLine(fKc003.getDocumentDate()));
// 仓库名称
fKc003.setWhName(HPPZTools.getPz007ByCode(fKc003.getWhCode()).getWhName());
// 物料名称
// 存货名称
fKc003.setInventName(HPPZTools.getPz004ByCode(fKc003.getInventCode()).getInventName());
// 生成入库单号
fKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
DaoUtils.insert("HPKC003.insert", fKc003);
//同步生产计划
this.synchronousPlan(fKc003);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
......@@ -114,7 +119,7 @@ public class ServiceHPKC003 extends ServiceBase {
fKc003.setDocumentDate(StringUtil.removeHorizontalLine(fKc003.getDocumentDate()));
// 仓库名称
fKc003.setWhName(HPPZTools.getPz007ByCode(fKc003.getWhCode()).getWhName());
// 物料名称
// 存货名称
fKc003.setInventName(HPPZTools.getPz004ByCode(fKc003.getInventCode()).getInventName());
DaoUtils.update("HPKC003.update", fKc003);
}
......@@ -141,6 +146,16 @@ public class ServiceHPKC003 extends ServiceBase {
Map<?, ?> map = eiBlock.getRow(i);
hpkc003.fromMap(map);
this.dao.delete("HPKC003.delete", hpkc003.toMap());
//生产一条负数量和产量的红冲记录
hpkc003.setAmount(hpkc003.getAmount().multiply(new BigDecimal(-1.000)));
hpkc003.setWeight(hpkc003.getWeight().multiply(new BigDecimal(-1.000)));
hpkc003.setDeleteFlag(0);
hpkc003.setProdNoOld(hpkc003.getProdNo());
hpkc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
DaoUtils.insert("HPKC003.insert", hpkc003);
//同步生产计划
this.synchronousPlan(hpkc003);
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
......@@ -149,6 +164,31 @@ public class ServiceHPKC003 extends ServiceBase {
}
return eiInfo;
}
/**
* 新增入库及删除入库单做同步计划订单
* @param hpkc003
*/
public void synchronousPlan(HPKC003 hpkc003) {
HPSC004 HPSC004 = (HPSC004) this.dao.get("HPSC004.queryDetail","productionOrderNo",hpkc003.getProductionOrderNo());
if (HPSC004 != null) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
BigDecimal actualCompletionNum = hpkc003.getAmount().add(HPSC004.getNum());
BigDecimal actualCompletionUnitWt = hpkc003.getWeight().add(HPSC004.getActualCompletionUnitWt());
HPSC004.setActualCompletionNum(actualCompletionNum);
HPSC004.setActualCompletionUnitWt(actualCompletionUnitWt);
HPSC004.setUpdatedBy(UserSession.getUserId());
HPSC004.setUpdatedTime(sdf.format(new Date()));
//计算是否生产完成
if (HPSC004.getNum().compareTo(actualCompletionNum) < 0
&& HPSC004.getUnitWt().compareTo(actualCompletionUnitWt) < 0) {
HPSC004.setActualCompletionDate(sdf.format(new Date()));
} else {
HPSC004.setActualCompletionDate("");
}
this.dao.update("HPSC004.update", HPSC004.toMap());
}
}
}
......@@ -81,7 +81,7 @@ public class ServiceHPKC004 extends ServiceBase {
fKc004.setReceiptDate(StringUtil.removeHorizontalLine(fKc004.getReceiptDate()));
// 仓库名称
fKc004.setWhName(HPPZTools.getPz007ByCode(fKc004.getWhCode()).getWhName());
// 物料名称
// 存货名称
fKc004.setInventName(HPPZTools.getPz004ByCode(fKc004.getInventCode()).getInventName());
// 生成销售单号
fKc004.setSaleNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC004_SALE_NO));
......@@ -112,7 +112,7 @@ public class ServiceHPKC004 extends ServiceBase {
fKc004.setReceiptDate(StringUtil.removeHorizontalLine(fKc004.getReceiptDate()));
// 仓库名称
fKc004.setWhName(HPPZTools.getPz007ByCode(fKc004.getWhCode()).getWhName());
// 物料名称
// 存货名称
fKc004.setInventName(HPPZTools.getPz004ByCode(fKc004.getInventCode()).getInventName());
DaoUtils.update("HPKC004.update", fKc004);
}
......
......@@ -201,7 +201,7 @@ public class ServiceHPKC005 extends ServiceBase {
fKc005.setReceiptDate(StringUtil.removeHorizontalLine(fKc005.getReceiptDate()));
// 仓库名称
fKc005.setWhName(HPPZTools.getPz007ByCode(fKc005.getWhCode()).getWhName());
// 物料名称
// 存货名称
fKc005.setInventName(HPPZTools.getPz004ByCode(fKc005.getInventCode()).getInventName());
// 差异数量
fKc005.setDiffAmount(fKc005.getEntityAmount().subtract(fKc005.getBookAmount()));
......
......@@ -175,7 +175,7 @@ public class ServiceHPKC006 extends ServiceBase {
fKc006.setReceiptDate(StringUtil.removeHorizontalLine(fKc006.getReceiptDate()));
// 仓库名称
fKc006.setWhName(HPPZTools.getPz007ByCode(fKc006.getWhCode()).getWhName());
// 物料名称
// 存货名称
fKc006.setInventName(HPPZTools.getPz004ByCode(fKc006.getInventCode()).getInventName());
}
......
......@@ -180,7 +180,7 @@ public class ServiceHPKC007 extends ServiceBase {
fKc007.setReceiptDate(StringUtil.removeHorizontalLine(fKc007.getReceiptDate()));
// 仓库名称
fKc007.setWhName(HPPZTools.getPz007ByCode(fKc007.getWhCode()).getWhName());
// 物料名称
// 存货名称
fKc007.setInventName(HPPZTools.getPz004ByCode(fKc007.getInventCode()).getInventName());
}
......
......@@ -71,7 +71,7 @@ public class ServiceHPKC008 extends ServiceBase {
fKc008.fromMap(resultRows.get(i));
// 去除日期字符串中的-
fKc008.setDateMonth(StringUtil.removeHorizontalLine(fKc008.getDateMonth()));
// 物料名称
// 存货名称
fKc008.setInventName(HPPZTools.getPz004ByCode(fKc008.getInventCode()).getInventName());
// 计算总金额
fKc008.setTotalPrice(fKc008.getAmount().multiply(fKc008.getPrice()));
......@@ -101,7 +101,7 @@ public class ServiceHPKC008 extends ServiceBase {
fKc008.fromMap(resultRows.get(i));
// 去除日期字符串中的-
fKc008.setDateMonth(StringUtil.removeHorizontalLine(fKc008.getDateMonth()));
// 物料名称
// 存货名称
fKc008.setInventName(HPPZTools.getPz004ByCode(fKc008.getInventCode()).getInventName());
// 计算总金额
fKc008.setTotalPrice(fKc008.getAmount().multiply(fKc008.getPrice()));
......
package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
/**
*
*/
public class ServiceHPKC099 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
HPSC005 HPSC005 = new HPSC005();
inInfo.set("inqu_status-0-status", "1");
EiInfo outInfo = super.initLoad(inInfo, HPSC005);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPSC005.eiMetadata);
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
inInfo.set("inqu_status-0-status", "1");
EiInfo outInfo = super.query(inInfo, "HPSC005.query", new HPSC005());
return outInfo;
}
}
......@@ -42,10 +42,10 @@
DOCUMENT_TIME as "documentTime", <!-- 单据日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
MATERIAL_TYPE as "materialType", <!-- 物料类型编码 -->
MATERIAL_TYPE_NAME as "materialTypeName", <!-- 物料类型名称 -->
MATERIAL_CODE as "materialCode", <!-- 物料编码 -->
MATERIAL_NAME as "materialName", <!-- 物料名称 -->
MATERIAL_TYPE as "materialType", <!-- 存货类型编码 -->
MATERIAL_TYPE_NAME as "materialTypeName", <!-- 存货类型名称 -->
MATERIAL_CODE as "materialCode", <!-- 存货编码 -->
MATERIAL_NAME as "materialName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
QUANTITY as "quantity", <!-- 数量 -->
......@@ -86,10 +86,10 @@
DOCUMENT_TIME, <!-- 单据日期 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
MATERIAL_TYPE, <!-- 物料类型编码 -->
MATERIAL_TYPE_NAME, <!-- 物料类型名称 -->
MATERIAL_CODE, <!-- 物料编码 -->
MATERIAL_NAME, <!-- 物料名称 -->
MATERIAL_TYPE, <!-- 存货类型编码 -->
MATERIAL_TYPE_NAME, <!-- 存货类型名称 -->
MATERIAL_CODE, <!-- 存货编码 -->
MATERIAL_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
UNIT, <!-- 单位 -->
QUANTITY, <!-- 数量 -->
......
......@@ -42,10 +42,10 @@
DOCUMENT_TIME as "documentTime", <!-- 单据日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
MATERIAL_TYPE as "materialType", <!-- 物料类型编码 -->
MATERIAL_TYPE_NAME as "materialTypeName", <!-- 物料类型名称 -->
MATERIAL_CODE as "materialCode", <!-- 物料编码 -->
MATERIAL_NAME as "materialName", <!-- 物料名称 -->
MATERIAL_TYPE as "materialType", <!-- 存货类型编码 -->
MATERIAL_TYPE_NAME as "materialTypeName", <!-- 存货类型名称 -->
MATERIAL_CODE as "materialCode", <!-- 存货编码 -->
MATERIAL_NAME as "materialName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
QUANTITY as "quantity", <!-- 数量 -->
......@@ -88,10 +88,10 @@
DOCUMENT_TIME, <!-- 单据日期 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
MATERIAL_TYPE, <!-- 物料类型编码 -->
MATERIAL_TYPE_NAME, <!-- 物料类型名称 -->
MATERIAL_CODE, <!-- 物料编码 -->
MATERIAL_NAME, <!-- 物料名称 -->
MATERIAL_TYPE, <!-- 存货类型编码 -->
MATERIAL_TYPE_NAME, <!-- 存货类型名称 -->
MATERIAL_CODE, <!-- 存货编码 -->
MATERIAL_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
UNIT, <!-- 单位 -->
QUANTITY, <!-- 数量 -->
......
......@@ -8,11 +8,12 @@
DEP_CODE as "depCode", <!-- 部门编码 -->
DOCUMENT_DATE as "documentDate", <!-- 单据日期 -->
PROD_NO as "prodNo", <!-- 生产入库单号 -->
PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 物料类型 -->
INVENT_CODE as "inventCode", <!-- 物料编码 -->
INVENT_NAME as "inventName", <!-- 物料名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
REMARK as "remark", <!-- 备注 -->
......@@ -34,6 +35,9 @@
<isNotEmpty prepend=" AND " property="prodNo">
PROD_NO = #prodNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo">
PRODUCTION_ORDER_NO = #productionOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
......@@ -64,13 +68,13 @@
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC003">
SELECT <include refid="column"/>
FROM hpjx.t_hpkc003 WHERE 1=1
FROM hpjx.t_hpkc003 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpkc003 WHERE 1=1
SELECT COUNT(*) FROM hpjx.t_hpkc003 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition"/>
</select>
......@@ -80,27 +84,31 @@
DEP_CODE, <!-- 部门编码 -->
DOCUMENT_DATE, <!-- 单据日期 -->
PROD_NO, <!-- 生产入库单号 -->
PROD_NO_OLD, <!-- 生产入库单号 -->
PRODUCTION_ORDER_NO, <!-- 生产订单号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 物料类型 -->
INVENT_CODE, <!-- 物料编码 -->
INVENT_NAME, <!-- 物料名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
REMARK, <!-- 备注 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
CREATED_TIME, <!-- 创建时间 -->
DELETE_FLAG
) VALUES (
#companyCode#, #depCode#, #documentDate#, #prodNo#, #whCode#, #whName#,
#companyCode#, #depCode#, #documentDate#, #prodNo#, #prodNoOld#, #productionOrderNo#, #whCode#, #whName#,
#inventType#, #inventCode#, #inventName#, #amount#, #weight#, #remark#,
#createdBy#, #createdName#, #createdTime#
#createdBy#, #createdName#, #createdTime#, 0
)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hpkc003 WHERE ID = #id#
</delete>
<update id="delete">
UPDATE ${hpjxSchema}.T_HPKC003
SET DELETE_FLAG = 1 WHERE ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPKC003
......@@ -111,9 +119,9 @@
PROD_NO = #prodNo#, <!-- 生产入库单号 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
INVENT_TYPE = #inventType#, <!-- 物料类型 -->
INVENT_CODE = #inventCode#, <!-- 物料编码 -->
INVENT_NAME = #inventName#, <!-- 物料名称 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
AMOUNT = #amount#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 -->
REMARK = #remark#, <!-- 备注 -->
......
......@@ -10,9 +10,9 @@
OTHER_ENTER_NO as "otherEnterNo", <!-- 其他入库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 物料类型 -->
INVENT_CODE as "inventCode", <!-- 物料编码 -->
INVENT_NAME as "inventName", <!-- 物料名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 规格 -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
......@@ -124,9 +124,9 @@
OTHER_ENTER_NO, <!-- 其他入库单号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 物料类型 -->
INVENT_CODE, <!-- 物料编码 -->
INVENT_NAME, <!-- 物料名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
INVENT_RECORD_ID, <!-- 规格 -->
AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
......@@ -154,9 +154,9 @@
RECEIPT_DATE = #receiptDate#, <!-- 单据日期 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
INVENT_TYPE = #inventType#, <!-- 物料类型 -->
INVENT_CODE = #inventCode#, <!-- 物料编码 -->
INVENT_NAME = #inventName#, <!-- 物料名称 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 规格 -->
AMOUNT = #amount#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 -->
......
......@@ -10,9 +10,9 @@
OTHER_OUTER_NO as "otherOuterNo", <!-- 其他出库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 物料类型 -->
INVENT_CODE as "inventCode", <!-- 物料编码 -->
INVENT_NAME as "inventName", <!-- 物料名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 规格 -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
......@@ -126,9 +126,9 @@
OTHER_OUTER_NO, <!-- 其他出库单号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 物料类型 -->
INVENT_CODE, <!-- 物料编码 -->
INVENT_NAME, <!-- 物料名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
INVENT_RECORD_ID, <!-- 规格 -->
AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
......
......@@ -7,9 +7,9 @@
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 物料类型 -->
INVENT_CODE as "inventCode", <!-- 物料编码 -->
INVENT_NAME as "inventName", <!-- 物料名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
......@@ -113,9 +113,9 @@
COMPANY_CODE, <!-- 企业编码 预留 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 物料类型 -->
INVENT_CODE, <!-- 物料编码 -->
INVENT_NAME, <!-- 物料名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
INVENT_RECORD_ID, <!-- 存货档案ID -->
AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
......
......@@ -31,7 +31,7 @@ public class HPPZ006 extends DaoEPBase {
public static final String FIELD_STATUS = "status"; /* 状态 0未启用 1启用*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_LENGTH = "length"; /* 长*/
public static final String FIELD_WIDE = "wide"; /* 宽*/
public static final String FIELD_WIDTH = "width"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/
public static final String FIELD_MATERIAL = "material"; /* 材质*/
public static final String FIELD_COEFFICIENT = "coefficient"; /* 系数*/
......@@ -52,7 +52,7 @@ public class HPPZ006 extends DaoEPBase {
public static final String COL_STATUS = "STATUS"; /* 状态 0未启用 1启用*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_LENGTH = "LENGTH"; /* 长*/
public static final String COL_WIDE = "WIDE"; /* 宽*/
public static final String COL_WIDTH = "WIDTH"; /* 宽*/
public static final String COL_THICK = "THICK"; /* 厚*/
public static final String COL_MATERIAL = "MATERIAL"; /* 材质*/
public static final String COL_COEFFICIENT = "COEFFICIENT"; /* 系数*/
......@@ -79,7 +79,7 @@ public class HPPZ006 extends DaoEPBase {
private Integer status = 1; /* 状态 0未启用 1启用*/
private String spec = " "; /* 规格*/
private BigDecimal length = new BigDecimal(0.00); /* 长*/
private BigDecimal wide = new BigDecimal(0.00); /* 宽*/
private BigDecimal width = new BigDecimal(0.00); /* 宽*/
private BigDecimal thick = new BigDecimal(0.00); /* 厚*/
private String material = " "; /* 材质*/
private BigDecimal coefficient = new BigDecimal(0.00); /* 系数*/
......@@ -137,7 +137,7 @@ public class HPPZ006 extends DaoEPBase {
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDE);
eiColumn = new EiColumn(FIELD_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
......@@ -345,20 +345,20 @@ public class HPPZ006 extends DaoEPBase {
this.length = length;
}
/**
* get the wide - 宽.
* @return the wide
* get the width - 宽.
* @return the width
*/
public BigDecimal getWide() {
return this.wide;
public BigDecimal getWidth() {
return this.width;
}
/**
* set the wide - 宽.
* set the width - 宽.
*
* @param wide - 宽
* @param width - 宽
*/
public void setWide(BigDecimal wide) {
this.wide = wide;
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* get the thick - 厚.
......@@ -537,7 +537,7 @@ public class HPPZ006 extends DaoEPBase {
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_LENGTH)), length));
setWide(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDE)), wide));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setMaterial(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MATERIAL)), material));
setCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COEFFICIENT)), coefficient));
......@@ -566,7 +566,7 @@ public class HPPZ006 extends DaoEPBase {
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_LENGTH, StringUtils.toString(length, eiMetadata.getMeta(FIELD_LENGTH)));
map.put(FIELD_WIDE, StringUtils.toString(wide, eiMetadata.getMeta(FIELD_WIDE)));
map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_MATERIAL, StringUtils.toString(material, eiMetadata.getMeta(FIELD_MATERIAL)));
map.put(FIELD_COEFFICIENT, StringUtils.toString(coefficient, eiMetadata.getMeta(FIELD_COEFFICIENT)));
......
......@@ -12,7 +12,7 @@
STATUS as "status", <!-- 状态 0未启用 1启用 -->
SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长 -->
WIDE as "wide", <!-- 宽 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
MATERIAL as "material", <!-- 材质 -->
COEFFICIENT as "coefficient", <!-- 系数 -->
......@@ -87,7 +87,7 @@
STATUS, <!-- 状态 0未启用 1启用 -->
SPEC, <!-- 规格 -->
LENGTH, <!-- 长 -->
WIDE, <!-- 宽 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
MATERIAL, <!-- 材质 -->
COEFFICIENT, <!-- 系数 -->
......@@ -97,7 +97,7 @@
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #depCode#, #inventType#, #inventCode#, #inventName#,
#status#, #spec#, #length#, #wide#, #thick#, #material#, #coefficient#,
#status#, #spec#, #length#, #width#, #thick#, #material#, #coefficient#,
#unit#, #createdBy#, #createdName#, #createdTime#
)
</insert>
......@@ -113,7 +113,7 @@
STATUS = #status#, <!-- 状态 0未启用 1启用 -->
SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 -->
WIDE = #wide#, <!-- 宽 -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 -->
MATERIAL = #material#, <!-- 材质 -->
COEFFICIENT = #coefficient#, <!-- 系数 -->
......
......@@ -112,7 +112,7 @@ public class HPSC004 extends DaoEPBase {
private String icon = " "; /* 图片地址*/
private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/
private Integer num = new Integer(0); /* 数量*/
private BigDecimal num = new BigDecimal(0.000); /* 数量*/
private BigDecimal unitWt = new BigDecimal(0.000); /* 单重*/
private BigDecimal totalWt = new BigDecimal(0.000); /* 总重*/
private String filePath1 = " "; /* 文件地址1*/
......@@ -123,8 +123,8 @@ public class HPSC004 extends DaoEPBase {
private String planCommentDate = " "; /* 计划开始时间*/
private String planCompletionDate = " "; /* 计划结束时间*/
private String actualCompletionDate = " "; /* 实际完工日期*/
private Integer actualCompletionNum = new Integer(0); /* 实际完工数量*/
private BigDecimal actualCompletionUnitWt = new BigDecimal("0"); /* 实际完工重量*/
private BigDecimal actualCompletionNum = new BigDecimal(0.000); /* 实际完工数量*/
private BigDecimal actualCompletionUnitWt = new BigDecimal(0.000); /* 实际完工重量*/
private String productionOrderNo = " "; /* 生产订单号*/
private Integer status = new Integer(0); /* 状态 0-未审核,1-已审核*/
private Integer delStatus = new Integer(0); /* 状态 1未删除,0已删除*/
......@@ -508,7 +508,7 @@ public class HPSC004 extends DaoEPBase {
* get the num - 数量.
* @return the num
*/
public Integer getNum() {
public BigDecimal getNum() {
return this.num;
}
......@@ -517,7 +517,7 @@ public class HPSC004 extends DaoEPBase {
*
* @param num - 数量
*/
public void setNum(Integer num) {
public void setNum(BigDecimal num) {
this.num = num;
}
/**
......@@ -684,7 +684,7 @@ public class HPSC004 extends DaoEPBase {
* get the actualCompletionNum - 实际完工数量.
* @return the actualCompletionNum
*/
public Integer getActualCompletionNum() {
public BigDecimal getActualCompletionNum() {
return this.actualCompletionNum;
}
......@@ -693,7 +693,7 @@ public class HPSC004 extends DaoEPBase {
*
* @param actualCompletionNum - 实际完工数量
*/
public void setActualCompletionNum(Integer actualCompletionNum) {
public void setActualCompletionNum(BigDecimal actualCompletionNum) {
this.actualCompletionNum = actualCompletionNum;
}
/**
......@@ -861,7 +861,7 @@ public class HPSC004 extends DaoEPBase {
setIcon(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ICON)), icon));
setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_CODE)), prdtCode));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName));
setNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_NUM)), num));
setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_NUM)), num));
setUnitWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_WT)), unitWt));
setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_WT)), totalWt));
setFilePath1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH1)), filePath1));
......@@ -872,7 +872,7 @@ public class HPSC004 extends DaoEPBase {
setPlanCommentDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_COMMENT_DATE)), planCommentDate));
setPlanCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_COMPLETION_DATE)), planCompletionDate));
setActualCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_DATE)), actualCompletionDate));
setActualCompletionNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_NUM)), actualCompletionNum));
setActualCompletionNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_NUM)), actualCompletionNum));
setActualCompletionUnitWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_UNIT_WT)), actualCompletionUnitWt));
setProductionOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCTION_ORDER_NO)), productionOrderNo));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
......
......@@ -85,7 +85,7 @@ public class HPSC005 extends DaoEPBase {
private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/
private String planCompletionDate = " "; /* 计划完成日期*/
private Integer num = new Integer(0); /* 计划数量*/
private BigDecimal num = new BigDecimal(0.000); /* 计划数量*/
private BigDecimal totalWt = new BigDecimal(0.000); /* 计划重量*/
private Integer status = new Integer(0); /* 状态 0-未派工,1-已派工*/
private String orgNo = " "; /* 生产组编码*/
......@@ -347,7 +347,7 @@ public class HPSC005 extends DaoEPBase {
* get the num - 计划数量.
* @return the num
*/
public Integer getNum() {
public BigDecimal getNum() {
return this.num;
}
......@@ -356,7 +356,7 @@ public class HPSC005 extends DaoEPBase {
*
* @param num - 计划数量
*/
public void setNum(Integer num) {
public void setNum(BigDecimal num) {
this.num = num;
}
/**
......@@ -616,7 +616,7 @@ public class HPSC005 extends DaoEPBase {
setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_CODE)), prdtCode));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName));
setPlanCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_COMPLETION_DATE)), planCompletionDate));
setNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_NUM)), num));
setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_NUM)), num));
setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_WT)), totalWt));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setOrgNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NO)), orgNo));
......
......@@ -39,7 +39,7 @@ public class THPSC002 extends DaoEPBase {
private String icon = " "; /* 图片地址*/
private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/
private Integer num = Integer.valueOf(0); /* 数量*/
private BigDecimal num = new BigDecimal(0.000); /* 数量*/
private BigDecimal unitWt = new BigDecimal(0.000); /* 单重*/
private BigDecimal totalWt = new BigDecimal(0.000); /* 总重*/
private String filePath1 = " "; /* 文件地址1*/
......@@ -389,14 +389,14 @@ public class THPSC002 extends DaoEPBase {
* get the num - 数量
* @return the num
*/
public Integer getNum() {
public BigDecimal getNum() {
return this.num;
}
/**
* set the num - 数量
*/
public void setNum(Integer num) {
public void setNum(BigDecimal num) {
this.num = num;
}
......@@ -628,7 +628,7 @@ public class THPSC002 extends DaoEPBase {
setIcon(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("icon")), icon));
setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtCode")), prdtCode));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtName")), prdtName));
setNum(NumberUtils.toInteger(StringUtils.toString(map.get("num")), num));
setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get("num")), num));
setUnitWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get("unitWt")), unitWt));
setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get("totalWt")), totalWt));
setFilePath1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("filePath1")), filePath1));
......
......@@ -69,7 +69,7 @@ public class ServiceHPSC002 extends ServiceBase {
hppz002.fromMap(map);
hppz002.setLeaf("1");
// 计算总重
BigDecimal num = new BigDecimal(hppz002.getNum());
BigDecimal num = hppz002.getNum();
BigDecimal unitWt = hppz002.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue())));
......@@ -325,7 +325,7 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC004.setParentPrdtName(StringUtils.toString(domain.get("parentPrdtName")));
HPSC004.setPrdtCode(StringUtils.toString(domain.get("prdtCode")));
HPSC004.setPrdtName(StringUtils.toString(domain.get("prdtName")));
HPSC004.setNum(NumberUtils.toInteger(domain.get("num")));
HPSC004.setNum(NumberUtils.toBigDecimal(domain.get("num")));
HPSC004.setUnitWt(NumberUtils.toBigDecimal(domain.get("unitWt")));
HPSC004.setFilePath1(StringUtils.toString(domain.get("filePath1")));
HPSC004.setFilePath2(StringUtils.toString(domain.get("filePath2")));
......@@ -334,8 +334,8 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC004.setFilePath5(StringUtils.toString(domain.get("filePath5")));
HPSC004.setPlanCommentDate("");
HPSC004.setPlanCompletionDate("");
HPSC004.setActualCompletionNum(0);
HPSC004.setActualCompletionUnitWt(null);
HPSC004.setActualCompletionNum(NumberUtils.toBigDecimal(0.00));
HPSC004.setActualCompletionUnitWt(NumberUtils.toBigDecimal(0.00));
HPSC004.setActualCompletionDate("");
HPSC004.setDelStatus(1);
HPSC004.setCreatedBy(UserSession.getUserId());
......
......@@ -130,7 +130,7 @@ public class ServiceHPSC004 extends ServiceBase {
//添加返回到前台的块,块名和前台的对应
EiBlock eiBlock = outInfo.addBlock("result");
HashMap params = new HashMap();
params.put("projCode",inInfo.get("projCode"));
params.put("parentPrdtCode",inInfo.get("parentPrdtCode"));
List list = dao.query("HPSC004.queryDetail",params,0,-999999);
outInfo.addBlock("detail").addBlockMeta(HPSC004.eiMetadata);
outInfo.addBlock("detail").addRows(list);
......
......@@ -44,7 +44,7 @@
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
PROJ_NAME LIKE ('%$#projName#$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
......
......@@ -75,10 +75,10 @@
PARENT_PRDT_CODE = #parentPrdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME LIKE CONCAT('%',CONCAT( #prdtName#,'%'))
PRDT_NAME LIKE ('%$#prdtName#$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE CONCAT('%',CONCAT( #projName#,'%'))
PROJ_NAME LIKE ('%$#projName#$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
......
......@@ -37,7 +37,7 @@
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
PROJ_NAME LIKE ('%$#projName#$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planInfoNo">
PLAN_INFO_NO = #planInfoNo#
......
......@@ -119,6 +119,9 @@
<isNotEmpty prepend=" AND " property="actualCompletionUnitWt">
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo">
PRODUCTION_ORDER_NO = #productionOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
......@@ -427,18 +430,10 @@
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark" <!-- 备注 -->
REMARK as "remark", <!-- 备注 -->
PRODUCTION_ORDER_NO as productionOrderNo
FROM hpjx.T_HPSC004 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="inspectDetail" resultClass="int">
......@@ -447,4 +442,15 @@
OR PLAN_COMPLETION_DATE = '' OR PLAN_COMPLETION_DATE IS NULL )
</select>
<update id="updateRK">
UPDATE hpjx.T_HPSC004
SET
ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#, <!-- 实际完工重量 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
......@@ -44,7 +44,7 @@
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
PROJ_NAME LIKE ('%$#projName#$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
......
......@@ -11,7 +11,7 @@
<div class="row">
<EF:EFDatePicker ename="inqu_status-0-documentTime" cname="单据日期" format="yyyy-MM-dd" required="true"/>
<EF:EFInput ename="inqu_status-0-documentCode" cname="采购入库单号" colWidth="4" readonly="false"/>
<EF:EFSelect cname="物料类型" blockId="inqu_status" ename="materialType" row="0" colWidth="3">
<EF:EFSelect cname="存货类型" blockId="inqu_status" ename="materialType" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFSelect>
......@@ -22,7 +22,7 @@
<EF:EFOption label="请选择" value=""></EF:EFOption>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-materialCode" cname="物料名称"
<EF:EFSelect ename="inqu_status-0-materialCode" cname="存货名称"
valueTemplate="#=textField#" filter="contains"
required="false" defultValue="ALL"
template="#=textField#">
......@@ -37,13 +37,13 @@
<EF:EFColumn ename="id" cname="主键id" hidden="true"/>
<EF:EFColumn ename="documentTime" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" width="100" required="true"/>
<EF:EFColumn ename="documentCode" cname="采购入库单号" width="100" readonly="false" align="center" required="false" enable="false" />
<EF:EFComboColumn ename="materialType" cname="物料类型" width="90" align="center">
<EF:EFComboColumn ename="materialType" cname="存货类型" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="whName" cname="仓库名称" width="100" readonly="false" hidden="true"/>
<EF:EFColumn ename="materialCode" cname="物料名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="materialName" cname="物料名称" width="100" readonly="false" hidden="true"/>
<EF:EFColumn ename="materialCode" cname="存货名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="materialName" cname="存货名称" width="100" readonly="false" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="unit" cname="单位" width="80" readonly="false" align="center" enable="false" required="true"/>
<EF:EFColumn ename="quantity" cname="数量" width="80" defaultValue="0" data-regex="/^[0-9]\\\d*$/" data-errorprompt="请输入正整数" readonly="false" align="right" required="true"/>
......
......@@ -11,7 +11,7 @@
<div class="row">
<EF:EFDatePicker ename="inqu_status-0-documentTime" cname="单据日期" format="yyyy-MM-dd" required="true"/>
<EF:EFInput ename="inqu_status-0-documentCode" cname="生产领料单号" colWidth="4" readonly="false"/>
<EF:EFSelect cname="物料类型" blockId="inqu_status" ename="materialType" row="0" colWidth="3">
<EF:EFSelect cname="存货类型" blockId="inqu_status" ename="materialType" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFSelect>
......@@ -22,7 +22,7 @@
<EF:EFOption label="请选择" value=""></EF:EFOption>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-materialCode" cname="物料名称"
<EF:EFSelect ename="inqu_status-0-materialCode" cname="存货名称"
valueTemplate="#=textField#" filter="contains"
required="false" defultValue="ALL"
template="#=textField#">
......@@ -37,13 +37,13 @@
<EF:EFColumn ename="id" cname="主键id" hidden="true"/>
<EF:EFColumn ename="documentTime" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" width="100" required="true"/>
<EF:EFColumn ename="documentCode" cname="生产领料单号" width="100" readonly="false" align="center" required="false" enable="false" />
<EF:EFComboColumn ename="materialType" cname="物料类型" width="90" align="center">
<EF:EFComboColumn ename="materialType" cname="存货类型" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="whName" cname="仓库名称" width="100" readonly="false" hidden="true"/>
<EF:EFColumn ename="materialCode" cname="物料名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="materialName" cname="物料名称" width="100" readonly="false" hidden="true"/>
<EF:EFColumn ename="materialCode" cname="存货名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="materialName" cname="存货名称" width="100" readonly="false" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="unit" cname="单位" width="80" readonly="false" align="center" enable="false" required="true"/>
<EF:EFColumn ename="quantity" cname="数量" width="80" defaultValue="0" data-regex="/^[0-9]\\\d*$/" data-errorprompt="请输入正整数" readonly="false" align="right" required="true"/>
......
......@@ -3,6 +3,8 @@ $(function () {
$("#QUERY").on("click", query);
$("#GENERATE").on("click", generate);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
......@@ -62,7 +64,7 @@ $(window).load(function () {
onFail: function (ei) {
}
}, {async: false});
// 查
// 查
query();
});
......@@ -72,3 +74,41 @@ $(window).load(function () {
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 选择生产订单
*/
let generate = function () {
JSColorbox.open({
href: "HPKC099?methodName=initLoad",
title: "<div style='text-align: center;'>生产订单查询</div>",
width: "80%",
height: "80%",
callbackName: productionOrderQueryCallback
});
}
/**
* 生产订单回调方法
*
* @param rowDatas
* @param win
*/
let productionOrderQueryCallback = function (row) {
console.log(row)
var lists = [];// new Array();
// 增加一个元素
for (var i = 0; i < row.length; i++) {
resultGrid.dataSource.insert();
var rowsdata = resultGrid.getCheckedRows();
resultGrid.setCellValue(0, "productionOrderNo", row[i]["productionOrderNo"]);
resultGrid.setCellValue(0, "amount", row[i]["numRK"]);
resultGrid.setCellValue(0, "weight", row[i]["totalWtRK"]);
lists[i] = i;
}
resultGrid.setCheckedRows(lists);
// 关闭弹窗
JSColorbox.close();
}
......@@ -26,6 +26,7 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="prodNo" cname="生产入库单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="documentDate" cname="单据日期" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn cname="仓库名称" ename="whCode" columnTemplate="#=textField#"
......@@ -37,9 +38,9 @@
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn cname="存货名称" ename="inventCode" width="120" align="center"/>
<EF:EFColumn cname="数量" ename="amount" width="100" align="right" format="{0:N3}"
<EF:EFColumn cname="数量" ename="amount" width="100" align="right" format="{0:N3}" enable="false"
sumType="all"/>
<EF:EFColumn cname="重量" ename="weight" width="100" align="right" format="{0:N3}"
<EF:EFColumn cname="重量" ename="weight" width="100" align="right" format="{0:N3}" enable="false"
sumType="all"/>
<EF:EFColumn ename="remark" cname="备注" width="150" editType="textarea"/>
<EF:EFColumn cname="创建人名称" ename="createdName" enable="false" width="120" align="center"/>
......
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
$("#GENERATE").on("click", generateRK);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
}
});
/**
* 生产入库单
*/
let generateRK = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"取消\"操作? ", {
ok: function () {
parent.JSColorbox.setValueCallback(rows);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="生产订单">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="projType" cname="生产订单号:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="projType" cname="生产组:" row="0"/>
</div>
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目号" />
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFColumn enable="false" ename="productionOrderNo" cname="生产订单号"/>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码"/>
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称"/>
<EF:EFColumn enable="false" ename="planCompletionDate" cname="计划完成日期"/>
<EF:EFColumn ename="numRK" cname="入库数量" format="{0:N3}"/>
<EF:EFColumn ename="totalWtRK" cname="入库重量" format="{0:N3}"/>
<EF:EFColumn enable="false" ename="num" cname="计划数量"/>
<EF:EFColumn enable="false" ename="totalWt" cname="计划重量"/>
<EF:EFColumn enable="false" ename="orgName" cname="生产组"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/SC/HPKC099.js"></script>
\ No newline at end of file
......@@ -15,7 +15,7 @@ $(function() {
return options.length == 0 ? "-" : options.length;
}
}, {
field: "wide",
field: "width",
template: function (options) {
return options.length == 0 ? "-" : options.length;
}
......
......@@ -32,7 +32,7 @@
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" requird="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" maxLength="50"/>
<EF:EFColumn ename="length" cname="长" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="wide" cname="宽" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="material" cname="材质" width="100" align="center" required="true"/>
<EF:EFColumn ename="coefficient" cname="系数" width="100" align="right" format="{0:N2}" maxLength="10"/>
......
......@@ -36,8 +36,8 @@ $(function () {
detailGrid.setEiBlock(block);
}
var info = new EiInfo()
var projCode = e.model['projCode'];
info.set("projCode",projCode);
var parentPrdtCode = e.model['id'];
info.set("parentPrdtCode",parentPrdtCode);
EiCommunicator.send("HPSC004","queryDetail",info,{
onSuccess:function(ei){//返回结果集
detailGrid.setEiInfo(ei);
......
......@@ -13,7 +13,7 @@
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="projName" cname="生产计划单号:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="planInfoNo" cname="生产计划单号:" row="0"/>
<EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期"
format="yyyy-MM-dd" required="true"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0">
......@@ -32,7 +32,7 @@
<EF:EFColumn enable="false" ename="planInfoNo" cname="生产计划单号" readonly="true"/>
<EF:EFColumn enable="false" ename="prdtCode" cname="产品编码" readonly="true"/>
<EF:EFColumn enable="false" ename="prdtName" cname="产品名称" readonly="true"/>
<EF:EFColumn enable="false" ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150"
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150"
required='true'/>
<EF:EFColumn enable="false" ename="schedule" cname="生产完工进度" format="{0:N2}" readonly="true"/>
<EF:EFComboColumn enable="false" ename="status" cname="状态">
......
......@@ -25,16 +25,16 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projType" required='true' cname="项目类型"/>
<EF:EFColumn required="true" ename="projCode" cname="项目编码"/>
<EF:EFColumn required="true" ename="projName" cname="项目名称"/>
<EF:EFColumn required="true" ename="princ1" cname="本公司项目负责人"/>
<EF:EFColumn required="true" ename="princ2" cname="客户项目负责人"/>
<EF:EFComboColumn required="true" align="center" ename="status" cname="状态">
<EF:EFColumn ename="projType" enable="false" cname="项目类型"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFColumn enable="false" ename="princ1" cname="本公司项目负责人"/>
<EF:EFColumn enable="false" ename="princ2" cname="客户项目负责人"/>
<EF:EFComboColumn enable="false" align="center" ename="status" cname="状态">
<EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="已审核" value="1"/>
</EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注"/>
<EF:EFColumn enable="false" ename="remark" cname="备注"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
......
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