Commit bfdf0642 by 江和松

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

# Conflicts:
#	src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC001.java
#	src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ006.java
parents 2036bf4d 253a4e1f
...@@ -28,6 +28,12 @@ public class HPConstant { ...@@ -28,6 +28,12 @@ public class HPConstant {
public static final String HPKC003_PROD_NO = "HPKC003_PROD_NO"; public static final String HPKC003_PROD_NO = "HPKC003_PROD_NO";
// 生产销售单号 // 生产销售单号
public static final String HPKC004_SALE_NO = "HPKC004_SALE_NO"; public static final String HPKC004_SALE_NO = "HPKC004_SALE_NO";
// 供应商编码
public static final String HPPZ002_CUST_CODE = "HPPZ002_CUST_CODE";
// 客户编码
public static final String HPPZ003_CUST_CODE = "HPPZ003_CUST_CODE";
// 存货编码
public static final String INVENT_CODE = "INVENT_CODE";
} }
/** /**
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
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.HPKC003; import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.kc.domain.HPKC009;
import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.HPPZ009; import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.hp.pz.tools.HPPZTools; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
...@@ -17,14 +13,12 @@ import com.baosight.hpjx.util.StringUtil; ...@@ -17,14 +13,12 @@ import com.baosight.hpjx.util.StringUtil;
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;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -88,9 +82,9 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -88,9 +82,9 @@ public class ServiceHPKC003 extends ServiceBase {
fKc003.fromMap(resultRows.get(i)); fKc003.fromMap(resultRows.get(i));
fKc003.setDocumentDate(StringUtil.removeHorizontalLine(fKc003.getDocumentDate())); fKc003.setDocumentDate(StringUtil.removeHorizontalLine(fKc003.getDocumentDate()));
// 仓库名称 // 仓库名称
fKc003.setWhName(HPPZTools.getWhNameByCode(fKc003.getWhCode())); fKc003.setWhName(HPPZTools.getPz007ByCode(fKc003.getWhCode()).getWhName());
// 物料名称 // 物料名称
fKc003.setInventName(HPPZTools.getInventNameByCode(fKc003.getInventCode())); fKc003.setInventName(HPPZTools.getPz004ByCode(fKc003.getInventCode()).getInventName());
// 生成入库单号 // 生成入库单号
fKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO)); fKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
DaoUtils.insert("HPKC003.insert", fKc003); DaoUtils.insert("HPKC003.insert", fKc003);
...@@ -119,9 +113,9 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -119,9 +113,9 @@ public class ServiceHPKC003 extends ServiceBase {
fKc003.fromMap(resultRows.get(i)); fKc003.fromMap(resultRows.get(i));
fKc003.setDocumentDate(StringUtil.removeHorizontalLine(fKc003.getDocumentDate())); fKc003.setDocumentDate(StringUtil.removeHorizontalLine(fKc003.getDocumentDate()));
// 仓库名称 // 仓库名称
fKc003.setWhName(HPPZTools.getWhNameByCode(fKc003.getWhCode())); fKc003.setWhName(HPPZTools.getPz007ByCode(fKc003.getWhCode()).getWhName());
// 物料名称 // 物料名称
fKc003.setInventName(HPPZTools.getInventNameByCode(fKc003.getInventCode())); fKc003.setInventName(HPPZTools.getPz004ByCode(fKc003.getInventCode()).getInventName());
DaoUtils.update("HPKC003.update", fKc003); DaoUtils.update("HPKC003.update", fKc003);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
......
...@@ -3,17 +3,12 @@ package com.baosight.hpjx.hp.kc.service; ...@@ -3,17 +3,12 @@ package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
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.HPKC003;
import com.baosight.hpjx.hp.kc.domain.HPKC004; import com.baosight.hpjx.hp.kc.domain.HPKC004;
import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.hp.pz.tools.HPPZTools; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
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;
...@@ -24,7 +19,6 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator; ...@@ -24,7 +19,6 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @author YK * @author YK
...@@ -86,9 +80,9 @@ public class ServiceHPKC004 extends ServiceBase { ...@@ -86,9 +80,9 @@ public class ServiceHPKC004 extends ServiceBase {
fKc004.fromMap(resultRows.get(i)); fKc004.fromMap(resultRows.get(i));
fKc004.setReceiptDate(StringUtil.removeHorizontalLine(fKc004.getReceiptDate())); fKc004.setReceiptDate(StringUtil.removeHorizontalLine(fKc004.getReceiptDate()));
// 仓库名称 // 仓库名称
fKc004.setWhName(HPPZTools.getWhNameByCode(fKc004.getWhCode())); fKc004.setWhName(HPPZTools.getPz007ByCode(fKc004.getWhCode()).getWhName());
// 物料名称 // 物料名称
fKc004.setInventName(HPPZTools.getInventNameByCode(fKc004.getInventCode())); fKc004.setInventName(HPPZTools.getPz004ByCode(fKc004.getInventCode()).getInventName());
// 生成销售单号 // 生成销售单号
fKc004.setSaleNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC004_SALE_NO)); fKc004.setSaleNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC004_SALE_NO));
DaoUtils.insert("HPKC004.insert", fKc004); DaoUtils.insert("HPKC004.insert", fKc004);
...@@ -117,9 +111,9 @@ public class ServiceHPKC004 extends ServiceBase { ...@@ -117,9 +111,9 @@ public class ServiceHPKC004 extends ServiceBase {
fKc004.fromMap(resultRows.get(i)); fKc004.fromMap(resultRows.get(i));
fKc004.setReceiptDate(StringUtil.removeHorizontalLine(fKc004.getReceiptDate())); fKc004.setReceiptDate(StringUtil.removeHorizontalLine(fKc004.getReceiptDate()));
// 仓库名称 // 仓库名称
fKc004.setWhName(HPPZTools.getWhNameByCode(fKc004.getWhCode())); fKc004.setWhName(HPPZTools.getPz007ByCode(fKc004.getWhCode()).getWhName());
// 物料名称 // 物料名称
fKc004.setInventName(HPPZTools.getInventNameByCode(fKc004.getInventCode())); fKc004.setInventName(HPPZTools.getPz004ByCode(fKc004.getInventCode()).getInventName());
DaoUtils.update("HPKC004.update", fKc004); DaoUtils.update("HPKC004.update", fKc004);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
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.HPKC005; import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.pz.domain.HPPZ007; import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.HPPZ009; import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.hp.pz.domain.THppz004; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
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.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
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;
...@@ -27,7 +25,6 @@ import java.util.Arrays; ...@@ -27,7 +25,6 @@ import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* *
...@@ -90,15 +87,9 @@ public class ServiceHPKC005 extends ServiceBase { ...@@ -90,15 +87,9 @@ public class ServiceHPKC005 extends ServiceBase {
// 去除日期字符串中的- // 去除日期字符串中的-
fKc005.setReceiptDate(StringUtil.removeHorizontalLine(fKc005.getReceiptDate())); fKc005.setReceiptDate(StringUtil.removeHorizontalLine(fKc005.getReceiptDate()));
// 仓库名称 // 仓库名称
Map params = new HashMap<>(); fKc005.setWhName(HPPZTools.getPz007ByCode(fKc005.getWhCode()).getWhName());
params.put("whCode", fKc005.getWhCode());
List query = dao.query("HPPZ007.queryByWhCode", params);
fKc005.setWhName(((HPPZ007) query.get(0)).getWhName());
// 物料名称 // 物料名称
Map params1 = new HashMap<>(); fKc005.setInventName(HPPZTools.getPz004ByCode(fKc005.getInventCode()).getInventName());
params1.put("inventCode", fKc005.getInventCode());
List query1 = dao.query("HPPZ004.queryMatNameByCode", params1);
fKc005.setInventName(((THppz004) query1.get(0)).getInventName());
if (fKc005.getId() == null || fKc005.getId() == 0) { if (fKc005.getId() == null || fKc005.getId() == 0) {
this.add(fKc005); this.add(fKc005);
} else { } else {
...@@ -158,28 +149,18 @@ public class ServiceHPKC005 extends ServiceBase { ...@@ -158,28 +149,18 @@ public class ServiceHPKC005 extends ServiceBase {
CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock); CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock);
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
Map resultRow = resultRows.get(i); HPKC005 fKc005 = new HPKC005();
fKc005.fromMap(resultRows.get(i));
// 去除日期字符串中的- // 去除日期字符串中的-
String receiptDate = MapUtils.getString(resultRow, "receiptDate"); fKc005.setReceiptDate(StringUtil.removeHorizontalLine(fKc005.getReceiptDate()));
resultRow.put("receiptDate", StringUtil.removeHorizontalLine(receiptDate));
String whCode = MapUtils.getString(resultRow, "whCode");
String inventCode = MapUtils.getString(resultRow, "inventCode");
// 仓库名称 // 仓库名称
Map params = new HashMap<>(); fKc005.setWhName(HPPZTools.getPz007ByCode(fKc005.getWhCode()).getWhName());
params.put("whCode", whCode);
List query = dao.query("HPPZ007.queryByWhCode", params);
String whName = ((HPPZ007) query.get(0)).getWhName();
resultRow.put("whName", whName);
// 物料名称 // 物料名称
Map params1 = new HashMap<>(); fKc005.setInventName(HPPZTools.getPz004ByCode(fKc005.getInventCode()).getInventName());
params1.put("inventCode", inventCode);
List query1 = dao.query("HPPZ004.queryMatNameByCode", params1);
String inventName = ((THppz004) query1.get(0)).getInventName();
resultRow.put("inventName", inventName);
// 生成单据号 // 生成单据号
resultRow.put("statisticalNumber", SequenceGenerator.getNextSequence( fKc005.setStatisticalNumber(SequenceGenerator.getNextSequence(
HPConstant.SequenceId.STATISTICAL_NUMBER)); HPConstant.SequenceId.STATISTICAL_NUMBER));
DaoUtils.insert("HPKC005.insert", resultRow); DaoUtils.insert("HPKC005.insert", fKc005);
} }
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) { } catch (Exception e) {
...@@ -189,30 +170,22 @@ public class ServiceHPKC005 extends ServiceBase { ...@@ -189,30 +170,22 @@ public class ServiceHPKC005 extends ServiceBase {
} }
/** /**
* 修改操作. * 修改操作
*
* @param inInfo
* @return
*/ */
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
List<String> list = new ArrayList<>();
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
HPKC005 HPKC005 = new HPKC005(); HPKC005 fKc005 = new HPKC005();
HPKC005.fromMap(eiBlock.getRow(i)); fKc005.fromMap(eiBlock.getRow(i));
if (HPKC005.getStatus() == 1) { // 仓库名称
list.add(HPKC005.getStatisticalNumber()); fKc005.setWhName(HPPZTools.getPz007ByCode(fKc005.getWhCode()).getWhName());
continue; // 物料名称
} fKc005.setInventName(HPPZTools.getPz004ByCode(fKc005.getInventCode()).getInventName());
Map params=new HashMap<>(); this.dao.update("HPKC005.update", fKc005);
params.put("whCode", HPKC005.getWhCode());
List query = dao.query("HPPZ007.queryByWhCode",params);
String whName = ((HPPZ007)query.get(0)).getWhName();
HPKC005.setWhName(whName);
Map params1=new HashMap<>();
params1.put("inventCode", HPKC005.getInventCode());
List query1 = dao.query("HPPZ004.queryMatNameByCode",params1);
String matName = ((THppz004)query1.get(0)).getInventName();
HPKC005.setInventName(matName);
this.dao.update("HPKC005.update", HPKC005.toMap());
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
......
...@@ -2,10 +2,8 @@ package com.baosight.hpjx.hp.kc.service; ...@@ -2,10 +2,8 @@ package com.baosight.hpjx.hp.kc.service;
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.HPKC005;
import com.baosight.hpjx.hp.kc.domain.HPKC008; import com.baosight.hpjx.hp.kc.domain.HPKC008;
import com.baosight.hpjx.hp.pz.domain.HPPZ007; import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil; import com.baosight.hpjx.util.StringUtil;
...@@ -80,8 +78,8 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -80,8 +78,8 @@ public class ServiceHPKC008 extends ServiceBase {
// 物料名称 // 物料名称
Map params1 = new HashMap<>(); Map params1 = new HashMap<>();
params1.put("inventCode", MapUtils.getString(resultRow, "materialCode")); params1.put("inventCode", MapUtils.getString(resultRow, "materialCode"));
List query1 = dao.query("HPPZ004.queryMatNameByCode", params1); List query1 = dao.query("HPPZ004.query", params1);
String matName = ((THppz004) query1.get(0)).getInventName(); String matName = ((HPPZ004) query1.get(0)).getInventName();
resultRow.put("materialName", matName); resultRow.put("materialName", matName);
// 生成单据号 // 生成单据号
resultRow.put("statisticalNumber", SequenceGenerator.getNextSequence( resultRow.put("statisticalNumber", SequenceGenerator.getNextSequence(
......
...@@ -14,7 +14,7 @@ import com.baosight.hpjx.hp.kc.domain.HPKC007; ...@@ -14,7 +14,7 @@ import com.baosight.hpjx.hp.kc.domain.HPKC007;
import com.baosight.hpjx.hp.kc.domain.HPKC009; 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.HPPZ009; import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.domain.THppz004; import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.hp.pz.tools.HPPZTools; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.BeanUtils; import com.baosight.hpjx.util.BeanUtils;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
...@@ -381,14 +381,14 @@ public class ServiceHPKC009 extends ServiceBase { ...@@ -381,14 +381,14 @@ public class ServiceHPKC009 extends ServiceBase {
Map<String, HPPZ007> mapPz007 = HPPZTools.mapPz007(whCodes); Map<String, HPPZ007> mapPz007 = HPPZTools.mapPz007(whCodes);
// 存货名称 // 存货名称
List<String> inventCodes = kc009s.stream().map(HPKC009::getInventCode).collect(Collectors.toList()); List<String> inventCodes = kc009s.stream().map(HPKC009::getInventCode).collect(Collectors.toList());
Map<String, THppz004> mapPz004 = HPPZTools.mapPz004(inventCodes); Map<String, HPPZ004> mapPz004 = HPPZTools.mapPz004(inventCodes);
for (HPKC009 kc009 : kc009s) { for (HPKC009 kc009 : kc009s) {
String whCode = kc009.getWhCode(); String whCode = kc009.getWhCode();
// 仓库名称 // 仓库名称
HPPZ007 pz007 = mapPz007 == null ? null : mapPz007.get(whCode); HPPZ007 pz007 = mapPz007 == null ? null : mapPz007.get(whCode);
kc009.setWhName(pz007 == null ? "" : pz007.getWhName()); kc009.setWhName(pz007 == null ? "" : pz007.getWhName());
// 存货名称 // 存货名称
THppz004 pz004 = mapPz004 == null ? null : mapPz004.get(whCode); HPPZ004 pz004 = mapPz004 == null ? null : mapPz004.get(whCode);
kc009.setInventName(pz004 == null ? "" : pz004.getInventName()); kc009.setInventName(pz004 == null ? "" : pz004.getInventName());
} }
} }
......
/**
* Generate time : 2024-01-10 10:28:33
* Version : 1.0
*/
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* THppz002
*
*/
public class THppz002 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private int custType; /* 供应商类型 1 国企 : 2 民营*/
private String custCode = " "; /* 供应商编码*/
private String custName = " "; /* 供应商名称*/
private String address = " "; /* 地址*/
private int status; /* 状态 0禁用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime = " "; /* 更新时间*/
private String depCode = " "; /* 部门编码*/
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("companyCode");
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custType");
eiColumn.setDescName("供应商类型 1 国企 : 2 民营");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custCode");
eiColumn.setDescName("供应商编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custName");
eiColumn.setDescName("供应商名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("address");
eiColumn.setDescName("地址");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0禁用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("depCode");
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public THppz002() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the custType - 供应商类型 1 国企 : 2 民营
* @return the custType
*/
public int getCustType() {
return this.custType;
}
/**
* set the custType - 供应商类型 1 国企 : 2 民营
*/
public void setCustType(int custType) {
this.custType = custType;
}
/**
* get the custCode - 供应商编码
* @return the custCode
*/
public String getCustCode() {
return this.custCode;
}
/**
* set the custCode - 供应商编码
*/
public void setCustCode(String custCode) {
this.custCode = custCode;
}
/**
* get the custName - 供应商名称
* @return the custName
*/
public String getCustName() {
return this.custName;
}
/**
* set the custName - 供应商名称
*/
public void setCustName(String custName) {
this.custName = custName;
}
/**
* get the address - 地址
* @return the address
*/
public String getAddress() {
return this.address;
}
/**
* set the address - 地址
*/
public void setAddress(String address) {
this.address = address;
}
/**
* get the status - 状态 0未启用 1启用
* @return the status
*/
public int getStatus() {
return this.status;
}
/**
* set the status - 状态 0未启用 1启用
*/
public void setStatus(int status) {
this.status = status;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the depCode - 部门编码
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setCustType(NumberUtils.toint(StringUtils.toString(map.get("custType")), custType));
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custCode")), custCode));
setCustName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custName")), custName));
setAddress(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("address")), address));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
}
/**
* set the value to Map
*/
public Map toMap() {
Map map = new HashMap();
map.put("id",StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("companyCode",StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("custType",StringUtils.toString(custType, eiMetadata.getMeta("custType")));
map.put("custCode",StringUtils.toString(custCode, eiMetadata.getMeta("custCode")));
map.put("custName",StringUtils.toString(custName, eiMetadata.getMeta("custName")));
map.put("address",StringUtils.toString(address, eiMetadata.getMeta("address")));
map.put("status",StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("createdBy",StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
return map;
}
}
\ No newline at end of file
/**
* Generate time : 2024-01-09 17:46:33
* Version : 1.0
*/
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* THppz003
*
*/
public class THppz003 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private int custType; /* 客商类型 1:国企;2:民营;*/
private String custCode = " "; /* 客户编码*/
private String custCname = " "; /* 客户名称*/
private String custAddr = " "; /* 地址*/
private int status; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdTime; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime; /* 更新时间*/
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("companyCode");
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custType");
eiColumn.setDescName("客商类型 1:国企;2:民营;");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custCode");
eiColumn.setDescName("客户编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custCname");
eiColumn.setDescName("客户名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custAddr");
eiColumn.setDescName("地址");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public THppz003() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the custType - 客商类型 1:国企;2:民营;
* @return the custType
*/
public int getCustType() {
return this.custType;
}
/**
* set the custType - 客商类型 1:国企;2:民营;
*/
public void setCustType(int custType) {
this.custType = custType;
}
/**
* get the custCode - 客户编码
* @return the custCode
*/
public String getCustCode() {
return this.custCode;
}
/**
* set the custCode - 客户编码
*/
public void setCustCode(String custCode) {
this.custCode = custCode;
}
/**
* get the custCname - 客户名称
* @return the custCname
*/
public String getCustCname() {
return this.custCname;
}
/**
* set the custCname - 客户名称
*/
public void setCustCname(String custCname) {
this.custCname = custCname;
}
/**
* get the custAddr - 地址
* @return the custAddr
*/
public String getCustAddr() {
return this.custAddr;
}
/**
* set the custAddr - 地址
*/
public void setCustAddr(String custAddr) {
this.custAddr = custAddr;
}
/**
* get the status - 状态 0未启用 1启用
* @return the status
*/
public int getStatus() {
return this.status;
}
/**
* set the status - 状态 0未启用 1启用
*/
public void setStatus(int status) {
this.status = status;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setCustType(NumberUtils.toint(StringUtils.toString(map.get("custType")), custType));
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custCode")), custCode));
setCustCname(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custCname")), custCname));
setCustAddr(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custAddr")), custAddr));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime));
}
/**
* set the value to Map
*/
public Map toMap() {
Map map = new HashMap();
map.put("id", StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("companyCode", StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("custType", StringUtils.toString(custType, eiMetadata.getMeta("custType")));
map.put("custCode", StringUtils.toString(custCode, eiMetadata.getMeta("custCode")));
map.put("custCname", StringUtils.toString(custCname, eiMetadata.getMeta("custCname")));
map.put("custAddr", StringUtils.toString(custAddr, eiMetadata.getMeta("custAddr")));
map.put("status", StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("createdBy", StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime", StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy", StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime", StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
return map;
}
}
\ No newline at end of file
/**
* Generate time : 2024-01-10 14:11:21
* Version : 1.0
*/
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* THppz004
*
*/
public class THppz004 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private String inventName = " "; /* 存货名称*/
private String inventCode = " "; /* 存货编码*/
private int inventType; /* 存货类型*/
private int status; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime = " "; /* 更新时间*/
private String depCode = " "; /* 部门编码*/
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("companyCode");
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventName");
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventCode");
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventType");
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("depCode");
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public THppz004() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the inventName - 存货名称
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* get the inventCode - 存货编码
* @return the inventCode
*/
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 存货编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventType - 存货类型
* @return the inventType
*/
public int getInventType() {
return this.inventType;
}
/**
* set the inventType - 存货类型
*/
public void setInventType(int inventType) {
this.inventType = inventType;
}
/**
* get the status - 状态 0未启用 1启用
* @return the status
*/
public int getStatus() {
return this.status;
}
/**
* set the status - 状态 0未启用 1启用
*/
public void setStatus(int status) {
this.status = status;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the depCode - 部门编码
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventName")), inventName));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventCode")), inventCode));
setInventType(NumberUtils.toint(StringUtils.toString(map.get("inventType")), inventType));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
}
/**
* set the value to Map
*/
public Map toMap() {
Map map = new HashMap();
map.put("id",StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("companyCode",StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("inventName",StringUtils.toString(inventName, eiMetadata.getMeta("inventName")));
map.put("inventCode",StringUtils.toString(inventCode, eiMetadata.getMeta("inventCode")));
map.put("inventType",StringUtils.toString(inventType, eiMetadata.getMeta("inventType")));
map.put("status",StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("createdBy",StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
return map;
}
}
\ No newline at end of file
...@@ -2,14 +2,26 @@ package com.baosight.hpjx.hp.pz.service; ...@@ -2,14 +2,26 @@ package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.common.CompanyTypeEnum; import com.baosight.hpjx.common.CompanyTypeEnum;
import com.baosight.hpjx.common.InitiateModeEnum; import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC004;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
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;
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 com.baosight.hpjx.hp.pz.domain.THppz002; import com.baosight.hpjx.hp.pz.domain.HPPZ002;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -19,110 +31,109 @@ import java.util.Map; ...@@ -19,110 +31,109 @@ import java.util.Map;
public class ServiceHPPZ002 extends ServiceBase { public class ServiceHPPZ002 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化
*
* @param inInfo
* @return
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
THppz002 hppz002 = new THppz002(); try {
EiInfo outInfo = new EiInfo(); inInfo.setBlock(CompanyTypeEnum.generatorEiBlock());
outInfo.addBlock(EiConstant.queryBlock); inInfo.setBlock(InitiateModeEnum.generatorEiBlock());
outInfo.getBlock(EiConstant.queryBlock).addBlockMeta(hppz002.eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ002().eiMetadata);
outInfo.addBlock(EiConstant.resultBlock); } catch (PlatException e) {
outInfo.getBlock(EiConstant.resultBlock).addBlockMeta(hppz002.eiMetadata); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
outInfo.setBlock(CompanyTypeEnum.generatorEiBlock()); }
outInfo.setBlock(InitiateModeEnum.generatorEiBlock()); return inInfo;
return outInfo;
} }
/** /**
* 查询操作. * 查询操作
*
* @param inInfo
* @return
*/ */
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ try {
EiInfo outInfo = super.query(inInfo, "HPPZ002.query", new THppz002()); inInfo = super.query(inInfo, "HPPZ002.query", new HPPZ002());
return outInfo; } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
} }
/** /**
* 新增操作. * 新增操作
*
* @param inInfo
* @return
*/ */
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock);
try { try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
THppz002 hppz002 = new THppz002(); // 数据写入
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); for (int i = 0; i < resultRows.size(); i++) {
for (int i = 0; i < eiBlock.getRowCount(); i++) { HPPZ002 fPz002 = new HPPZ002();
Map<?, ?> map = eiBlock.getRow(i); fPz002.fromMap(resultRows.get(i));
hppz002.fromMap(map); // 生成供应商编码
this.dao.insert("HPPZ002.insert", hppz002.toMap()); fPz002.setCustCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPPZ002_CUST_CODE));
DaoUtils.insert("HPPZ002.insert", fPz002);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo = this.query(inInfo);
inInfo.setMsg("新增成功!"); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (PlatException e) { } catch (Exception e) {
e.printStackTrace(); LogUtils.setDetailMsg(inInfo, e, "新增失败");
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
} }
return inInfo; return inInfo;
} }
/** /**
* 修改操作. * 修改操作
*
* @param inInfo
* @return
*/ */
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock);
try { try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
THppz002 HPPZ002 = new THppz002(); for (int i = 0; i < resultRows.size(); i++) {
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); HPPZ002 fPz002 = new HPPZ002();
for (int i = 0; i < eiBlock.getRowCount(); i++) { fPz002.fromMap(resultRows.get(i));
Map<?, ?> map = eiBlock.getRow(i); DaoUtils.update("HPPZ002.update", fPz002);
HPPZ002.fromMap(map);
this.dao.update("HPPZ002.update", HPPZ002.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo = this.query(inInfo);
inInfo.setMsg("修改成功!"); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) { inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
inInfo.setStatus(EiConstant.STATUS_FAILURE); } catch (Exception e) {
inInfo.setMsg("操作失败!原因参见详细错误描述!"); LogUtils.setDetailMsg(inInfo, e, "修改失败");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
} }
return query(inInfo); return inInfo;
} }
/** /**
* 删除操作. * 删除操作
*
* @param inInfo
* @return
*/ */
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo inInfo) {
THppz002 HPPZ002 = new THppz002();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try { try {
for (int i = 0; i < eiBlock.getRowCount(); i++) { List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
Map<?, ?> map = eiBlock.getRow(i); for (int i = 0; i < resultRows.size(); i++) {
HPPZ002.fromMap(map); DaoUtils.update("HPPZ002.delete", resultRows.get(i));
this.dao.delete("HPPZ002.delete", HPPZ002.toMap());
} }
} catch (PlatException e) { inInfo = this.query(inInfo);
eiInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setMsg("删除失败,原因参见详细错误描述!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
eiInfo.setDetailMsg(e.getMessage()); } catch (Exception e) {
logError("删除失败!", e.getMessage()); LogUtils.setDetailMsg(inInfo, e, "删除失败");
return eiInfo;
} }
return inInfo;
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
} }
} }
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.common.CompanyTypeEnum;
import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ002;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
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;
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 com.baosight.iplat4j.core.web.threadlocal.UserSession; import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.hpjx.hp.pz.domain.THppz003; import com.baosight.hpjx.hp.pz.domain.HPPZ003;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* * @author:songx
* @date:2024/1/22,14:13
*/ */
public class ServiceHPPZ003 extends ServiceBase { public class ServiceHPPZ003 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化
*
* @param inInfo
* @return
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
THppz003 hppz003 = new THppz003(); try {
EiInfo outInfo = super.initLoad(inInfo, hppz003); inInfo.setBlock(CompanyTypeEnum.generatorEiBlock());
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hppz003.eiMetadata); inInfo.setBlock(InitiateModeEnum.generatorEiBlock());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ003().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo; return inInfo;
} }
/** /**
* 查询操作. * 查询操作
*
* @param inInfo
* @return
*/ */
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ try {
EiInfo outInfo = super.query(inInfo, "HPPZ003.query", new THppz003()); inInfo = super.query(inInfo, "HPPZ003.query", new HPPZ003());
return outInfo; } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
} }
/** /**
* 新增操作. * 新增操作
*
* @param inInfo
* @return
*/ */
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
THppz003 hppz003 = new THppz003(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); // 数据写入
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < resultRows.size(); i++) {
Map<?, ?> map = eiBlock.getRow(i); HPPZ003 fPz003 = new HPPZ003();
hppz003.fromMap(map); fPz003.fromMap(resultRows.get(i));
hppz003.setCreatedBy(UserSession.getUserId()); // 生成客户编码
hppz003.setCreatedTime(sdf.format(new Date())); fPz003.setCustCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPPZ003_CUST_CODE));
hppz003.setUpdatedBy(null); DaoUtils.insert("HPPZ003.insert", fPz003);
hppz003.setUpdatedTime(null);
this.dao.insert("HPPZ003.insert", hppz003.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo = this.query(inInfo);
inInfo.setMsg("新增成功!"); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (PlatException e) { } catch (Exception e) {
e.printStackTrace(); LogUtils.setDetailMsg(inInfo, e, "新增失败");
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
} }
return query(inInfo); return inInfo;
} }
/** /**
* 修改操作. * 修改操作
*
* @param inInfo
* @return
*/ */
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
THppz003 hppz003 = new THppz003(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); for (int i = 0; i < resultRows.size(); i++) {
for (int i = 0; i < eiBlock.getRowCount(); i++) { HPPZ003 fPz003 = new HPPZ003();
Map<?, ?> map = eiBlock.getRow(i); fPz003.fromMap(resultRows.get(i));
hppz003.fromMap(map); DaoUtils.update("HPPZ003.update", fPz003);
hppz003.setUpdatedBy(UserSession.getUserId());
hppz003.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPPZ003.update", hppz003.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo = this.query(inInfo);
inInfo.setMsg("修改成功!"); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) { inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
inInfo.setStatus(EiConstant.STATUS_FAILURE); } catch (Exception e) {
inInfo.setMsg("操作失败!原因参见详细错误描述!"); LogUtils.setDetailMsg(inInfo, e, "修改失败");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
} }
return query(inInfo); return inInfo;
} }
/** /**
* 删除操作. * 删除操作
*
* @param inInfo
* @return
*/ */
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo inInfo) {
THppz003 hppz003 = new THppz003();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try { try {
for (int i = 0; i < eiBlock.getRowCount(); i++) { List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
Map<?, ?> map = eiBlock.getRow(i); for (int i = 0; i < resultRows.size(); i++) {
hppz003.fromMap(map); DaoUtils.update("HPPZ003.delete", resultRows.get(i));
this.dao.delete("HPPZ003.delete", hppz003.toMap());
} }
} catch (PlatException e) { inInfo = this.query(inInfo);
eiInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setMsg("删除失败,原因参见详细错误描述!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
eiInfo.setDetailMsg(e.getMessage()); } catch (Exception e) {
logError("删除失败!", e.getMessage()); LogUtils.setDetailMsg(inInfo, e, "删除失败");
return eiInfo;
} }
return inInfo;
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
} }
} }
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.common.CompanyTypeEnum;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InitiateModeEnum; import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.common.InventTypeEnun; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.pz.domain.THppz004; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ003;
import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.hpjx.util.LogUtils;
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;
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 com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
...@@ -19,117 +20,118 @@ import java.util.List; ...@@ -19,117 +20,118 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* @author xuao * @author:songx
* @date 2024年01月09日 19:35 * @date:2024/1/22,15:18
*/ */
public class ServiceHPPZ004 extends ServiceBase { public class ServiceHPPZ004 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化
*
* @param inInfo
* @return
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
THppz004 hppz004 = new THppz004(); try {
EiInfo outInfo = new EiInfo(); inInfo.setBlock(InitiateModeEnum.generatorEiBlock());
outInfo.addBlock(EiConstant.resultBlock); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ004().eiMetadata);
outInfo.getBlock(EiConstant.resultBlock).addBlockMeta(hppz004.eiMetadata); } catch (PlatException e) {
outInfo.setBlock(InventTypeEnun.generatorEiBlock()); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
outInfo.setBlock(InitiateModeEnum.generatorEiBlock()); }
return outInfo; return inInfo;
} }
/** /**
* 查询操作. * 查询操作
*
* @param inInfo
* @return
*/ */
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ try {
EiInfo outInfo = super.query(inInfo, "HPPZ004.query", new THppz004()); inInfo = super.query(inInfo, "HPPZ004.query", new HPPZ003());
return outInfo; } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
} }
/** /**
* 新增操作. * 新增操作
*
* @param inInfo
* @return
*/ */
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
THppz004 hppz004 = new THppz004(); // 数据写入
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); for (int i = 0; i < resultRows.size(); i++) {
for (int i = 0; i < eiBlock.getRowCount(); i++) { HPPZ004 fPz004 = new HPPZ004();
Map<?, ?> map = eiBlock.getRow(i); fPz004.fromMap(resultRows.get(i));
hppz004.fromMap(map); // 生成客户编码
fPz004.setInventCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.INVENT_CODE));
this.dao.insert("HPPZ004.insert", hppz004.toMap()); DaoUtils.insert(HPPZ004.INSERT, fPz004);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo = this.query(inInfo);
inInfo.setMsg("新增成功!"); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (PlatException e) { } catch (Exception e) {
e.printStackTrace(); LogUtils.setDetailMsg(inInfo, e, "新增失败");
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
} }
return inInfo; return inInfo;
} }
/** /**
* 修改操作. * 修改操作
*
* @param inInfo
* @return
*/ */
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
THppz004 HPPZ004 = new THppz004(); for (int i = 0; i < resultRows.size(); i++) {
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); HPPZ004 fPz004 = new HPPZ004();
for (int i = 0; i < eiBlock.getRowCount(); i++) { fPz004.fromMap(resultRows.get(i));
Map<?, ?> map = eiBlock.getRow(i); DaoUtils.update(HPPZ004.UPDATE, fPz004);
HPPZ004.fromMap(map);
this.dao.update("HPPZ004.update", HPPZ004.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo = this.query(inInfo);
inInfo.setMsg("修改成功!"); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) { inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
inInfo.setStatus(EiConstant.STATUS_FAILURE); } catch (Exception e) {
inInfo.setMsg("操作失败!原因参见详细错误描述!"); LogUtils.setDetailMsg(inInfo, e, "修改失败");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
} }
return query(inInfo); return inInfo;
} }
/** /**
* 删除操作. * 删除操作
*
* @param inInfo
* @return
*/ */
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo inInfo) {
THppz004 HPPZ004 = new THppz004();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try { try {
for (int i = 0; i < eiBlock.getRowCount(); i++) { List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
Map<?, ?> map = eiBlock.getRow(i); for (int i = 0; i < resultRows.size(); i++) {
HPPZ004.fromMap(map); DaoUtils.update(HPPZ004.DELETE, resultRows.get(i));
this.dao.delete("HPPZ004.delete", HPPZ004.toMap());
} }
} catch (PlatException e) { inInfo = this.query(inInfo);
eiInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setMsg("删除失败,原因参见详细错误描述!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
eiInfo.setDetailMsg(e.getMessage()); } catch (Exception e) {
logError("删除失败!", e.getMessage()); LogUtils.setDetailMsg(inInfo, e, "删除失败");
return eiInfo;
} }
return inInfo;
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
} }
/**
* @param eiInfo
* @return
*/
public EiInfo queryComboBox(EiInfo eiInfo) { public EiInfo queryComboBox(EiInfo eiInfo) {
Map map = new HashMap(); Map map = new HashMap();
map.put("inventType", eiInfo.getString("inventType")); map.put("inventType", eiInfo.getString("inventType"));
......
...@@ -2,12 +2,14 @@ package com.baosight.hpjx.hp.pz.service; ...@@ -2,12 +2,14 @@ package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InitiateModeEnum; import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.common.InventTypeEnun; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.pz.domain.THppz006; import com.baosight.hpjx.hp.kc.domain.HPKC006;
import com.baosight.hpjx.hp.pz.domain.HPPZ006;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
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;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -15,33 +17,30 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase; ...@@ -15,33 +17,30 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* @author xuao * @author:songx
* @date 2024年01月10日 15:51 * @date:2024/1/22,15:17
*/ */
public class ServiceHPPZ006 extends ServiceBase { public class ServiceHPPZ006 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化
*
* @param inInfo
* @return
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
THppz006 hppz006 = new THppz006(); try {
EiInfo outInfo = new EiInfo(); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
outInfo.addBlock(EiConstant.resultBlock); inInfo.setBlock(InitiateModeEnum.generatorEiBlock());
outInfo.getBlock(EiConstant.resultBlock).addBlockMeta(hppz006.eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ006().eiMetadata);
outInfo.setBlock(InitiateModeEnum.generatorEiBlock()); } catch (PlatException e) {
outInfo.setBlock(InventTypeEnun.generatorEiBlock()); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
CommonMethod.initBlock(outInfo, Arrays.asList( }
DdynamicEnum.INVENT_NAME_BLOCK_ID), return inInfo;
new HashMap<String,String>(1) {{
put("status", "1" );
}});
return outInfo;
} }
/** /**
...@@ -49,92 +48,101 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -49,92 +48,101 @@ public class ServiceHPPZ006 extends ServiceBase {
*/ */
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ try {
EiInfo outInfo = super.query(inInfo, "HPPZ006.query", new THppz006()); inInfo = super.query(inInfo, "HPPZ006.query", new HPKC006());
return outInfo; } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
} }
/** /**
* 新增操作. * 新增操作
*
* @param inInfo
* @return
*/ */
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据写入
for (int i = 0; i < inInfo.getBlock(EiConstant.resultBlock).getRowCount(); i++) { this.checkSaveData(resultRows);
String inventName =inInfo.getCellStr(EiConstant.resultBlock,i,"inventName"); // 数据写入
String[] str = inventName.split("-"); for (int i = 0; i < resultRows.size(); i++) {
inInfo.setCell(EiConstant.resultBlock,i,"inventCode", str[0]); HPPZ006 fPz006 = new HPPZ006();
inInfo.setCell(EiConstant.resultBlock,i,"inventName", str[1]); fPz006.fromMap(resultRows.get(i));
// 存货名称
fPz006.setInventName(HPPZTools.getPz004ByCode(fPz006.getInventCode()).getInventName());
DaoUtils.insert(HPPZ006.INSERT, fPz006);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo = this.query(inInfo);
inInfo.setMsg("新增成功!"); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (PlatException e) { } catch (Exception e) {
e.printStackTrace(); LogUtils.setDetailMsg(inInfo, e, "新增失败");
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
} }
return super.insert(inInfo,"HPPZ006.insert"); return inInfo;
} }
/**
* 校验保存的数据
*
* @param resultRows
*/
private void checkSaveData(List<Map> resultRows) {
for (int i = 0; i < resultRows.size(); i++) {
HPPZ006 fPz006 = new HPPZ006();
fPz006.fromMap(resultRows.get(i));
AssertUtils.isNull(fPz006.getInventType(), "存货类型不能为空");
AssertUtils.isNull(fPz006.getInventCode(), "存货名称不能为空");
}
}
/** /**
* 修改操作. * 修改操作
*
* @param inInfo
* @return
*/ */
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
THppz006 hppz006 = new THppz006(); for (int i = 0; i < resultRows.size(); i++) {
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); HPPZ006 fPz006 = new HPPZ006();
for (int i = 0; i < eiBlock.getRowCount(); i++) { fPz006.fromMap(resultRows.get(i));
Map<?, ?> map = eiBlock.getRow(i); // 存货名称
hppz006.fromMap(map); fPz006.setInventName(HPPZTools.getPz004ByCode(fPz006.getInventCode()).getInventName());
DaoUtils.update(HPPZ006.UPDATE, fPz006);
this.dao.update("HPPZ006.update", hppz006.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo = this.query(inInfo);
inInfo.setMsg("修改成功!"); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) { inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
inInfo.setStatus(EiConstant.STATUS_FAILURE); } catch (Exception e) {
inInfo.setMsg("操作失败!原因参见详细错误描述!"); LogUtils.setDetailMsg(inInfo, e, "修改失败");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
} }
return query(inInfo); return inInfo;
} }
/** /**
* 删除操作. * 删除操作
*
* @param inInfo
* @return
*/ */
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo inInfo) {
THppz006 hppz006 = new THppz006();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try { try {
for (int i = 0; i < eiBlock.getRowCount(); i++) { List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
Map<?, ?> map = eiBlock.getRow(i); for (int i = 0; i < resultRows.size(); i++) {
hppz006.fromMap(map); DaoUtils.update(HPPZ006.DELETE, resultRows.get(i));
this.dao.delete("HPPZ006.delete", hppz006.toMap());
} }
} catch (PlatException e) { inInfo = this.query(inInfo);
eiInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setMsg("删除失败,原因参见详细错误描述!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
eiInfo.setDetailMsg(e.getMessage()); } catch (Exception e) {
logError("删除失败!", e.getMessage()); LogUtils.setDetailMsg(inInfo, e, "删除失败");
return eiInfo;
} }
return inInfo;
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
} }
/** /**
...@@ -149,27 +157,9 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -149,27 +157,9 @@ public class ServiceHPPZ006 extends ServiceBase {
list.add(DdynamicEnum.INVENT_SPEC_BLOCK_ID); list.add(DdynamicEnum.INVENT_SPEC_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false); CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "规格下拉框"); LogUtils.setDetailMsg(inInfo, e, "查询规格失败");
} }
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;
}
} }
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-09 14:40:53
Version : 1.0
tableName :hpjx.t_hppz002
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
CUST_TYPE TINYINT NOT NULL,
CUST_CODE VARCHAR NOT NULL,
CUST_NAME VARCHAR NOT NULL,
ADDRESS VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
CREATED_BY VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR
-->
<sqlMap namespace="HPPZ002"> <sqlMap namespace="HPPZ002">
<select id="query" parameterClass="java.util.HashMap" <sql id="column">
resultClass="com.baosight.hpjx.hp.pz.domain.THppz002">
SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CUST_TYPE as "custType", <!-- 供应商类型 1 国企 : 2 民营 --> CUST_TYPE as "custType", <!-- 供应商类型 1 国企 : 2 民营 -->
CUST_CODE as "custCode", <!-- 供应商编码 --> CUST_CODE as "custCode", <!-- 供应商编码 -->
CUST_NAME as "custName", <!-- 供应商名称 --> CUST_NAME as "custName", <!-- 供应商名称 -->
ADDRESS as "address", <!-- 地址 --> ADDRESS as "address", <!-- 地址 -->
STATUS as "status", <!-- 状态 0禁用 1启用 --> STATUS as "status", <!-- 状态 0禁用 1启用 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
DEP_CODE as "depCode" <!-- 部门编码 --> UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hppz002 WHERE 1=1 </sql>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz002 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
<!-- <sql id="condition">
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType"> <isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType# CUST_TYPE = #custType#
</isNotEmpty> </isNotEmpty>
...@@ -75,7 +36,7 @@ ...@@ -75,7 +36,7 @@
CUST_CODE = #custCode# CUST_CODE = #custCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="custName"> <isNotEmpty prepend=" AND " property="custName">
CUST_NAME = #custName# CUST_NAME LIKE CONCAT('%', #custName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="address"> <isNotEmpty prepend=" AND " property="address">
ADDRESS = #address# ADDRESS = #address#
...@@ -83,52 +44,66 @@ ...@@ -83,52 +44,66 @@
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="status">
STATUS = #status# STATUS = #status#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy"> </sql>
CREATED_BY = #createdBy#
</isNotEmpty> <sql id="order">
<isNotEmpty prepend=" AND " property="createdTime"> <dynamic prepend=" ORDER BY ">
CREATED_TIME = #createdTime# <isNotEmpty property="orderBy">
</isNotEmpty> $orderBy$
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty> </isNotEmpty>
--> <isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ002">
SELECT
<include refid="column"/>
FROM hpjx.t_hppz002 WHERE 1=1
<include refid="condition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz002 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hppz002 ( INSERT INTO ${hpjxSchema}.T_HPPZ002 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CUST_TYPE, <!-- 供应商类型 1 国企 : 2 民营 --> CUST_TYPE, <!-- 供应商类型 1 国企 : 2 民营 -->
CUST_CODE, <!-- 供应商编码 --> CUST_CODE, <!-- 供应商编码 -->
CUST_NAME, <!-- 供应商名称 --> CUST_NAME, <!-- 供应商名称 -->
ADDRESS, <!-- 地址 --> ADDRESS, <!-- 地址 -->
STATUS, <!-- 状态 0禁用 1启用 --> STATUS, <!-- 状态 0禁用 1启用 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_NAME, <!-- 创建人名称 -->
DEP_CODE <!-- 部门编码 --> CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #depCode#, #custType#, #custCode#, #custName#, #address#,
#status#, #createdBy#, #createdName#, #createdTime#
) )
VALUES ( #companyCode#, #custType#, #custCode#, #custName#, #address#, #status#, #createdBy#, #createdTime#, #depCode#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz002 WHERE DELETE FROM hpjx.t_hppz002 WHERE ID = #id#
ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz002 UPDATE hpjx.t_hppz002
SET SET
CUST_TYPE = #custType#, <!-- 供应商类型 1 国企 : 2 民营 --> CUST_TYPE = #custType#, <!-- 供应商类型 1 国企 : 2 民营 -->
CUST_CODE = #custCode#, <!-- 供应商编码 -->
CUST_NAME = #custName#, <!-- 供应商名称 --> CUST_NAME = #custName#, <!-- 供应商名称 -->
ADDRESS = #address#, <!-- 地址 --> ADDRESS = #address#, <!-- 地址 -->
STATUS = #status#, <!-- 状态 0禁用 1启用 --> STATUS = #status#, <!-- 状态 0禁用 1启用 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE WHERE ID = #id#
ID = #id#
</update> </update>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-09 17:46:33
Version : 1.0
tableName :hpjx.t_hppz003
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
CUST_TYPE TINYINT NOT NULL,
CUST_CODE VARCHAR NOT NULL,
CUST_CNAME VARCHAR NOT NULL,
CUST_ADDR VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME
-->
<sqlMap namespace="HPPZ003"> <sqlMap namespace="HPPZ003">
<select id="query" parameterClass="java.util.HashMap" <sql id="column">
resultClass="com.baosight.hpjx.hp.pz.domain.THppz003">
SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 -->
CUST_TYPE as "custType", <!-- 客商类型 1:国企;2:民营; --> CUST_TYPE as "custType", <!-- 客商类型 1:国企;2:民营; -->
CUST_CODE as "custCode", <!-- 客户编码 --> CUST_CODE as "custCode", <!-- 客户编码 -->
CUST_CNAME as "custCname", <!-- 客户名称 --> CUST_NAME as "custName", <!-- 客户名称 -->
CUST_ADDR as "custAddr", <!-- 地址 --> ADDRESS as "address", <!-- 地址 -->
STATUS as "status", <!-- 状态 0未启用 1启用 --> STATUS as "status", <!-- 状态 0未启用 1启用 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 --> UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hppz003 WHERE 1=1 </sql>
<isNotEmpty prepend=" AND " property="custCname">
CUST_CNAME LIKE CONCAT('%',CONCAT(#custCname#,'%')) <sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="custType"> <isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType# CUST_TYPE = #custType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="custCode">
CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custName">
CUST_NAME LIKE CONCAT('%', #custName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="address">
ADDRESS = #address#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="status">
STATUS = #status# STATUS = #status#
</isNotEmpty> </isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -50,95 +55,60 @@ ...@@ -50,95 +55,60 @@
CREATED_TIME DESC CREATED_TIME DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ003">
SELECT
<include refid="column"/>
FROM hpjx.t_hppz003 WHERE 1=1
<include refid="condition"/>
<include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz003 WHERE 1=1 SELECT COUNT(*) FROM hpjx.t_hppz003 WHERE 1=1
<isNotEmpty prepend=" AND " property="id"> <include refid="condition"/>
ID = #id#
</isNotEmpty>
</select> </select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custCode">
CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custCname">
CUST_CNAME = #custCname#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custAddr">
CUST_ADDR = #custAddr#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hppz003 (ID, INSERT INTO ${hpjxSchema}.T_HPPZ003 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
CUST_TYPE, <!-- 客商类型 1:国企;2:民营; --> CUST_TYPE, <!-- 客商类型 1:国企;2:民营; -->
CUST_CODE, <!-- 客户编码 --> CUST_CODE, <!-- 客户编码 -->
CUST_CNAME, <!-- 客户名称 --> CUST_NAME, <!-- 客户名称 -->
CUST_ADDR, <!-- 地址 --> ADDRESS, <!-- 地址 -->
STATUS, <!-- 状态 0未启用 1启用 --> STATUS, <!-- 状态 0未启用 1启用 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_NAME, <!-- 创建人名称 -->
UPDATED_BY, <!-- 更新人 --> CREATED_TIME <!-- 创建时间 -->
UPDATED_TIME <!-- 更新时间 --> ) VALUES (
#companyCode#, #depCode#, #custType#, #custCode#, #custName#, #address#,
#status#, #createdBy#, #createdName#, #createdTime#
) )
VALUES (#id#, #companyCode#, #custType#, #custCode#, #custCname#, #custAddr#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz003 WHERE DELETE FROM hpjx.t_hppz003 WHERE ID = #id#
ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz003 UPDATE hpjx.t_hppz003
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
CUST_TYPE = #custType#, <!-- 客商类型 1:国企;2:民营; --> CUST_TYPE = #custType#, <!-- 客商类型 1:国企;2:民营; -->
CUST_CODE = #custCode#, <!-- 客户编码 --> CUST_NAME = #custName#, <!-- 客户名称 -->
CUST_CNAME = #custCname#, <!-- 客户名称 --> ADDRESS = #address#, <!-- 地址 -->
CUST_ADDR = #custAddr#, <!-- 地址 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 --> STATUS = #status#, <!-- 状态 0未启用 1启用 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE WHERE ID = #id#
ID = #id#
</update> </update>
<select id="queryComboBox" parameterClass="java.util.HashMap" <select id="queryComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
CUST_CODE as "custCode", CUST_CODE as "custCode",
CUST_CNAME as "custName" CUST_NAME as "custName"
FROM hpjx.t_hppz003 WHERE STATUS=1 FROM hpjx.t_hppz003 WHERE STATUS=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
...@@ -148,4 +118,5 @@ ...@@ -148,4 +118,5 @@
</isNotEmpty> </isNotEmpty>
ORDER BY CUST_CODE ORDER BY CUST_CODE
</select> </select>
</sqlMap> </sqlMap>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-09 19:25:19
Version : 1.0
tableName :hpjx.t_hppz004
ID INTEGER NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
INVENT_NAME VARCHAR NOT NULL,
INVENT_CODE VARCHAR NOT NULL,
INVENT_FATHER_NAME VARCHAR NOT NULL,
INVENT_FATHER_CODE VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
CREATED_BY VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR
-->
<sqlMap namespace="HPPZ004"> <sqlMap namespace="HPPZ004">
<select id="query" parameterClass="java.util.HashMap" <sql id="column">
resultClass="com.baosight.hpjx.hp.pz.domain.THppz004">
SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
INVENT_NAME as "inventName", <!-- 存货名称 --> DEP_CODE as "depCode", <!-- 部门编码 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_TYPE as "inventType", <!-- 存货类型 --> INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
STATUS as "status", <!-- 状态 0未启用 1启用 --> STATUS as "status", <!-- 状态 0未启用 1启用 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
DEP_CODE as "depCode" <!-- 部门编码 --> UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hppz004 WHERE 1=1 </sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCodes"> <isNotEmpty prepend=" AND " property="companyCode">
INVENT_CODE IN <iterate close=")" open="(" conjunction="," property="inventCodes">#inventCodes[]#</iterate> COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName"> <isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName# INVENT_NAME LIKE CONCAT('%', #inventName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="status">
STATUS = #status# STATUS = #status#
</isNotEmpty> </isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="inventCodes">
INVENT_CODE IN <iterate close=")" open="(" conjunction="," property="inventCodes">#inventCodes[]#</iterate>
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ004">
SELECT
<include refid="column"/>
FROM hpjx.t_hppz004 WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
<include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz004 WHERE 1=1 SELECT COUNT(*) FROM hpjx.t_hppz004 WHERE 1=1
<isNotEmpty prepend=" AND " property="id"> <include refid="condition"/>
ID = #id# <include refid="customCondition"/>
</isNotEmpty>
</select> </select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventFatherName">
INVENT_FATHER_NAME = #inventFatherName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventFatherCode">
INVENT_FATHER_CODE = #inventFatherCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hppz004 ( INSERT INTO ${hpjxSchema}.T_HPPZ004 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
INVENT_NAME, <!-- 存货名称 --> DEP_CODE, <!-- 部门编码 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_TYPE, <!-- 存货类型 --> INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
STATUS, <!-- 状态 0未启用 1启用 --> STATUS, <!-- 状态 0未启用 1启用 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_NAME, <!-- 创建人名称 -->
DEP_CODE <!-- 部门编码 --> CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #depCode#, #inventType#, #inventCode#, #inventName#,
#status#, #createdBy#, #createdName#, #createdTime#
) )
VALUES ( #companyCode#, #inventName#, #inventCode#, #inventType#, #status#, #createdBy#, #createdTime#, #depCode#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz004 WHERE DELETE FROM hpjx.t_hppz004 WHERE ID = #id#
ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz004 UPDATE hpjx.t_hppz004
SET SET
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 --> INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 --> STATUS = #status#, <!-- 状态 0未启用 1启用 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE WHERE ID = #id#
ID = #id#
</update> </update>
<select id="queryComboBox" parameterClass="java.util.HashMap" <!-- -->
resultClass="java.util.HashMap"> <select id="queryComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
INVENT_CODE as "inventCode", INVENT_CODE as "inventCode",
INVENT_NAME as "inventName" INVENT_NAME as "inventName"
FROM hpjx.t_hppz004 WHERE STATUS=1 FROM hpjx.t_hppz004
WHERE STATUS = 1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -146,31 +123,6 @@ ...@@ -146,31 +123,6 @@
<isNotEmpty prepend=" AND " property="inventType"> <isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType# INVENT_TYPE = #inventType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
ORDER BY INVENT_CODE
</select>
<select id="queryMatNameByCode" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.pz.domain.THppz004">
SELECT DISTINCT
INVENT_CODE as "inventCode",
INVENT_NAME as "inventName"
FROM hpjx.t_hppz004 WHERE STATUS=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
ORDER BY INVENT_CODE ORDER BY INVENT_CODE
</select> </select>
......
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPPZ006"> <sqlMap namespace="HPPZ006">
<select id="query" parameterClass="java.util.HashMap" <sql id="column">
resultClass="com.baosight.hpjx.hp.pz.domain.THppz006">
SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
INVENT_NAME as "inventName", <!-- 存货名称 --> DEP_CODE as "depCode", <!-- 部门编码 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_TYPE as "inventType", <!-- 存货类型 --> INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
STATUS as "status", <!-- 状态 0未启用 1启用 --> STATUS as "status", <!-- 状态 0未启用 1启用 -->
SPEC as "spec", <!-- 规格 --> SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长 --> LENGTH as "length", <!-- 长 -->
...@@ -19,47 +18,71 @@ ...@@ -19,47 +18,71 @@
COEFFICIENT as "coefficient", <!-- 系数 --> COEFFICIENT as "coefficient", <!-- 系数 -->
UNIT as "unit", <!-- 单位 --> UNIT as "unit", <!-- 单位 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
DEP_CODE as "depCode" <!-- 部门编码 --> UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hppz006 WHERE 1=1 </sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType"> <isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType# INVENT_TYPE = #inventType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName"> <isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName# INVENT_NAME = #inventName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="status">
STATUS = #status# STATUS = #status#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ006">
SELECT
<include refid="column"/>
FROM hpjx.t_hppz006 WHERE 1=1
<include refid="condition"/>
<include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz006 WHERE 1=1 SELECT COUNT(*) FROM hpjx.t_hppz006 WHERE 1=1
<isNotEmpty prepend=" AND " property="id"> <include refid="condition"/>
ID = #id#
</isNotEmpty>
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hppz006 ( INSERT INTO ${hpjxSchema}.T_HPPZ006 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
INVENT_NAME, <!-- 存货名称 --> DEP_CODE, <!-- 部门编码 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_TYPE, <!-- 存货类型 --> INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
STATUS, <!-- 状态 0未启用 1启用 --> STATUS, <!-- 状态 0未启用 1启用 -->
SPEC, <!-- 规格 --> SPEC, <!-- 规格 -->
LENGTH, <!-- 长 --> LENGTH, <!-- 长 -->
...@@ -69,23 +92,22 @@ ...@@ -69,23 +92,22 @@
COEFFICIENT, <!-- 系数 --> COEFFICIENT, <!-- 系数 -->
UNIT, <!-- 单位 --> UNIT, <!-- 单位 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_NAME, <!-- 创建人名称 -->
DEP_CODE <!-- 部门编码 --> CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #depCode#, #inventType#, #inventCode#, #inventName#,
#status#, #spec#, #length#, #wide#, #thick#, #material#, #coefficient#,
#unit#, #createdBy#, #createdName#, #createdTime#
) )
VALUES ( #companyCode#, #inventName#, #inventCode#, #inventType#, #status#, #spec#, #length#, #wide#, #thick#, #material#, #coefficient#, #unit#, #createdBy#, #createdTime#, #depCode#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz006 WHERE DELETE FROM hpjx.t_hppz006 WHERE ID = #id#
ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz006 UPDATE hpjx.t_hppz006
SET SET
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 --> STATUS = #status#, <!-- 状态 0未启用 1启用 -->
SPEC = #spec#, <!-- 规格 --> SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 --> LENGTH = #length#, <!-- 长 -->
...@@ -95,14 +117,12 @@ ...@@ -95,14 +117,12 @@
COEFFICIENT = #coefficient#, <!-- 系数 --> COEFFICIENT = #coefficient#, <!-- 系数 -->
UNIT = #unit#, <!-- 单位 --> UNIT = #unit#, <!-- 单位 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE ID = #id#
WHERE
ID = #id#
</update> </update>
<select id="queryComboBox" parameterClass="java.util.HashMap" <select id="queryComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
ID as "id", ID as "id",
CONCAT(INVENT_CODE,'-',INVENT_NAME,'[',SPEC,']') as "inventName" CONCAT(INVENT_CODE,'-',INVENT_NAME,'[',SPEC,']') as "inventName"
......
...@@ -4,8 +4,7 @@ import com.baosight.hpjx.core.constant.CommonConstant; ...@@ -4,8 +4,7 @@ import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoBase; import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.pz.domain.HPPZ007; import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.HPPZ009; import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.domain.THppz004; import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.hp.pz.domain.THppz006;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -21,31 +20,33 @@ import java.util.stream.Collectors; ...@@ -21,31 +20,33 @@ import java.util.stream.Collectors;
public class HPPZTools { public class HPPZTools {
/** /**
* 查询存货名称 * 查询存货
* *
* @param inventCode * @param inventCode
* @return * @return
*/ */
public static String getInventNameByCode(String inventCode) { public static HPPZ004 getPz004ByCode(String inventCode) {
AssertUtils.isEmpty(inventCode, "存货编码不能为空"); AssertUtils.isEmpty(inventCode, "存货编码不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("inventCode", inventCode); queryMap.put("inventCode", inventCode);
List<THppz004> pz004s = DaoBase.getInstance().query("HPPZ004.queryMatNameByCode", queryMap); List<HPPZ004> pz004s = DaoBase.getInstance().query("HPPZ004.query", queryMap);
return CollectionUtils.isEmpty(pz004s) ? null : pz004s.get(0).getInventName(); AssertUtils.isNull(pz004s, String.format("存货编码[%s]不存在", inventCode));
return pz004s.get(0);
} }
/** /**
* 查询仓库名称 * 查询仓库
* *
* @param whCode * @param whCode
* @return * @return
*/ */
public static String getWhNameByCode(String whCode) { public static HPPZ007 getPz007ByCode(String whCode) {
AssertUtils.isEmpty(whCode, "仓库编码不能为空"); AssertUtils.isEmpty(whCode, "仓库编码不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("whCode", whCode); queryMap.put("whCode", whCode);
List<HPPZ007> pz007s = DaoBase.getInstance().query("HPPZ007.queryByWhCode", queryMap); List<HPPZ007> pz007s = DaoBase.getInstance().query("HPPZ007.queryByWhCode", queryMap);
return CollectionUtils.isEmpty(pz007s) ? null : pz007s.get(0).getWhName(); AssertUtils.isNull(pz007s, String.format("仓库编码[%s]不存在", whCode));
return pz007s.get(0);
} }
/** /**
...@@ -54,7 +55,7 @@ public class HPPZTools { ...@@ -54,7 +55,7 @@ public class HPPZTools {
* @param inventCodes * @param inventCodes
* @return * @return
*/ */
public static List<THppz004> listPz004(List<String> inventCodes) { public static List<HPPZ004> listPz004(List<String> inventCodes) {
if (CollectionUtils.isEmpty(inventCodes)) { if (CollectionUtils.isEmpty(inventCodes)) {
return null; return null;
} }
...@@ -69,12 +70,12 @@ public class HPPZTools { ...@@ -69,12 +70,12 @@ public class HPPZTools {
* @param inventCodes * @param inventCodes
* @return * @return
*/ */
public static Map<String, THppz004> mapPz004(List<String> inventCodes) { public static Map<String, HPPZ004> mapPz004(List<String> inventCodes) {
List<THppz004> pz004s = listPz004(inventCodes); List<HPPZ004> pz004s = listPz004(inventCodes);
if (CollectionUtils.isEmpty(pz004s)) { if (CollectionUtils.isEmpty(pz004s)) {
return null; return null;
} }
return pz004s.stream().collect(Collectors.toMap(THppz004::getInventCode, item -> item)); return pz004s.stream().collect(Collectors.toMap(HPPZ004::getInventCode, item -> item));
} }
/** /**
......
...@@ -3,9 +3,7 @@ import com.baosight.hpjx.common.DdynamicEnum; ...@@ -3,9 +3,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
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.HPKC008; import com.baosight.hpjx.hp.kc.domain.HPKC008;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.hp.sc.domain.THPSC001; import com.baosight.hpjx.hp.sc.domain.THPSC001;
import com.baosight.hpjx.hp.sc.domain.THPSC002;
import com.baosight.hpjx.hp.zl.domain.HPZL001; import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
......
...@@ -129,10 +129,9 @@ $(function() { ...@@ -129,10 +129,9 @@ $(function() {
}); });
/** /**
* 查询 * 页面加载时执行
*/ */
let query = function () { $(window).load(function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
// 存货名称 // 存货名称
let eiInfo = new EiInfo(); let eiInfo = new EiInfo();
EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, { EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, {
...@@ -150,6 +149,15 @@ let query = function () { ...@@ -150,6 +149,15 @@ let query = function () {
onFail: function (ei) { onFail: function (ei) {
} }
}, {async: false}); }, {async: false});
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
} }
/** /**
......
$(function() { $(function() {
// 查询 // 查询
$("#QUERY").on("click", function () { $("#QUERY").on("click", query);
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
});
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200], pageSizes: [10, 20, 30, 50, 100, 200]
}, }
} }
}); });
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
...@@ -6,49 +6,43 @@ ...@@ -6,49 +6,43 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="供应商档案"> <EF:EFPage title="供应商档案">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput ename="inqu_status-0-custName" cname="供应商名称" colWidth="4" readonly="false"/> <EF:EFSelect ename="inqu_status-0-custType" cname="供应商类型" colWidth="3"
<EF:EFSelect ename="inqu_status-0-custType" cname="供应商类型" colWidth="4" template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#" enable="true">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company_type_block_id" textField="valueField" valueField="textField"/> <EF:EFOptions blockId="company_type_block_id" textField="valueField" valueField="textField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="4" <EF:EFInput ename="inqu_status-0-custName" cname="供应商名称" colWidth="3" readonly="false"/>
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#" enable="true"> <EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="3"
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="initiate_mode_block_id" textField="valueField" valueField="textField"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true"> <EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="custCode" cname="供应商编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="custName" cname="供应商名称" width="100" required="true"/>
<EF:EFComboColumn ename="custType" cname="供应商类型" align="center" <EF:EFComboColumn ename="custType" cname="供应商类型" align="center"
blockName="company_type_block_id" blockName="company_type_block_id"
columnTemplate="#=textField#-#=valueField#" optionLabel=" " columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="valueField" itemTemplate="#=textField#-#=valueField#" textField="valueField"
valueField="textField" width="100" required="true"> valueField="textField" width="100" required="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="custCode" cname="供应商编码" width="100" readonly="false" required="true"/> <EF:EFColumn ename="address" cname="地址" width="120" required="true"/>
<EF:EFColumn ename="custName" cname="供应商名称" width="100" readonly="false" required="true"/> <EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true">
<EF:EFColumn ename="address" cname="地址" width="100" readonly="false" required="true"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
<EF:EFComboColumn ename="status" cname="状态" align="center"
blockName="initiate_mode_block_id"
columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="valueField"
valueField="textField" width="100" required="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="100" align="center" enable="false" <EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" /> <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
<EF:EFColumn ename="createdBy" cname="创建人" width="100" readonly="true" disabled="true"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" readonly="true" width="100" align="center" enable="false" <EF:EFColumn ename="updatedBy" cname="更新人" enable="false" width="100" align="center"/>
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" /> <EF:EFColumn ename="updatedTime" cname="更新时间" enable="false" width="140" align="center"
<EF:EFColumn ename="updatedBy" cname="更新人" width="100" readonly="true" disabled="true"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
$(function () { $(function() {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
pageSizes: [10, 20, 50, 70, 100], pageSizes: [10, 20, 30, 50, 100, 200]
},
} }
}
}); });
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
...@@ -4,54 +4,43 @@ ...@@ -4,54 +4,43 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="客户档案"> <EF:EFPage title="客户档案">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <%-- blockId="inqu_status" row="0" --%> <div class="row">
<EF:EFInput blockId="inqu_status" ename="custCname" cname="客户名称" row="0"/> <EF:EFInput cname="客户名称" ename="custName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="客户类型" optionLabel="全部" blockId="inqu_status" ename="custType" row="0"> <EF:EFSelect ename="inqu_status-0-custType" cname="客户类型" colWidth="3"
<EF:EFOption label="民营" value="1"/> template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="国营" value="2"/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company_type_block_id" textField="valueField" valueField="textField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="状态" optionLabel="全部" blockId="inqu_status" ename="status" row="0"> <EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="3"
<EF:EFOption label="启用" value="1"/> template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="停用" value="0"/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no"> <EF:EFGrid blockId="result" autoDraw="override">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn required="true" align="center" ename="custType" cname="客户类型"> <EF:EFColumn ename="custCode" cname="客户编码" enable="false" width="100" align="center"/>
<EF:EFOption label="民营" value="1"/> <EF:EFComboColumn ename="custType" cname="客户类型" width="100" align="center"
<EF:EFOption label="国营" value="2"/> blockName="company_type_block_id" itemTemplate="#=textField#-#=valueField#"
textField="valueField" valueField="textField" required="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn equired="true" ename="custCode" cname="客户编码"/> <EF:EFColumn ename="custName" cname="客户名称" width="120" align="center" required="true"/>
<EF:EFColumn equired="true" ename="custCname" cname="客户名称"/> <EF:EFColumn ename="address" cname="地址" width="150" align="center" required="true"/>
<EF:EFColumn ename="custAddr" cname="地址"/> <EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true">
<EF:EFComboColumn required="true" ename="status" cname="状态" align="center" <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
columnTemplate="#=valueField#-#=textField#" optionLabel=" "
itemTemplate="#=valueField#-#=textField#" textField="textField"
valueField="valueField" width="100">
<EF:EFOption label="--请选择--" value=""></EF:EFOption>
<EF:EFOption label="启用" value="1"></EF:EFOption>
<EF:EFOption label="禁用" value="0"></EF:EFOption>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="createdBy" enable="false" cname="创建人"/> <EF:EFColumn ename="createdName" cname="创建人名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" dateFormat="yyyy-MM-dd HH:mm:ss" enable="false" cname="创建时间"/> <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
<EF:EFColumn ename="updatedBy" enable="false" cname="修改人"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="updatedTime" dateFormat="yyyy-MM-dd HH:mm:ss" enable="false" cname="修改时间"/> <EF:EFColumn ename="updatedName" cname="更新人名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/PZ/HPPZ003.js"></script>
\ No newline at end of file
$(function() { $(function() {
// 查询 // 查询
$("#QUERY").on("click", function () { $("#QUERY").on("click", query);
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
});
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200], pageSizes: [10, 20, 30, 50, 100, 200]
}, }
} }
}); });
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
...@@ -6,49 +6,40 @@ ...@@ -6,49 +6,40 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="存货类型"> <EF:EFPage title="存货类型">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect ename="inqu_status-0-inventType" cname="存货类型" colWidth="4" <EF:EFInput cname="存货名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#" enable="true"> <EF:EFSelect cname="存货类型" ename="inventType" blockId="inqu_status" row="0" colWidth="3" filter="contains"
<EF:EFOption label="全部" value=""/> defaultValue="">
<EF:EFOptions blockId="customer_type_block_id" textField="valueField" valueField="textField"/> <EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="4" <EF:EFSelect cname="状态" ename="inqu_status-0-status" colWidth="3"
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#" enable="true"> template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="initiate_mode_block_id" textField="valueField" valueField="textField"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true"> <EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="inventCode" cname="类型编码" width="100" readonly="false" required="true"/> <EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="100" readonly="false" required="true"/> <EF:EFColumn ename="inventName" cname="存货名称" width="120" required="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" align="center" <EF:EFComboColumn ename="inventType" cname="存货类型" width="90" align="center">
blockName="customer_type_block_id" <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="valueField"
valueField="textField" width="100" required="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="状态" align="center" <EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true">
blockName="initiate_mode_block_id" <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="valueField"
valueField="textField" width="100" required="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="100" align="center" enable="false" <EF:EFColumn ename="createdName" cname="创建人名称" enable="false" width="100" align="center"/>
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" /> <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
<EF:EFColumn ename="createdBy" cname="创建人" width="100" readonly="true" disabled="true"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" readonly="true" width="100" align="center" enable="false" <EF:EFColumn ename="updatedName" cname="更新人名称" enable="false" width="100" align="center"/>
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" /> <EF:EFColumn ename="updatedTime" cname="更新时间" enable="false" width="140" align="center"
<EF:EFColumn ename="updatedBy" cname="更新人" width="100" readonly="true" disabled="true"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
var inventNameGlobalData = [];
$(function() { $(function() {
// 查询 // 查询
$("#QUERY").on("click", function () { $("#QUERY").on("click", query);
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
});
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200], pageSizes: [10, 20, 30, 50, 100, 200]
}, },
columns: [{
field: "inventCode",
template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
return inventNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
var grid = container.closest(".k-grid").data("kendoGrid");
var cellIndex = grid.cellIndex(container);
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
let eiInfo = new EiInfo();
eiInfo.set("inventType", options.model["inventType"]);
var dataSource;
EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("invent_name_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataValueField: "valueField",
dataSource: dataSource,
template: "#=textField#"
});
}
}]
} }
}); });
/**
* 页面加载时执行
*/
$(window).load(function () {
// 存货名称
let inInfo = new EiInfo();
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
...@@ -6,79 +6,53 @@ ...@@ -6,79 +6,53 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="存货档案"> <EF:EFPage title="存货档案">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect ename="inqu_status-0-inventName" cname="存货名称" <EF:EFSelect cname="存货类型" ename="inventType" blockId="inqu_status" row="0" colWidth="3" filter="contains"
valueTemplate="#=textField#" defaultValue="">
template="#=textField#" <EF:EFOption label="请选择" value=""/>
textField="textField" <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
valueField="valueField" </EF:EFSelect>
required="true" <EF:EFSelect ename="inqu_status-0-inventCode" cname="存货名称" colWidth="3" filter="contains">
locked="true"
filter="contains">
<EF:EFOption label="--全部--" value=""/> <EF:EFOption label="--全部--" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="状态" ename="inqu_status-0-status" colWidth="3"
<EF:EFSelect ename="inqu_status-0-inventType" cname="存货类型" colWidth="4" template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#" enable="true">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_type_block_id" textField="valueField" valueField="textField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="4"
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#" enable="true">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="initiate_mode_block_id" textField="valueField" valueField="textField"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true"> <EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center">
<EF:EFComboColumn ename="inventName" cname="存货名称" <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
columnTemplate="#=textField#"
itemTemplate="#=textField#"
blockName="invent_name_block_id"
textField="textField"
valueField="textField"
maxLength="20"
readonly="false"
style="color:blue;"
required="true"
filter="contains"
width="150">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventType" cname="存货类型" align="center"
blockName="customer_type_block_id"
columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="valueField"
valueField="textField" width="100" required="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="spec" cname="规格" width="100" readonly="false" required="true"/> <EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center"/>
<EF:EFColumn ename="length" cname="长" width="100" readonly="false" required="true"/> <EF:EFColumn ename="spec" cname="规格" width="120" align="center" maxLength="50"
<EF:EFColumn ename="wide" cname="宽" width="100" readonly="false" required="true"/> required="true"/>
<EF:EFColumn ename="thick" cname="厚" width="100" readonly="false" required="true"/> <EF:EFColumn ename="length" cname="长" width="100" align="right" format="{0:N2}" maxLength="10"
<EF:EFColumn ename="material" cname="材质" width="100" readonly="false" required="true"/> required="true"/>
<EF:EFColumn ename="coefficient" cname="系数" width="100" readonly="false" required="true"/> <EF:EFColumn ename="wide" cname="宽" width="100" align="right" format="{0:N2}" maxLength="10"
<EF:EFColumn ename="unit" cname="单位" width="100" readonly="false" required="true"/> required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" <EF:EFColumn ename="thick" cname="厚" width="100" align="right" format="{0:N2}" maxLength="10"
blockName="initiate_mode_block_id" required="true"/>
columnTemplate="#=textField#-#=valueField#" optionLabel=" " <EF:EFColumn ename="material" cname="材质" width="100" align="center" required="true"/>
itemTemplate="#=textField#-#=valueField#" textField="valueField" <EF:EFColumn ename="coefficient" cname="系数" width="100" align="right" format="{0:N2}" maxLength="10"
valueField="textField" width="100" required="true"> required="true"/>
<EF:EFColumn ename="unit" cname="单位" width="100" align="center" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="100" align="center" enable="false" <EF:EFColumn ename="createdName" cname="创建人名称" enable="false" width="100" align="center"/>
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" /> <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
<EF:EFColumn ename="createdBy" cname="创建人" width="100" readonly="true" disabled="true"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" readonly="true" width="100" align="center" enable="false" <EF:EFColumn ename="updatedName" cname="更新人名称" enable="false" width="100" align="center"/>
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" /> <EF:EFColumn ename="updatedTime" cname="更新时间" enable="false" width="140" align="center"
<EF:EFColumn ename="updatedBy" cname="更新人" width="100" readonly="true" disabled="true"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </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