Commit fc9a31e9 by 江和松

1.采购入库单功能提交

parent bfdf0642
...@@ -6,16 +6,11 @@ import com.baosight.hpjx.common.InventTypeEnun; ...@@ -6,16 +6,11 @@ import com.baosight.hpjx.common.InventTypeEnun;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC001; import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.kc.domain.HPKC009;
import com.baosight.hpjx.hp.pz.domain.HPPZ007; import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil; import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
...@@ -25,7 +20,6 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator; ...@@ -25,7 +20,6 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @author YK * @author YK
...@@ -41,7 +35,7 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -41,7 +35,7 @@ public class ServiceHPKC001 extends ServiceBase {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_QUERY_BLOCK_ID), null); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_QUERY_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.MATERIAL_RECORD_BLOCK_ID), null); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC_BLOCK_ID), null); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC001().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC001().eiMetadata);
inInfo.setBlock(InventTypeEnun.generatorEiBlock()); inInfo.setBlock(InventTypeEnun.generatorEiBlock());
...@@ -91,7 +85,7 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -91,7 +85,7 @@ public class ServiceHPKC001 extends ServiceBase {
insertEntity.setDocumentTime(StringUtil.removeHorizontalLine(insertEntity.getDocumentTime())); insertEntity.setDocumentTime(StringUtil.removeHorizontalLine(insertEntity.getDocumentTime()));
insertEntity.setStatus(1); insertEntity.setStatus(1);
insertEntity.setApprovalStatus(0); insertEntity.setApprovalStatus(0);
DaoUtils.insert("HPKC001.insert", insertEntity); dao.insert("HPKC001.insert", insertEntity);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
...@@ -146,7 +140,7 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -146,7 +140,7 @@ public class ServiceHPKC001 extends ServiceBase {
updateEntity.setWhName(((HPPZ007) query.get(0)).getWhName()); updateEntity.setWhName(((HPPZ007) query.get(0)).getWhName());
//物料类型 //物料类型
updateEntity.setMaterialTypeName(InventTypeEnun.getNameByCode(updateEntity.getMaterialType())); updateEntity.setMaterialTypeName(InventTypeEnun.getNameByCode(updateEntity.getMaterialType()));
DaoUtils.update("HPKC001.update", updateEntity); dao.insert("HPKC001.update", updateEntity);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
...@@ -156,7 +150,7 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -156,7 +150,7 @@ public class ServiceHPKC001 extends ServiceBase {
inInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!"); inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage()); inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage()); logError("修改失败", e.getMessage());
return inInfo; return inInfo;
} }
return query(inInfo); return query(inInfo);
......
...@@ -15,17 +15,14 @@ import com.baosight.iplat4j.core.ei.EiInfo; ...@@ -15,17 +15,14 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/** /**
* @author:songx * @author:songx
* @date:2024/1/22,15:17 * @date:2024/1/22,15:17
*/ */
public class ServiceHPPZ006 extends ServiceBase { public class ServiceHPPZ006 extends ServiceBase {
/** /**
* 画面初始化 * 画面初始化
* *
...@@ -42,7 +39,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -42,7 +39,7 @@ public class ServiceHPPZ006 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/** /**
* 查询操作. * 查询操作.
*/ */
...@@ -55,7 +52,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -55,7 +52,7 @@ public class ServiceHPPZ006 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/** /**
* 新增操作 * 新增操作
* *
...@@ -84,7 +81,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -84,7 +81,7 @@ public class ServiceHPPZ006 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/** /**
* 校验保存的数据 * 校验保存的数据
* *
...@@ -98,7 +95,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -98,7 +95,7 @@ public class ServiceHPPZ006 extends ServiceBase {
AssertUtils.isNull(fPz006.getInventCode(), "存货名称不能为空"); AssertUtils.isNull(fPz006.getInventCode(), "存货名称不能为空");
} }
} }
/** /**
* 修改操作 * 修改操作
* *
...@@ -123,7 +120,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -123,7 +120,7 @@ public class ServiceHPPZ006 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/** /**
* 删除操作 * 删除操作
* *
...@@ -144,7 +141,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -144,7 +141,7 @@ public class ServiceHPPZ006 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/** /**
* 规格下拉框 * 规格下拉框
* *
...@@ -161,5 +158,24 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -161,5 +158,24 @@ public class ServiceHPPZ006 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
public EiInfo queryComboBox(EiInfo eiInfo) {
Map map = new HashMap();
map.put("inventType", eiInfo.getString("inventType"));
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_RECORD_BLOCK_ID);
CommonMethod.initBlock(eiInfo, list, map);
return eiInfo;
}
public EiInfo queryMaterialComboBox(EiInfo eiInfo) {
Map map = new HashMap();
map.put("inventType", eiInfo.getString("inventType"));
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.MATERIAL_RECORD_BLOCK_ID);
CommonMethod.initBlock(eiInfo, list, map);
return eiInfo;
}
} }
...@@ -36,9 +36,9 @@ $(function() { ...@@ -36,9 +36,9 @@ $(function() {
eiInfo.set("inventType", options.model["materialType"]); eiInfo.set("inventType", options.model["materialType"]);
var dataSource; var dataSource;
EiCommunicator.send("HPPZ006", "queryMaterialComboBox", eiInfo, { EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
dataSource = ei.getBlock("material_record_block_id").getMappedRows(); dataSource = ei.getBlock("invent_name_block_id").getMappedRows();
materialCodeGlobalData = dataSource; materialCodeGlobalData = dataSource;
}, onFail: function (ei) { }, onFail: function (ei) {
} }
...@@ -222,10 +222,10 @@ $(function() { ...@@ -222,10 +222,10 @@ $(function() {
*/ */
$(window).load(function () { $(window).load(function () {
// 存货名称 // 存货名称
let inInfo = new EiInfo(); let eiInfo = new EiInfo();
EiCommunicator.send("HPPZ006", "queryMaterialComboBox", inInfo, { EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
materialCodeGlobalData = ei.getBlock("material_record_block_id").getMappedRows(); inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows();
}, },
onFail: function (ei) { onFail: function (ei) {
} }
......
...@@ -26,22 +26,13 @@ ...@@ -26,22 +26,13 @@
<EF:EFColumn ename="id" cname="主键id" hidden="true"/> <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="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:EFColumn ename="documentCode" cname="采购入库单号" width="100" readonly="false" align="center" required="false" enable="false" />
<EF:EFComboColumn ename="materialType" <EF:EFComboColumn ename="materialType" cname="物料类型" width="90" align="center">
cname="物料类型" <EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
columnTemplate="#=textField#"
itemTemplate="#=textField#"
blockName="customer_type_block_id"
textField="textField"
valueField="valueField"
align="center"
filter="contains"
width="100"
>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="100" readonly="false" required="true"/> <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="whName" cname="仓库名称" width="100" readonly="false" hidden="true"/>
<EF:EFColumn ename="materialCode" cname="物料编码" width="100" readonly="false" required="true"/> <EF:EFColumn ename="materialCode" cname="物料编码" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="materialName" cname="物料名称" width="100" readonly="false" enable="false" required="true"/> <EF:EFColumn ename="materialName" cname="物料名称" width="100" readonly="false" enable="false" hidden="true" required="true"/>
<EF:EFColumn ename="unit" cname="单位" width="80" readonly="false" align="center" enable="false" required="true"/> <EF:EFColumn ename="unit" cname="单位" width="80" readonly="false" align="center" enable="false" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" readonly="false" align="center" required="true"/> <EF:EFColumn ename="spec" cname="规格" width="120" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="quantity" cname="数量" width="80" defaultValue="0" data-regex="/^[0-9]\\\d*$/" data-errorprompt="请输入正整数" readonly="false" align="right" required="true"/> <EF:EFColumn ename="quantity" cname="数量" width="80" defaultValue="0" data-regex="/^[0-9]\\\d*$/" data-errorprompt="请输入正整数" readonly="false" align="right" required="true"/>
......
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