Commit f4242a56 by 江和松

1.报错刷新页面bug修改

parent 79986f58
......@@ -359,6 +359,9 @@
<isNotEmpty prepend=" AND " property="parInventType">
b.PAR_INVENT_TYPE = #parInventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
a.INVENT_NAME = #inventName#
</isNotEmpty>
ORDER BY INVENT_CODE
</select>
......
......@@ -39,6 +39,7 @@ public class HGSC004A extends DaoEPBase {
public static final String FIELD_product_code = "productCode"; /* 产品编号*/
public static final String FIELD_product_name = "productName"; /* 产品名称*/
public static final String FIELD_product_type = "productType"; /* 产品type*/
public static final String FIELD_invent_type = "inventType"; /* 档案类型*/
public static final String FIELD_product_status = "productStatus"; /* 产品状态 0:未提交,1:已提交*/
public static final String FIELD_change_type = "changeType"; /* 变更类型:默认0,1:增加,2:替换,3:删除*/
public static final String FIELD_quantity = "quantity"; /* 数量*/
......@@ -70,6 +71,7 @@ public class HGSC004A extends DaoEPBase {
public static final String COL_product_code = "product_code"; /* 产品编号*/
public static final String COL_product_name = "product_name"; /* 产品名称*/
public static final String COL_product_type = "product_type"; /* 产品类型*/
public static final String COL_invent_type = "invent_type"; /* 档案类型*/
public static final String COL_product_status = "product_status"; /* 产品状态 0:未提交,1:已提交*/
public static final String COL_change_type = "change_type"; /* 变更类型:默认0,1:增加,2:替换,3:删除*/
public static final String COL_quantity = "quantity"; /* 数量*/
......@@ -116,6 +118,7 @@ public class HGSC004A extends DaoEPBase {
private String productCode = " "; /* 产品编号*/
private String productName = " "; /* 产品名称*/
private String productType = " "; /* 产品id*/
private String inventType = " "; /* 档案类型*/
private Integer productStatus = new Integer(0); /* 产品状态 0:未提交,1:已提交*/
private Integer changeType = new Integer(0); /* 变更类型:默认0,1:增加,2:替换,3:删除*/
private Integer quantity = new Integer(0); /* 数量*/
......@@ -226,6 +229,11 @@ public class HGSC004A extends DaoEPBase {
eiColumn.setDescName("产品类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_invent_type);
eiColumn.setFieldLength(32);
eiColumn.setDescName("档案类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_status);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
......@@ -770,6 +778,14 @@ public class HGSC004A extends DaoEPBase {
this.finishDate = finishDate;
}
public String getInventType() {
return inventType;
}
public void setInventType(String inventType) {
this.inventType = inventType;
}
/**
* get the value from Map.
*
......@@ -795,6 +811,7 @@ public class HGSC004A extends DaoEPBase {
setProductName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_product_name)), productName));
setProductId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_product_id)), productId));
setProductType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_product_type)), productType));
setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_invent_type)), inventType));
setProductStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_product_status)), productStatus));
setChangeType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_change_type)), changeType));
setQuantity(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_quantity)), quantity));
......@@ -833,7 +850,8 @@ public class HGSC004A extends DaoEPBase {
map.put(FIELD_product_code, StringUtils.toString(productCode, eiMetadata.getMeta(FIELD_product_code)));
map.put(FIELD_product_name, StringUtils.toString(productName, eiMetadata.getMeta(FIELD_product_name)));
map.put(FIELD_product_id, StringUtils.toString(productId, eiMetadata.getMeta(FIELD_product_id)));
map.put(FIELD_product_type, StringUtils.toString(productName, eiMetadata.getMeta(FIELD_product_type)));
map.put(FIELD_product_type, StringUtils.toString(productType, eiMetadata.getMeta(FIELD_product_type)));
map.put(FIELD_invent_type, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_invent_type)));
map.put(FIELD_product_status, StringUtils.toString(productStatus, eiMetadata.getMeta(FIELD_product_status)));
map.put(FIELD_change_type, StringUtils.toString(changeType, eiMetadata.getMeta(FIELD_change_type)));
map.put(FIELD_quantity, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_quantity)));
......
......@@ -130,49 +130,30 @@ public class ServiceHGSC004A extends ServiceBase {
hgsc004a.setLeaf(1);
}
this.checkSaveData(hgsc004a,hgsc003);
//蓝图信息,用于蓝图状态校验
HGSC004A flowHGSC004A = (HGSC004A) super.dao.get(HGSC004A.QUERY_TECHFLOW_ID_BY_PRODUCTID,HGSC004A.FIELD_product_id,hgsc004a.getProductId());
if(Objects.nonNull(hgsc004a.getId())&&hgsc004a.getId()!=0){
if(hgsc004.getMaterialStatus().intValue() == HGConstant.MaterialStatus.QBTJ){
hgsc004a.setChangeType(HGConstant.ChangeType.TH);
}
DaoUtils.update(HGSC004A.UPDATE, hgsc004a);
//子表
HGSC005A hgsc005a = new HGSC005A();
BeanUtil.copyProperties(hgsc004a,hgsc005a,"id","productType");
hgsc005a.setMatDetailId(hgsc004a.getId());
hgsc005a.setMatId(hgsc004.getId());
hgsc005a.setTechFlowId(flowHGSC004A.getTechFlowId());
hgsc005a.setFinishDate(hgsc004.getFinishDate());
if(hgsc004a.getLv().intValue() == 3){
hgsc005a.setProductType(ProductTypeEnum.STRUCT.getCode());
hgsc004a.setProductType(ProductTypeEnum.STRUCT.getCode().toString());
}else{
hgsc005a.setProductType(ProductTypeEnum.PART.getCode());
hgsc004a.setProductType(ProductTypeEnum.PART.getCode().toString());
}
HGSCTools.THGSC005A.update(hgsc005a);
}else {
if(hgsc004.getMaterialStatus().intValue() == HGConstant.MaterialStatus.QBTJ){
hgsc004a.setChangeType(HGConstant.ChangeType.ZJ);
}
DaoUtils.update(HGSC004A.UPDATE, hgsc004a);
}else {
hgsc004a.setProductStatus(HGConstant.ProductStatus.WTJ);
Map<String,Object> mapA = new HashMap<>();
Long maxID = (Long) dao.query(HGSC004A.MAX_ID,mapA, 0, -999999).get(0);
hgsc004a.setId(maxID+1);
DaoUtils.insert(HGSC004A.INSERT, hgsc004a);
//子表
HGSC005A hgsc005a = new HGSC005A();
BeanUtil.copyProperties(hgsc004a,hgsc005a,"id","productType");
hgsc005a.setMatDetailId(hgsc004a.getId());
hgsc005a.setMatId(hgsc004.getId());
hgsc005a.setTechFlowId(flowHGSC004A.getTechFlowId());
hgsc005a.setFinishDate(flowHGSC004A.getFinishDate());
if(hgsc004.getMaterialStatus().intValue() == HGConstant.MaterialStatus.QBTJ){
if(hgsc004a.getLv().intValue() == 3){
hgsc005a.setProductType(ProductTypeEnum.STRUCT.getCode());
hgsc004a.setProductType(ProductTypeEnum.STRUCT.getCode().toString());
}else{
hgsc005a.setProductType(ProductTypeEnum.PART.getCode());
hgsc004a.setProductType(ProductTypeEnum.PART.getCode().toString());
}
HGSCTools.THGSC005A.save(hgsc005a);
}
DaoUtils.insert(HGSC004A.INSERT, hgsc004a);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
......
......@@ -92,7 +92,7 @@
updated_name as "updatedName", <!-- 修改人名称 -->
updated_time as "updatedTime" <!-- 更新时间 -->
FROM ${hggpSchema}.HGSC004
WHERE 1=1
WHERE 1=1 AND del_status = 0
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
......
......@@ -17,6 +17,7 @@
product_type as "productType", <!-- 产品类别 -->
product_code as "productCode", <!-- 产品编号 -->
product_name as "productName", <!-- 产品名称 -->
invent_type as "inventType", <!-- 档案类型 -->
product_status as "productStatus", <!-- 产品状态 0:未提交,1:已提交 -->
change_type as "changeType", <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity as "quantity", <!-- 数量 -->
......@@ -77,6 +78,9 @@
<isNotEmpty prepend=" AND " property="changeType">
change_type = #changeType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
invent_type = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
quantity = #quantity#
</isNotEmpty>
......@@ -173,6 +177,7 @@
a.product_type as "productType", <!-- 产品类别 -->
a.product_code as "productCode", <!-- 产品编号 -->
a.product_name as "productName", <!-- 产品名称 -->
a.invent_type as "inventType", <!-- 档案类型 -->
a.product_status as "productStatus", <!-- 产品状态 0:未提交,1:已提交 -->
a.change_type as "changeType", <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
a.quantity as "quantity", <!-- 数量 -->
......@@ -249,6 +254,7 @@
product_type, <!-- 产品类别 -->
product_code, <!-- 产品编号 -->
product_name, <!-- 产品名称 -->
invent_type, <!-- 档案类型 -->
product_status, <!-- 产品状态 0:未提交,1:已提交 -->
change_type, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity, <!-- 数量 -->
......@@ -265,7 +271,7 @@
)
VALUES (#id#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#,
#parentProdCode#, #parentProdName#,#leaf#,#sort#,#lv#, #materialId#, #productId#,#productType#,
#productCode#, #productName#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #totalWeight#,
#productCode#, #productName#,#inventType#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #totalWeight#,
#approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#)
</insert>
......@@ -293,6 +299,7 @@
product_type = #productType#, <!-- 产品类别 -->
product_code = #productCode#, <!-- 产品编号 -->
product_name = #productName#, <!-- 产品名称 -->
invent_type = #inventType#, <!-- 档案类型 -->
product_status = #productStatus#, <!-- 产品状态 0:未提交,1:已提交 -->
change_type = #changeType#, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity = #quantity#, <!-- 数量 -->
......@@ -330,6 +337,7 @@
SELECT
PRODUCT_CODE as "nodeId",
product_id as "productId", <!-- 产品id -->
invent_type as "inventType", <!-- 档案类型 -->
product_type as "productType", <!-- 产品类别 -->
PRODUCT_CODE as "productCode", <!-- 产品编码 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
......
......@@ -160,10 +160,7 @@ let save = function (btnNode) {
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC003", "save", true,
function (e) {
query();
});
JSUtils.submitGridsData("result", "HGSC003", "save", true);
btnNode.attr("disabled", false);
}
});
......
......@@ -103,7 +103,8 @@ let save = function (btnNode) {
if(flag) {
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("result", "HGSC003A", "save",{onSuccessCallback:saveCallBack} );
JSUtils.submitGridsData("result", "HGSC003A", "save", true);
btnNode.attr("disabled", false);
}
});
}
......@@ -136,7 +137,7 @@ function showUploadFile(id) {
JSColorbox.open({
href: "HGSC003B?methodName=initLoad&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件详情</div>",
width: "80%",
width: "90%",
height: "80%",
});
}
......@@ -54,8 +54,8 @@ function uploadFile(id) {
JSColorbox.open({
href: "HGSC003C?methodName=initLoad&inqu_status-0-matId="+$("#inqu_status-0-matId").val(),
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
width: "90%",
height: "80%",
callbackName: uploadFileCallback
});
}
......
......@@ -204,10 +204,7 @@ let save = function (btnNode) {
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC004", "save", true,
function (e) {
query();
});
JSUtils.submitGridsData("result", "HGSC004", "save", true);
btnNode.attr("disabled", false);
}
});
......
......@@ -62,7 +62,7 @@ $(function () {
if (nodeData.lv == 2) {
eiInfo.set("inqu_status-0-parInventType", "root");
} else if (nodeData.lv == 3) {
eiInfo.set("inqu_status-0-parInventType", nodeData.productType);
eiInfo.set("inqu_status-0-parInventType", nodeData.inventType);
}
var dataSource;
EiCommunicator.send("HGSC004A", "queryProductComboBox", eiInfo, {
......@@ -122,7 +122,7 @@ $(function () {
if(item.productCode === productCodeBox[i]['valueField']){
item['productName'] = productCodeBox[i]['textField'];
item['productId'] = productCodeBox[i]['param1Field'];
item['productType'] = productCodeBox[i]['param2Field'];
item['inventType'] = productCodeBox[i]['param2Field'];
console.log(item)
template = productCodeBox[i]['valueField'];
}
......@@ -137,10 +137,10 @@ $(function () {
if (nodeData.lv == 2) {
inInfo.set("inqu_status-0-parInventType", "root");
} else if (nodeData.lv == 3) {
inInfo.set("inqu_status-0-parInventType", nodeData.productType);
inInfo.set("inqu_status-0-parInventType", nodeData.inventType);
}else if (nodeData.lv == 4) {
//上方刷新过树结构了
inInfo.set("inqu_status-0-parInventType", nodeData.productType);
inInfo.set("inqu_status-0-parInventType", nodeData.inventType);
}
inInfo.set("field", options.field);
let dataSource = inventNameGlobalData;
......@@ -188,7 +188,7 @@ $(function () {
// 判断父级节点是否发生变化
if (e.field == "productCode") {
loadChange(grid,e,"productId");
loadChange(grid,e,"productType");
loadChange(grid,e,"inventType");
loadChange(grid,e,"productName");
}
});
......@@ -479,7 +479,7 @@ let setTreeNodeValue = function (nodeData) {
IPLATUI.EFTree.materialTree.selectTreeNode.nodeId = nodeData.nodeId;
IPLATUI.EFTree.materialTree.selectTreeNode.pId = nodeData.pId;
IPLATUI.EFTree.materialTree.selectTreeNode.pName = nodeData.pName;
IPLATUI.EFTree.materialTree.selectTreeNode.productType = nodeData.productType;
IPLATUI.EFTree.materialTree.selectTreeNode.inventType = nodeData.inventType;
IPLATUI.EFTree.materialTree.selectTreeNode.productCode = nodeData.productCode;
IPLATUI.EFTree.materialTree.selectTreeNode.productName = nodeData.productName;
IPLATUI.EFTree.materialTree.selectTreeNode.projCode = nodeData.projCode;
......@@ -500,10 +500,7 @@ let save = function (btnNode) {
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC004A", "save", true,
function (e) {
query();
});
JSUtils.submitGridsData("result", "HGSC004A", "save", true);
btnNode.attr("disabled", false);
}
});
......
......@@ -43,6 +43,7 @@
<EF:EFColumn enable="false" ename="parentProdName" hidden="true" cname="上级产品名称"/>
<EF:EFColumn enable="false" ename="productId" hidden="true" cname="产品id"/>
<EF:EFColumn enable="false" ename="productType" hidden="true" cname="产品类型"/>
<EF:EFColumn enable="false" ename="inventType" hidden="true" cname="库存类型"/>
<EF:EFColumn ename="operator" cname="操作" width="140" enable="false" readonly="false"/>
<EF:EFComboColumn cname="变更类型" ename="changeType" width="90" align="center" enable="false" required="false">
<EF:EFCodeOption codeName="hggp.sc.changeType" />
......
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