Commit 055e978a by 宋祥

1.收发存汇总

parent c827f072
...@@ -42,8 +42,16 @@ public enum DdynamicEnum { ...@@ -42,8 +42,16 @@ public enum DdynamicEnum {
* 编写:wwl * 编写:wwl
*/ */
INVENT_RECORD_BLOCK_ID("invent_record_block_id","id","inventName","HPPZ006.queryComboBox"), INVENT_RECORD_BLOCK_ID("invent_record_block_id","id","inventName","HPPZ006.queryComboBox"),
/** /**
* 模块:存货档案
* 用途:存货档案下拉框
* 编写:wwl
*/
INVENT_SPEC_BLOCK_ID("invent_spec_block_id","spec","spec","HPPZ006.queryComboBoxSpec"),
/**
* 模块:仓库档案 * 模块:仓库档案
* 用途:仓库档案下拉框 * 用途:仓库档案下拉框
* 编写:wwl * 编写:wwl
......
...@@ -24,4 +24,18 @@ public class CommonConstant { ...@@ -24,4 +24,18 @@ public class CommonConstant {
public static final String NO = "N"; public static final String NO = "N";
} }
/**
* 日期类型
*
* @author:songx
* @date:2024/1/20,15:04
*/
public static class DateType {
// 月
public static final String MONTH = "MONTH";
// 日
public static final String DAY = "DAY";
}
} }
...@@ -46,6 +46,11 @@ public class DaoUtils { ...@@ -46,6 +46,11 @@ public class DaoUtils {
setCreator((DaoEPBase) obj); setCreator((DaoEPBase) obj);
} else if (obj instanceof Map) { } else if (obj instanceof Map) {
setCreator((Map) obj); setCreator((Map) obj);
} else if (obj instanceof List) {
for (Object o : ((List) obj)) {
insert(sql, o);
}
return;
} }
DaoBase.getInstance().insert(sql, obj); DaoBase.getInstance().insert(sql, obj);
} }
......
package com.baosight.hpjx.hp.constant;
/**
* @author:songx
* @date:2024/1/18,17:16
*/
public class HPConstant {
/**
* 序列号
*
* @author:songx
* @date:2021/8/17,15:22
*/
public class SequenceId {
// 盘点单号
public static final String STATISTICAL_NUMBER = "STATISTICAL_NUMBER";
// 统计单号
public static final String HPKC008_NUMBER = "HPKC008_NUMBER";
// 巡检单号
public static final String HPZL001_NUMBER = "HPZL001_NUMBER";
}
/**
* 库存类型
*
* @author:songx
* @date:2024/1/20,15:18
*/
public class KcType {
// 采购
public static final String CG = "CG";
// 生产
public static final String SC = "SC";
// 其他
public static final String QT = "QT";
}
}
package com.baosight.hpjx.hp.constant;
/**
* @author:songx
* @date:2024/1/18,17:16
*/
public class HPSqlConstant {
/**
* HPPZ010 SQL 定义
*
* @author:songx
* @date:2024/1/18,17:17
*/
public class HPPZ010 {
// 新增
public static final String INSERT = "HPPZ010.insert";
// 查询
public static final String QUERY = "HPPZ010.query";
}
}
...@@ -12,11 +12,11 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -12,11 +12,11 @@ import com.baosight.iplat4j.core.util.StringUtils;
/** /**
* THpkc003 * THpkc003
* *
*/ */
public class THpkc003 extends DaoEPBase { public class HPKC003 extends DaoEPBase {
private Long id = 0L; private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private String documentDate = " "; /* 单据日期*/ private String documentDate = " "; /* 单据日期*/
...@@ -113,12 +113,12 @@ EiColumn eiColumn; ...@@ -113,12 +113,12 @@ EiColumn eiColumn;
/** /**
* the constructor * the constructor
*/ */
public THpkc003() { public HPKC003() {
initMetaData(); initMetaData();
} }
/** /**
* get the id * get the id
* @return the id * @return the id
*/ */
public Long getId() { public Long getId() {
...@@ -126,7 +126,7 @@ initMetaData(); ...@@ -126,7 +126,7 @@ initMetaData();
} }
/** /**
* set the id * set the id
*/ */
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
...@@ -406,4 +406,4 @@ Map map = new HashMap(); ...@@ -406,4 +406,4 @@ Map map = new HashMap();
return map; return map;
} }
} }
\ No newline at end of file
...@@ -22,15 +22,16 @@ public class HPKC005 extends DaoEPBase { ...@@ -22,15 +22,16 @@ public class HPKC005 extends DaoEPBase {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/ public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_RECEIPT_DATE = "receiptDate"; /* 单据日期*/ public static final String FIELD_RECEIPT_DATE = "receiptDate"; /* 单据日期*/
public static final String FIELD_STATISTICAL_NUMBER = "statisticalNumber"; /* 盘点单号*/ public static final String FIELD_STATISTICAL_NUMBER = "statisticalNumber"; /* 盘点单号*/
public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/ public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/ public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
public static final String FIELD_MAT_TYPE = "matType"; /* 物料类型*/ public static final String FIELD_INVENT_TYPE = "inventType"; /* 物料类型*/
public static final String FIELD_MAT_CODE = "matCode"; /* 物料编码*/ public static final String FIELD_INVENT_CODE = "inventCode"; /* 物料编码*/
public static final String FIELD_MAT_NAME = "matName"; /* 物料名称*/ public static final String FIELD_INVENT_NAME = "inventName"; /* 物料名称*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_BOOK_AMOUNT = "bookAmount"; /* 账面数量*/ public static final String FIELD_BOOK_AMOUNT = "bookAmount"; /* 账面数量*/
public static final String FIELD_BOOK_WEIGHT = "bookWeight"; /* 账面重量*/ public static final String FIELD_BOOK_WEIGHT = "bookWeight"; /* 账面重量*/
public static final String FIELD_ENTITY_AMOUNT = "entityAmount"; /* 实物数量*/ public static final String FIELD_ENTITY_AMOUNT = "entityAmount"; /* 实物数量*/
...@@ -45,15 +46,16 @@ public class HPKC005 extends DaoEPBase { ...@@ -45,15 +46,16 @@ public class HPKC005 extends DaoEPBase {
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_RECEIPT_DATE = "RECEIPT_DATE"; /* 单据日期*/ public static final String COL_RECEIPT_DATE = "RECEIPT_DATE"; /* 单据日期*/
public static final String COL_STATISTICAL_NUMBER = "STATISTICAL_NUMBER"; /* 盘点单号*/ public static final String COL_STATISTICAL_NUMBER = "STATISTICAL_NUMBER"; /* 盘点单号*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/ public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/ public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
public static final String COL_MAT_TYPE = "MAT_TYPE"; /* 物料类型*/ public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 物料类型*/
public static final String COL_MAT_CODE = "MAT_CODE"; /* 物料编码*/ public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 物料编码*/
public static final String COL_MAT_NAME = "MAT_NAME"; /* 物料名称*/ public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 物料名称*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_BOOK_AMOUNT = "BOOK_AMOUNT"; /* 账面数量*/ public static final String COL_BOOK_AMOUNT = "BOOK_AMOUNT"; /* 账面数量*/
public static final String COL_BOOK_WEIGHT = "BOOK_WEIGHT"; /* 账面重量*/ public static final String COL_BOOK_WEIGHT = "BOOK_WEIGHT"; /* 账面重量*/
public static final String COL_ENTITY_AMOUNT = "ENTITY_AMOUNT"; /* 实物数量*/ public static final String COL_ENTITY_AMOUNT = "ENTITY_AMOUNT"; /* 实物数量*/
...@@ -74,15 +76,16 @@ public class HPKC005 extends DaoEPBase { ...@@ -74,15 +76,16 @@ public class HPKC005 extends DaoEPBase {
public static final String UPDATE = "t_hpkc005.update"; public static final String UPDATE = "t_hpkc005.update";
public static final String DELETE = "t_hpkc005.delete"; public static final String DELETE = "t_hpkc005.delete";
private Long id = new Long(0); private Long id = new Long(0);
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
private String receiptDate = " "; /* 单据日期*/ private String receiptDate = " "; /* 单据日期*/
private String statisticalNumber = " "; /* 盘点单号*/ private String statisticalNumber = " "; /* 盘点单号*/
private String whCode = " "; /* 仓库编码*/ private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/ private String whName = " "; /* 仓库名称*/
private String matType = " "; /* 物料类型*/ private String inventType = " "; /* 物料类型*/
private String matCode = " "; /* 物料编码*/ private String inventCode = " "; /* 物料编码*/
private String matName = " "; /* 物料名称*/ private String inventName = " "; /* 物料名称*/
private String spec = " "; /* 规格*/
private BigDecimal bookAmount = new BigDecimal(0.00); /* 账面数量*/ private BigDecimal bookAmount = new BigDecimal(0.00); /* 账面数量*/
private BigDecimal bookWeight = new BigDecimal(0.00); /* 账面重量*/ private BigDecimal bookWeight = new BigDecimal(0.00); /* 账面重量*/
private BigDecimal entityAmount = new BigDecimal(0.00); /* 实物数量*/ private BigDecimal entityAmount = new BigDecimal(0.00); /* 实物数量*/
...@@ -128,16 +131,20 @@ public class HPKC005 extends DaoEPBase { ...@@ -128,16 +131,20 @@ public class HPKC005 extends DaoEPBase {
eiColumn.setDescName("仓库名称"); eiColumn.setDescName("仓库名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAT_TYPE); eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("物料类型"); eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAT_CODE); eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("物料编码"); eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAT_NAME); eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("物料名称"); eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BOOK_AMOUNT); eiColumn = new EiColumn(FIELD_BOOK_AMOUNT);
...@@ -231,7 +238,7 @@ public class HPKC005 extends DaoEPBase { ...@@ -231,7 +238,7 @@ public class HPKC005 extends DaoEPBase {
/** /**
* set the id . * set the id .
* *
* @param id * @param id
*/ */
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
...@@ -320,50 +327,59 @@ public class HPKC005 extends DaoEPBase { ...@@ -320,50 +327,59 @@ public class HPKC005 extends DaoEPBase {
* get the matType - 物料类型. * get the matType - 物料类型.
* @return the matType * @return the matType
*/ */
public String getMatType() { public String getInventType() {
return this.matType; return this.inventType;
} }
/** /**
* set the matType - 物料类型. * set the matType - 物料类型.
* *
* @param matType - 物料类型 * @param inventType - 物料类型
*/ */
public void setMatType(String matType) { public void setInventType(String inventType) {
this.matType = matType; this.inventType = inventType;
} }
/** /**
* get the matCode - 物料编码. * get the matCode - 物料编码.
* @return the matCode * @return the matCode
*/ */
public String getMatCode() { public String getInventCode() {
return this.matCode; return this.inventCode;
} }
/** /**
* set the matCode - 物料编码. * set the matCode - 物料编码.
* *
* @param matCode - 物料编码 * @param inventCode - 物料编码
*/ */
public void setMatCode(String matCode) { public void setInventCode(String inventCode) {
this.matCode = matCode; this.inventCode = inventCode;
} }
/** /**
* get the matName - 物料名称. * get the matName - 物料名称.
* @return the matName * @return the matName
*/ */
public String getMatName() { public String getInventName() {
return this.matName; return this.inventName;
} }
/** /**
* set the matName - 物料名称. * set the matName - 物料名称.
* *
* @param matName - 物料名称 * @param inventName - 物料名称
*/ */
public void setMatName(String matName) { public void setInventName(String inventName) {
this.matName = matName; this.inventName = inventName;
}
public String getSpec() {
return spec;
}
public void setSpec(String spec) {
this.spec = spec;
} }
/** /**
* get the bookAmount - 账面数量. * get the bookAmount - 账面数量.
* @return the bookAmount * @return the bookAmount
...@@ -586,9 +602,10 @@ public class HPKC005 extends DaoEPBase { ...@@ -586,9 +602,10 @@ public class HPKC005 extends DaoEPBase {
setStatisticalNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_STATISTICAL_NUMBER)), statisticalNumber)); setStatisticalNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_STATISTICAL_NUMBER)), statisticalNumber));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode)); setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName)); setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
setMatType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MAT_TYPE)), matType)); setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setMatCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MAT_CODE)), matCode)); setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setMatName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MAT_NAME)), matName)); setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setBookAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_BOOK_AMOUNT)), bookAmount)); setBookAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_BOOK_AMOUNT)), bookAmount));
setBookWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_BOOK_WEIGHT)), bookWeight)); setBookWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_BOOK_WEIGHT)), bookWeight));
setEntityAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ENTITY_AMOUNT)), entityAmount)); setEntityAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ENTITY_AMOUNT)), entityAmount));
...@@ -617,9 +634,10 @@ public class HPKC005 extends DaoEPBase { ...@@ -617,9 +634,10 @@ public class HPKC005 extends DaoEPBase {
map.put(FIELD_STATISTICAL_NUMBER, StringUtils.toString(statisticalNumber, eiMetadata.getMeta(FIELD_STATISTICAL_NUMBER))); map.put(FIELD_STATISTICAL_NUMBER, StringUtils.toString(statisticalNumber, eiMetadata.getMeta(FIELD_STATISTICAL_NUMBER)));
map.put(FIELD_WH_CODE, StringUtils.toString(whCode, eiMetadata.getMeta(FIELD_WH_CODE))); map.put(FIELD_WH_CODE, StringUtils.toString(whCode, eiMetadata.getMeta(FIELD_WH_CODE)));
map.put(FIELD_WH_NAME, StringUtils.toString(whName, eiMetadata.getMeta(FIELD_WH_NAME))); map.put(FIELD_WH_NAME, StringUtils.toString(whName, eiMetadata.getMeta(FIELD_WH_NAME)));
map.put(FIELD_MAT_TYPE, StringUtils.toString(matType, eiMetadata.getMeta(FIELD_MAT_TYPE))); map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
map.put(FIELD_MAT_CODE, StringUtils.toString(matCode, eiMetadata.getMeta(FIELD_MAT_CODE))); map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_MAT_NAME, StringUtils.toString(matName, eiMetadata.getMeta(FIELD_MAT_NAME))); map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_BOOK_AMOUNT, StringUtils.toString(bookAmount, eiMetadata.getMeta(FIELD_BOOK_AMOUNT))); map.put(FIELD_BOOK_AMOUNT, StringUtils.toString(bookAmount, eiMetadata.getMeta(FIELD_BOOK_AMOUNT)));
map.put(FIELD_BOOK_WEIGHT, StringUtils.toString(bookWeight, eiMetadata.getMeta(FIELD_BOOK_WEIGHT))); map.put(FIELD_BOOK_WEIGHT, StringUtils.toString(bookWeight, eiMetadata.getMeta(FIELD_BOOK_WEIGHT)));
map.put(FIELD_ENTITY_AMOUNT, StringUtils.toString(entityAmount, eiMetadata.getMeta(FIELD_ENTITY_AMOUNT))); map.put(FIELD_ENTITY_AMOUNT, StringUtils.toString(entityAmount, eiMetadata.getMeta(FIELD_ENTITY_AMOUNT)));
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.common.InventTypeEnun;
import com.baosight.hpjx.hp.kc.domain.THpkc003;
import com.baosight.hpjx.hp.pz.domain.THppz006;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.StringUtil; import com.baosight.hpjx.util.StringUtil;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
...@@ -13,8 +9,6 @@ import com.baosight.iplat4j.core.ei.EiInfo; ...@@ -13,8 +9,6 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
...@@ -28,7 +22,7 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -28,7 +22,7 @@ public class ServiceHPKC003 extends ServiceBase {
* 画面初始化. * 画面初始化.
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
THpkc003 hpkc003 = new THpkc003(); HPKC003 hpkc003 = new HPKC003();
EiInfo outInfo = new EiInfo(); EiInfo outInfo = new EiInfo();
outInfo.addBlock(EiConstant.resultBlock); outInfo.addBlock(EiConstant.resultBlock);
outInfo.getBlock(EiConstant.resultBlock).addBlockMeta(hpkc003.eiMetadata); outInfo.getBlock(EiConstant.resultBlock).addBlockMeta(hpkc003.eiMetadata);
...@@ -41,7 +35,7 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -41,7 +35,7 @@ public class ServiceHPKC003 extends ServiceBase {
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ /* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPKC003.query", new THpkc003()); EiInfo outInfo = super.query(inInfo, "HPKC003.query", new HPKC003());
return outInfo; return outInfo;
} }
...@@ -84,7 +78,7 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -84,7 +78,7 @@ public class ServiceHPKC003 extends ServiceBase {
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock); CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
THpkc003 hpkc003 = new THpkc003(); HPKC003 hpkc003 = new HPKC003();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
...@@ -109,7 +103,7 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -109,7 +103,7 @@ public class ServiceHPKC003 extends ServiceBase {
* 删除操作. * 删除操作.
*/ */
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo eiInfo) {
THpkc003 hpkc003 = new THpkc003(); HPKC003 hpkc003 = new HPKC003();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try { try {
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.core.dao.DaoUtils;
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.THppz004;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil; 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;
...@@ -10,9 +17,13 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase; ...@@ -10,9 +17,13 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -20,28 +31,37 @@ import java.util.Map; ...@@ -20,28 +31,37 @@ import java.util.Map;
* @date 2024年01月09日 10:18 * @date 2024年01月09日 10:18
*/ */
public class ServiceHPKC008 extends ServiceBase { public class ServiceHPKC008 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
HPKC008 HPKC008 = new HPKC008(); try {
EiInfo outInfo = super.initLoad(inInfo, HPKC008); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
outInfo.addBlock(EiConstant.queryBlock).setCell(0,"datemonth",CommonMethod.getCurrentSameYearMonth()); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC008().eiMetadata);
outInfo.getBlock(EiConstant.resultBlock).getRows().clear(); } catch (Exception e) {
return outInfo; LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
return inInfo;
}
/** /**
* 查询操作. * 查询操作.
*/ */
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
String datemonth = inInfo.getCellStr(EiConstant.queryBlock,0,"datemonth"); try {
inInfo.setCell(EiConstant.queryBlock,0,"datemonth", StringUtil.removeHorizontalLine(datemonth)); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
/* 调用EI查询方法.*/ String receiptDate = MapUtils.getString(queryRow, "receiptDate");
return super.query(inInfo, "HPKC008.query", new HPKC008()); queryRow.put("receiptDate", StringUtil.removeSpecifiedCharacter(receiptDate,
StringUtil.DEFAULT_CHARACTER_TO_BE_REMOVED));
inInfo = super.query(inInfo, "HPKC008.query", new HPKC008());
List sum = dao.query("HPKC008.querySum", queryRow);
inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
} }
/** /**
...@@ -49,13 +69,30 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -49,13 +69,30 @@ public class ServiceHPKC008 extends ServiceBase {
*/ */
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock); CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock);
for (int i = 0; i < inInfo.getBlock(EiConstant.resultBlock).getRowCount(); i++) { List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
String datemonth = inInfo.getCellStr(EiConstant.resultBlock,i,"datemonth"); for (int i = 0; i < resultRows.size(); i++) {
inInfo.setCell(EiConstant.resultBlock,i,"datemonth", StringUtil.removeHorizontalLine(datemonth)); Map resultRow = resultRows.get(i);
} // 去除日期字符串中的-
return super.insert(inInfo,"HPKC008.insert"); String datemonth = MapUtils.getString(resultRow, "datemonth");
resultRow.put("datemonth", StringUtil.removeHorizontalLine(datemonth));
// 物料名称
Map params1 = new HashMap<>();
params1.put("inventCode", MapUtils.getString(resultRow, "materialCode"));
List query1 = dao.query("HPPZ004.queryMatNameByCode", params1);
String matName = ((THppz004) query1.get(0)).getInventName();
resultRow.put("materialName", matName);
// 生成单据号
resultRow.put("statisticalNumber", SequenceGenerator.getNextSequence(
HPConstant.SequenceId.HPKC008_NUMBER));
DaoUtils.insert("HPKC008.insert", resultRow);
}
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
} }
......
...@@ -41,6 +41,9 @@ ...@@ -41,6 +41,9 @@
<isNotEmpty prepend=" AND " property="documentCode"> <isNotEmpty prepend=" AND " property="documentCode">
DOCUMENT_CODE LIKE CONCAT('%',CONCAT( #documentCode#,'%')) DOCUMENT_CODE LIKE CONCAT('%',CONCAT( #documentCode#,'%'))
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -49,7 +52,6 @@ ...@@ -49,7 +52,6 @@
ID asc ID asc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
...@@ -170,4 +172,23 @@ ...@@ -170,4 +172,23 @@
WHERE ID = #id# WHERE ID = #id#
</update> </update>
<!-- 按天统计 -->
<select id="statDay" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC001">
SELECT
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
MATERIAL_TYPE AS "materialType",
MATERIAL_CODE AS "materialCode",
SPEC AS "spec",
COALESCE(SUM(QUANTITY), 0) AS "quantity",
COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC001
WHERE 1=1
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, MATERIAL_TYPE, MATERIAL_CODE, SPEC
</select>
</sqlMap> </sqlMap>
...@@ -170,4 +170,23 @@ ...@@ -170,4 +170,23 @@
WHERE ID = #id# WHERE ID = #id#
</update> </update>
<!-- 按天统计 -->
<select id="statDay" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC002">
SELECT
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
MATERIAL_TYPE AS "materialType",
MATERIAL_CODE AS "materialCode",
SPEC AS "spec",
COALESCE(SUM(QUANTITY), 0) AS "quantity",
COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC002
WHERE 1=1
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, MATERIAL_TYPE, MATERIAL_CODE, SPEC
</select>
</sqlMap> </sqlMap>
...@@ -3,31 +3,31 @@ ...@@ -3,31 +3,31 @@
<!-- table information <!-- table information
Generate time : 2024-01-12 14:21:33 Generate time : 2024-01-12 14:21:33
Version : 1.0 Version : 1.0
tableName :hpjx.t_hpkc003 tableName :hpjx.t_hpkc003
ID BIGINT NOT NULL primarykey, ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL, COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR, DEP_CODE VARCHAR,
DOCUMENT_DATE VARCHAR NOT NULL, DOCUMENT_DATE VARCHAR NOT NULL,
PRODUCTION_NUMBER VARCHAR NOT NULL, PRODUCTION_NUMBER VARCHAR NOT NULL,
WAREHOUSE_CODE VARCHAR NOT NULL, WAREHOUSE_CODE VARCHAR NOT NULL,
WAREHOUSE_NAME VARCHAR NOT NULL, WAREHOUSE_NAME VARCHAR NOT NULL,
MATERIAL_TYPE TINYINT NOT NULL, MATERIAL_TYPE TINYINT NOT NULL,
MATERIAL_CODE VARCHAR NOT NULL, MATERIAL_CODE VARCHAR NOT NULL,
MATERIAL_NAME VARCHAR NOT NULL, MATERIAL_NAME VARCHAR NOT NULL,
NUMBER VARCHAR NOT NULL, NUMBER VARCHAR NOT NULL,
WEIGHT VARCHAR NOT NULL, WEIGHT VARCHAR NOT NULL,
REMARK VARCHAR, REMARK VARCHAR,
CREATED_BY VARCHAR, CREATED_BY VARCHAR,
CREATED_TIME VARCHAR, CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR, UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR UPDATED_TIME VARCHAR
--> -->
<sqlMap namespace="HPKC003"> <sqlMap namespace="HPKC003">
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.kc.domain.THpkc003"> resultClass="com.baosight.hpjx.hp.kc.domain.HPKC003">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
DOCUMENT_DATE as "documentDate", <!-- 单据日期 --> DOCUMENT_DATE as "documentDate", <!-- 单据日期 -->
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
ID asc ID asc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
...@@ -74,8 +74,8 @@ ...@@ -74,8 +74,8 @@
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
</select> </select>
<!-- <!--
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -145,32 +145,50 @@ ...@@ -145,32 +145,50 @@
REMARK, <!-- 备注 --> REMARK, <!-- 备注 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_TIME <!-- 创建时间 --> CREATED_TIME <!-- 创建时间 -->
) )
VALUES ( #companyCode#, #depCode#, #documentDate#, #productionNumber#, #warehouseCode#, #warehouseName#, #materialType#, #materialCode#, #materialName#, #number#, #weight#, #remark#, #createdBy#, #createdTime#) VALUES ( #companyCode#, #depCode#, #documentDate#, #productionNumber#, #warehouseCode#, #warehouseName#, #materialType#, #materialCode#, #materialName#, #number#, #weight#, #remark#, #createdBy#, #createdTime#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hpkc003 WHERE DELETE FROM hpjx.t_hpkc003 WHERE
ID = #id# ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hpkc003 UPDATE hpjx.t_hpkc003
SET SET
DOCUMENT_DATE = #documentDate#, <!-- 单据日期 --> DOCUMENT_DATE = #documentDate#, <!-- 单据日期 -->
PRODUCTION_NUMBER = #productionNumber#, <!-- 生产入库单号 --> PRODUCTION_NUMBER = #productionNumber#, <!-- 生产入库单号 -->
WAREHOUSE_CODE = #warehouseCode#, <!-- 仓库编码 --> WAREHOUSE_CODE = #warehouseCode#, <!-- 仓库编码 -->
WAREHOUSE_NAME = #warehouseName#, <!-- 仓库名称 --> WAREHOUSE_NAME = #warehouseName#, <!-- 仓库名称 -->
MATERIAL_TYPE = #materialType#, <!-- 物料类型 --> MATERIAL_TYPE = #materialType#, <!-- 物料类型 -->
MATERIAL_CODE = #materialCode#, <!-- 物料编码 --> MATERIAL_CODE = #materialCode#, <!-- 物料编码 -->
MATERIAL_NAME = #materialName#, <!-- 物料名称 --> MATERIAL_NAME = #materialName#, <!-- 物料名称 -->
NUMBER = #number#, <!-- 数量 --> NUMBER = #number#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 --> WEIGHT = #weight#, <!-- 重量 -->
REMARK = #remark#, <!-- 备注 --> REMARK = #remark#, <!-- 备注 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
</sqlMap> <!-- 按天统计 -->
\ No newline at end of file <select id="statDay" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC003">
SELECT
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WAREHOUSE_CODE AS "warehouseCode",
MATERIAL_TYPE AS "materialType",
MATERIAL_CODE AS "materialCode",
COALESCE(SUM(NUMBER), 0) AS "number",
COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC003
WHERE 1=1
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WAREHOUSE_CODE, MATERIAL_TYPE, MATERIAL_CODE
</select>
</sqlMap>
...@@ -4,23 +4,23 @@ ...@@ -4,23 +4,23 @@
Version : 1.0 Version : 1.0
schema : hpjx schema : hpjx
tableName : T_HPKC004 tableName : T_HPKC004
ID BIGINT NOT NULL primarykey, ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL, COMPANY_CODE VARCHAR NOT NULL,
RECEIPT_DATE VARCHAR NOT NULL, RECEIPT_DATE VARCHAR NOT NULL,
SALE_NUMBER VARCHAR NOT NULL, SALE_NUMBER VARCHAR NOT NULL,
WH_CODE VARCHAR NOT NULL, WH_CODE VARCHAR NOT NULL,
WH_NAME VARCHAR NOT NULL, WH_NAME VARCHAR NOT NULL,
MAT_TYPE VARCHAR, MAT_TYPE VARCHAR,
MAT_CODE VARCHAR, MAT_CODE VARCHAR,
MAT_NAME VARCHAR, MAT_NAME VARCHAR,
AMOUNT DECIMAL, AMOUNT DECIMAL,
WEIGHT DECIMAL, WEIGHT DECIMAL,
STATUS TINYINT NOT NULL, STATUS TINYINT NOT NULL,
NOTES VARCHAR, NOTES VARCHAR,
CREATED_BY VARCHAR, CREATED_BY VARCHAR,
CREATED_TIME VARCHAR, CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR, UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR, UPDATED_TIME VARCHAR,
DEP_CODE VARCHAR DEP_CODE VARCHAR
--> -->
<sqlMap namespace="HPKC004"> <sqlMap namespace="HPKC004">
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.kc.domain.HPKC004"> resultClass="com.baosight.hpjx.hp.kc.domain.HPKC004">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 --> RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
SALE_NUMBER as "saleNumber", <!-- 销售出库单号 --> SALE_NUMBER as "saleNumber", <!-- 销售出库单号 -->
...@@ -247,4 +247,22 @@ ...@@ -247,4 +247,22 @@
ID = #id# ID = #id#
</update> </update>
<!-- 按天统计 -->
<select id="statDay" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC004">
SELECT
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
MAT_TYPE AS "matType",
MAT_CODE AS "matCode",
COALESCE(SUM(AMOUNT), 0) AS "amount",
COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC004
WHERE 1=1
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, MAT_TYPE, MAT_CODE
</select>
</sqlMap> </sqlMap>
...@@ -3,29 +3,29 @@ ...@@ -3,29 +3,29 @@
<!-- table information <!-- table information
Generate time : 2024-01-10 10:28:03 Generate time : 2024-01-10 10:28:03
Version : 1.0 Version : 1.0
tableName :hpjx.t_hpkc006 tableName :hpjx.t_hpkc006
ID INTEGER NOT NULL primarykey, ID INTEGER NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL, COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR NOT NULL, DEP_CODE VARCHAR NOT NULL,
RECEIPT_TIME DATETIME, RECEIPT_TIME DATETIME,
OTHER_ENTHOUSE VARCHAR NOT NULL, OTHER_ENTHOUSE VARCHAR NOT NULL,
WH_CODE VARCHAR NOT NULL, WH_CODE VARCHAR NOT NULL,
WH_NAME VARCHAR NOT NULL, WH_NAME VARCHAR NOT NULL,
MAT_TYPE VARCHAR NOT NULL, MAT_TYPE VARCHAR NOT NULL,
MAT_CODE VARCHAR NOT NULL, MAT_CODE VARCHAR NOT NULL,
MAT_NAME VARCHAR NOT NULL, MAT_NAME VARCHAR NOT NULL,
SPEC VARCHAR NOT NULL, SPEC VARCHAR NOT NULL,
AMOUNT DECIMAL NOT NULL, AMOUNT DECIMAL NOT NULL,
WEIGHT DECIMAL NOT NULL, WEIGHT DECIMAL NOT NULL,
STATUS TINYINT NOT NULL, STATUS TINYINT NOT NULL,
REMARK VARCHAR REMARK VARCHAR
--> -->
<sqlMap namespace="HPKC006"> <sqlMap namespace="HPKC006">
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.kc.domain.HPKC006"> resultClass="com.baosight.hpjx.hp.kc.domain.HPKC006">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 --> DEP_CODE as "depCode", <!-- 部门编码 预留 -->
RECEIPT_TIME as "receiptTime", <!-- 单据日期 --> RECEIPT_TIME as "receiptTime", <!-- 单据日期 -->
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
ID asc ID asc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
...@@ -90,34 +90,52 @@ ...@@ -90,34 +90,52 @@
WEIGHT, <!-- 重量 --> WEIGHT, <!-- 重量 -->
STATUS, <!-- 状态 0审核 1保存 --> STATUS, <!-- 状态 0审核 1保存 -->
REMARK <!-- 备注 --> REMARK <!-- 备注 -->
) )
VALUES ( #companyCode#, #depCode#, #receiptTime#, #otherEnthouse#, #whCode#, #whName#, #matType#, #matCode#, #matName#, #spec#, #amount#, #weight#, #status#, #remark#) VALUES ( #companyCode#, #depCode#, #receiptTime#, #otherEnthouse#, #whCode#, #whName#, #matType#, #matCode#, #matName#, #spec#, #amount#, #weight#, #status#, #remark#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hpkc006 WHERE DELETE FROM hpjx.t_hpkc006 WHERE
ID = #id# ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hpkc006 UPDATE hpjx.t_hpkc006
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 预留 --> DEP_CODE = #depCode#, <!-- 部门编码 预留 -->
RECEIPT_TIME = #receiptTime#, <!-- 单据日期 --> RECEIPT_TIME = #receiptTime#, <!-- 单据日期 -->
OTHER_ENTHOUSE = #otherEnthouse#, <!-- 其他入库单号 --> OTHER_ENTHOUSE = #otherEnthouse#, <!-- 其他入库单号 -->
WH_CODE = #whCode#, <!-- 仓库编码 --> WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 --> WH_NAME = #whName#, <!-- 仓库名称 -->
MAT_TYPE = #matType#, <!-- 物料类型 --> MAT_TYPE = #matType#, <!-- 物料类型 -->
MAT_CODE = #matCode#, <!-- 物料编码 --> MAT_CODE = #matCode#, <!-- 物料编码 -->
MAT_NAME = #matName#, <!-- 物料名称 --> MAT_NAME = #matName#, <!-- 物料名称 -->
SPEC = #spec#, <!-- 规格 --> SPEC = #spec#, <!-- 规格 -->
AMOUNT = #amount#, <!-- 数量 --> AMOUNT = #amount#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 --> WEIGHT = #weight#, <!-- 重量 -->
STATUS = #status#, <!-- 状态 0审核 1保存 --> STATUS = #status#, <!-- 状态 0审核 1保存 -->
REMARK = #remark# <!-- 备注 --> REMARK = #remark# <!-- 备注 -->
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
</sqlMap> <!-- 按天统计 -->
\ No newline at end of file <select id="statDay" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC006">
SELECT
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
MAT_TYPE AS "matType",
MAT_CODE AS "matCode",
COALESCE(SUM(AMOUNT), 0) AS "amount",
COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC006
WHERE 1=1
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, MAT_TYPE, MAT_CODE
</select>
</sqlMap>
...@@ -3,28 +3,28 @@ ...@@ -3,28 +3,28 @@
<!-- table information <!-- table information
Generate time : 2024-01-10 14:03:35 Generate time : 2024-01-10 14:03:35
Version : 1.0 Version : 1.0
tableName :hpjx.t_hpkc007 tableName :hpjx.t_hpkc007
ID INTEGER NOT NULL primarykey, ID INTEGER NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL, COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR NOT NULL, DEP_CODE VARCHAR NOT NULL,
RECEIPT_TIME DATETIME, RECEIPT_TIME DATETIME,
OTHER_ENTHOUSE VARCHAR NOT NULL, OTHER_ENTHOUSE VARCHAR NOT NULL,
WH_CODE VARCHAR NOT NULL, WH_CODE VARCHAR NOT NULL,
WH_NAME VARCHAR NOT NULL, WH_NAME VARCHAR NOT NULL,
MAT_TYPE VARCHAR NOT NULL, MAT_TYPE VARCHAR NOT NULL,
MAT_CODE VARCHAR NOT NULL, MAT_CODE VARCHAR NOT NULL,
MAT_NAME VARCHAR NOT NULL, MAT_NAME VARCHAR NOT NULL,
AMOUNT DECIMAL NOT NULL, AMOUNT DECIMAL NOT NULL,
WEIGHT DECIMAL NOT NULL, WEIGHT DECIMAL NOT NULL,
STATUS TINYINT NOT NULL, STATUS TINYINT NOT NULL,
REMARK VARCHAR REMARK VARCHAR
--> -->
<sqlMap namespace="HPKC007"> <sqlMap namespace="HPKC007">
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.kc.domain.HPKC007"> resultClass="com.baosight.hpjx.hp.kc.domain.HPKC007">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 --> DEP_CODE as "depCode", <!-- 部门编码 预留 -->
RECEIPT_TIME as "receiptTime", <!-- 单据日期 --> RECEIPT_TIME as "receiptTime", <!-- 单据日期 -->
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
ID asc ID asc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
...@@ -73,8 +73,8 @@ ...@@ -73,8 +73,8 @@
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
</select> </select>
<!-- <!--
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -134,33 +134,51 @@ ...@@ -134,33 +134,51 @@
WEIGHT, <!-- 重量 --> WEIGHT, <!-- 重量 -->
STATUS, <!-- 状态 0审核 1保存 --> STATUS, <!-- 状态 0审核 1保存 -->
REMARK <!-- 备注 --> REMARK <!-- 备注 -->
) )
VALUES (#id#, #companyCode#, #depCode#, #receiptTime#, #otherEnthouse#, #whCode#, #whName#, #matType#, #matCode#, #matName#, #amount#, #weight#, #status#, #remark#) VALUES (#id#, #companyCode#, #depCode#, #receiptTime#, #otherEnthouse#, #whCode#, #whName#, #matType#, #matCode#, #matName#, #amount#, #weight#, #status#, #remark#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hpkc007 WHERE DELETE FROM hpjx.t_hpkc007 WHERE
ID = #id# ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hpkc007 UPDATE hpjx.t_hpkc007
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 预留 --> DEP_CODE = #depCode#, <!-- 部门编码 预留 -->
RECEIPT_TIME = #receiptTime#, <!-- 单据日期 --> RECEIPT_TIME = #receiptTime#, <!-- 单据日期 -->
OTHER_ENTHOUSE = #otherEnthouse#, <!-- 其他入库单号 --> OTHER_ENTHOUSE = #otherEnthouse#, <!-- 其他入库单号 -->
WH_CODE = #whCode#, <!-- 仓库编码 --> WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 --> WH_NAME = #whName#, <!-- 仓库名称 -->
MAT_TYPE = #matType#, <!-- 物料类型 --> MAT_TYPE = #matType#, <!-- 物料类型 -->
MAT_CODE = #matCode#, <!-- 物料编码 --> MAT_CODE = #matCode#, <!-- 物料编码 -->
MAT_NAME = #matName#, <!-- 物料名称 --> MAT_NAME = #matName#, <!-- 物料名称 -->
AMOUNT = #amount#, <!-- 数量 --> AMOUNT = #amount#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 --> WEIGHT = #weight#, <!-- 重量 -->
STATUS = #status#, <!-- 状态 0审核 1保存 --> STATUS = #status#, <!-- 状态 0审核 1保存 -->
REMARK = #remark# <!-- 备注 --> REMARK = #remark# <!-- 备注 -->
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
</sqlMap> <!-- 按天统计 -->
\ No newline at end of file <select id="statDay" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC007">
SELECT
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
MAT_TYPE AS "matType",
MAT_CODE AS "matCode",
COALESCE(SUM(AMOUNT), 0) AS "amount",
COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC004
WHERE 1=1
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, MATERIAL_TYPE, MATERIAL_CODE
</select>
</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 18:54:54
Version : 1.0
tableName :hpjx.t_hpkc008
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DATEMONTH VARCHAR NOT NULL,
STATISTICAL_NUMBER VARCHAR NOT NULL,
MATERIAL_CODE VARCHAR NOT NULL,
MATERIAL_NAME VARCHAR NOT NULL,
UNIT VARCHAR,
AMOUNT DECIMAL NOT NULL,
PRICE DECIMAL NOT NULL,
TOTAL_PRICE DECIMAL NOT NULL,
NOTES VARCHAR,
CREATED_BY VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR
-->
<sqlMap namespace="HPKC008"> <sqlMap namespace="HPKC008">
<select id="query" parameterClass="java.util.HashMap" <sql id="column">
resultClass="com.baosight.hpjx.hp.kc.domain.HPKC008"> ID as "id",
SELECT COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
ID as "id", DATEMONTH as "datemonth", <!-- 月份 -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> STATISTICAL_NUMBER as "statisticalNumber", <!-- 统计单单号 -->
DATEMONTH as "datemonth", <!-- 月份 --> MATERIAL_CODE as "materialCode", <!-- 物料编码 -->
STATISTICAL_NUMBER as "statisticalNumber", <!-- 统计单单号 --> MATERIAL_NAME as "materialName", <!-- 物料名称 -->
MATERIAL_CODE as "materialCode", <!-- 物料编码 --> UNIT as "unit", <!-- 单位 -->
MATERIAL_NAME as "materialName", <!-- 物料名称 --> AMOUNT as "amount", <!-- 数量 -->
UNIT as "unit", <!-- 单位 --> PRICE as "price", <!-- 单价 -->
AMOUNT as "amount", <!-- 数量 --> TOTAL_PRICE as "totalPrice", <!-- 金额 -->
PRICE as "price", <!-- 单价 --> NOTES as "notes", <!-- 备注 -->
TOTAL_PRICE as "totalPrice", <!-- 金额 --> CREATED_BY as "createdBy", <!-- 创建人 -->
NOTES as "notes", <!-- 备注 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
CREATED_BY as "createdBy", <!-- 创建人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> </sql>
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hpkc008 WHERE 1=1 <sql id="condition">
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="datemonth"> <isNotEmpty prepend=" AND " property="datemonth">
DATEMONTH = #datemonth# DATEMONTH = #datemonth#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="statisticalNumber"> <isNotEmpty prepend=" AND " property="statisticalNumber">
STATISTICAL_NUMBER = #statisticalNumber# STATISTICAL_NUMBER = #statisticalNumber#
</isNotEmpty> </isNotEmpty>
<dynamic prepend="ORDER BY"> </sql>
<isNotEmpty property="orderBy">
$orderBy$ <select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC008">
</isNotEmpty> SELECT
<isEmpty property="orderBy"> <include refid="column"/>
ID asc FROM hpjx.t_hpkc008 WHERE 1=1
</isEmpty> <include refid="condition"/>
</dynamic> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
...@@ -68,48 +54,46 @@ ...@@ -68,48 +54,46 @@
</isNotEmpty> </isNotEmpty>
</select> </select>
<!-- 查询统计 -->
<select id="querySum" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC008">
SELECT
COALESCE(SUM(AMOUNT), 0) AS "amount", <!-- 数量 -->
COALESCE(SUM(TOTAL_PRICE), 0) AS "totalPrice" <!-- 金额 -->
FROM ${hpjxSchema}.t_hpkc008
WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hpkc008 ( INSERT INTO hpjx.t_hpkc008 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, DATEMONTH, STATISTICAL_NUMBER, MATERIAL_CODE,
DATEMONTH, <!-- 月份 --> MATERIAL_NAME, UNIT, AMOUNT, PRICE, TOTAL_PRICE, NOTES,
STATISTICAL_NUMBER, <!-- 统计单单号 --> CREATED_BY, CREATED_TIME
MATERIAL_CODE, <!-- 物料编码 --> ) VALUES (
MATERIAL_NAME, <!-- 物料名称 --> #companyCode#, #datemonth#, #statisticalNumber#, #materialCode#, #materialName#,
UNIT, <!-- 单位 --> #unit#, #amount#, #price#, #totalPrice#, #notes#, #createdBy#, #createdTime#,
AMOUNT, <!-- 数量 --> #updatedBy#, #updatedTime#
PRICE, <!-- 单价 --> )
TOTAL_PRICE, <!-- 金额 -->
NOTES, <!-- 备注 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME <!-- 更新时间 -->
)
VALUES (#companyCode#, #datemonth#, #statisticalNumber#, #materialCode#, #materialName#, #unit#, #amount#, #price#, #totalPrice#, #notes#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hpkc008 WHERE DELETE FROM hpjx.t_hpkc008 WHERE ID = #id#
ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hpkc008 UPDATE hpjx.t_hpkc008
SET SET
DATEMONTH = #datemonth#, <!-- 月份 --> DATEMONTH = #datemonth#, <!-- 月份 -->
STATISTICAL_NUMBER = #statisticalNumber#, <!-- 统计单单号 --> MATERIAL_CODE = #materialCode#, <!-- 物料编码 -->
MATERIAL_CODE = #materialCode#, <!-- 物料编码 --> MATERIAL_NAME = #materialName#, <!-- 物料名称 -->
MATERIAL_NAME = #materialName#, <!-- 物料名称 --> UNIT = #unit#, <!-- 单位 -->
UNIT = #unit#, <!-- 单位 --> AMOUNT = #amount#, <!-- 数量 -->
AMOUNT = #amount#, <!-- 数量 --> PRICE = #price#, <!-- 单价 -->
PRICE = #price#, <!-- 单价 --> TOTAL_PRICE = #totalPrice#, <!-- 金额 -->
TOTAL_PRICE = #totalPrice#, <!-- 金额 --> NOTES = #notes#, <!-- 备注 -->
NOTES = #notes#, <!-- 备注 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> WHERE ID = #id#
WHERE
ID = #id#
</update> </update>
</sqlMap> </sqlMap>
\ No newline at end of file
<?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">
<sqlMap namespace="HPKC009">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
KC_TYPE as "kcType", <!-- 库存类型:CG:采购,SC:生产,QT:其他 -->
DATE_TYPE as "dateType", <!-- 日期类型:DAY:天,MONTH:月 -->
DATE_PROC as "dateProc", <!-- 日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
INIT_AMOUNT as "initAmount", <!-- 期初数量 -->
INIT_WEIGHT as "initWeight", <!-- 期初重量 -->
STOCKIN_AMOUNT as "stockinAmount", <!-- 入库数量 -->
STOCKIN_WEIGHT as "stockinWeight", <!-- 入库重量 -->
STOCKOUT_AMOUNT as "stockoutAmount", <!-- 出库数量 -->
STOCKOUT_WEIGHT as "stockoutWeight", <!-- 出库重量 -->
END_AMOUNT as "endAmount", <!-- 期末数量 -->
END_WEIGHT as "endWeight", <!-- 期末重量 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
</sql>
<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 prepend=" AND " property="dateType">
DATE_TYPE = #dateType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="datemonth">
DATEMONTH = #datemonth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
</sql>
<!-- 查询 -->
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC009">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPKC009
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
<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 ${hpjxSchema}.T_HPKC009 WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPKC009 (
COMPANY_CODE, DEP_CODE, KC_TYPE, DATE_TYPE, DATE_PROC, WH_CODE, WH_NAME, INVENT_TYPE,
INVENT_CODE, INVENT_NAME, SPEC, INIT_AMOUNT, INIT_WEIGHT, STOCKIN_AMOUNT,
STOCKIN_WEIGHT, STOCKOUT_AMOUNT, STOCKOUT_WEIGHT, END_AMOUNT, END_WEIGHT,
CREATED_BY, CREATED_NAME, CREATED_TIME
) VALUES (
#companyCode#, #depCode#, #kcType#, #dateType#, #dateProc#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #spec#, #initAmount#, #initWeight#, #stockinAmount#,
#stockinWeight#, #stockoutAmount#, #stockoutWeight#, #endAmount#, #endWeight#,
#createdBy#, #createdName#, #createdTime#
)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPKC009 WHERE ID = #id#
</delete>
</sqlMap>
...@@ -5,14 +5,18 @@ import com.baosight.hpjx.common.InitiateModeEnum; ...@@ -5,14 +5,18 @@ import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.common.InventTypeEnun; import com.baosight.hpjx.common.InventTypeEnun;
import com.baosight.hpjx.hp.pz.domain.THppz006; import com.baosight.hpjx.hp.pz.domain.THppz006;
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.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 java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -132,5 +136,22 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -132,5 +136,22 @@ public class ServiceHPPZ006 extends ServiceBase {
eiInfo.setMsg("删除成功!"); eiInfo.setMsg("删除成功!");
return eiInfo; return eiInfo;
} }
/**
* 规格下拉框
*
* @param inInfo
* @return
*/
public EiInfo queryComboBoxSpec(EiInfo inInfo) {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_SPEC_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "规格下拉框");
}
return inInfo;
}
} }
package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.domain.HPPZ010;
import com.baosight.hpjx.hp.xs.tools.HPXSUserTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.RsaUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
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.soa.XLocalManager;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import com.baosight.xservices.xs.constants.LoginConstants;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 数据授权
*
* @author:songx
* @date:2024/1/18,17:15
*/
public class ServiceHPPZ010 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ010().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPSqlConstant.HPPZ010.QUERY, new HPPZ010());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据校验
this.checkSaveData(resultRows);
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HPPZ009 fPz009 = new HPPZ009();
fPz009.fromMap(resultRows.get(i));
if (fPz009.getId() == null || fPz009.getId() == 0) {
this.add(fPz009);
} else {
this.modify(fPz009);
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 校验保存的数据
*
* @param resultRows
*/
private void checkSaveData(List<Map> resultRows) {
// 数据校验
for (int i = 0; i < resultRows.size(); i++) {
HPPZ009 hppz009 = new HPPZ009();
hppz009.fromMap(resultRows.get(i));
AssertUtils.isEmpty(hppz009.getCompanyName(), "企业名称不能为空");
AssertUtils.isNull(hppz009.getValidFlag(), "是否启用不能为空");
}
}
/**
* 新增企业信息
*
* @param fPz009
* @throws Exception
*/
private void add(HPPZ009 fPz009) throws Exception {
// 生成企业编码
fPz009.setCompanyCode(SequenceGenerator.getNextSequence("COMPANY_CODE"));
fPz009.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert("HPPZ009.insert", fPz009);
// 默认新增企业管理员账号
this.initUser(fPz009);
// 关联企业管理员角色
this.insertGroupMember(fPz009);
}
/**
* 修改数据
*
* @param fPz009
*/
private void modify(HPPZ009 fPz009) {
DaoUtils.update("HPPZ009.update", fPz009);
}
/**
* 新增操作.
*
* @param inInfo
* @return
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据校验
this.checkSaveData(resultRows);
// 数据写入
for (int i = 0; i < resultRows.size(); i++) {
HPPZ009 fPz009 = new HPPZ009();
fPz009.fromMap(resultRows.get(i));
this.add(fPz009);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 初始化用户
*
* @param hppz009
*/
private void initUser(HPPZ009 hppz009) throws Exception {
String companyCode = hppz009.getCompanyCode();
Map inInfoRowMap = new HashMap();
inInfoRowMap.put("userId", companyCode);
inInfoRowMap.put("loginName", companyCode);
inInfoRowMap.put("userName", hppz009.getCompanyName());
// 使用公钥加密密码
String password = RsaUtils.encryptByPublicKey(LoginConstants.rsaPublicKey, companyCode);
inInfoRowMap.put("password", password);
inInfoRowMap.put("rePass", password);
inInfoRowMap.put("email", " ");
inInfoRowMap.put("mobile", " ");
inInfoRowMap.put("companyCode", hppz009.getCompanyCode());
EiInfo inInfo = new EiInfo();
inInfo.addBlock("details").addRow(inInfoRowMap);
inInfo.set(EiConstant.serviceName, "XS0102");
inInfo.set(EiConstant.methodName, "insert");
EiInfo outInfo = XLocalManager.call(inInfo);
if (outInfo.getStatus() < 0) {
throw new PlatException(outInfo.getMsg());
}
}
/**
* 用户关联角色
*
* @param hppz009
*/
private void insertGroupMember(HPPZ009 hppz009) {
String companyCode = hppz009.getCompanyCode();
Map inInfoRowMap = new HashMap();
inInfoRowMap.put("memberId", companyCode);
inInfoRowMap.put("memberName", hppz009.getCompanyName());
// TODO 该用户组固定不能修改,代码中其他地方有写死的地方
inInfoRowMap.put("parentId", "companyManage");
inInfoRowMap.put("parentName", "企业管理员");
inInfoRowMap.put("memberType", "USER");
EiInfo inInfo = new EiInfo();
inInfo.addBlock(EiConstant.resultBlock).addRow(inInfoRowMap);
inInfo.set(EiConstant.serviceName, "XS03");
inInfo.set(EiConstant.methodName, "insert");
EiInfo outInfo = XLocalManager.call(inInfo);
if (outInfo.getStatus() < 0) {
throw new PlatException(outInfo.getMsg());
}
}
/**
* 修改操作
*
* @param inInfo
* @return
*/
public EiInfo update(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据校验
this.checkSaveData(resultRows);
for (int i = 0; i < resultRows.size(); i++) {
HPPZ009 hppz009 = new HPPZ009();
hppz009.fromMap(resultRows.get(i));
DaoUtils.update("HPPZ009.update", hppz009);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPPZ009 fPz009 = new HPPZ009();
fPz009.fromMap(resultRows.get(i));
// 校验企业下是否存在用户
int count = HPXSUserTools.countByCompany(fPz009.getCompanyCode());
if (count > 0) {
throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户",
fPz009.getCompanyName()));
}
DaoUtils.update("HPPZ009.delete", fPz009);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
}
return inInfo;
}
}
...@@ -3,32 +3,32 @@ ...@@ -3,32 +3,32 @@
<!-- table information <!-- table information
Generate time : 2024-01-10 15:43:22 Generate time : 2024-01-10 15:43:22
Version : 1.0 Version : 1.0
tableName :hpjx.t_hppz006 tableName :hpjx.t_hppz006
ID BIGINT NOT NULL primarykey, ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL, COMPANY_CODE VARCHAR NOT NULL,
INVENT_NAME VARCHAR NOT NULL, INVENT_NAME VARCHAR NOT NULL,
INVENT_CODE VARCHAR NOT NULL, INVENT_CODE VARCHAR NOT NULL,
INVENT_TYPE TINYINT NOT NULL, INVENT_TYPE TINYINT NOT NULL,
STATUS TINYINT NOT NULL, STATUS TINYINT NOT NULL,
SPEC VARCHAR NOT NULL, SPEC VARCHAR NOT NULL,
LENGTH VARCHAR NOT NULL, LENGTH VARCHAR NOT NULL,
WIDE VARCHAR NOT NULL, WIDE VARCHAR NOT NULL,
THICK VARCHAR NOT NULL, THICK VARCHAR NOT NULL,
MATERIAL VARCHAR NOT NULL, MATERIAL VARCHAR NOT NULL,
COEFFICIENT VARCHAR NOT NULL, COEFFICIENT VARCHAR NOT NULL,
UNIT VARCHAR NOT NULL, UNIT VARCHAR NOT NULL,
CREATED_BY VARCHAR, CREATED_BY VARCHAR,
CREATED_TIME VARCHAR, CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR, UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR, UPDATED_TIME VARCHAR,
DEP_CODE VARCHAR DEP_CODE VARCHAR
--> -->
<sqlMap namespace="HPPZ006"> <sqlMap namespace="HPPZ006">
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.pz.domain.THppz006"> resultClass="com.baosight.hpjx.hp.pz.domain.THppz006">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
INVENT_NAME as "inventName", <!-- 存货名称 --> INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_CODE as "inventCode", <!-- 存货编码 --> INVENT_CODE as "inventCode", <!-- 存货编码 -->
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
ID asc ID asc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
...@@ -76,8 +76,8 @@ ...@@ -76,8 +76,8 @@
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
</select> </select>
<!-- <!--
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -151,33 +151,33 @@ ...@@ -151,33 +151,33 @@
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_TIME, <!-- 创建时间 -->
DEP_CODE <!-- 部门编码 --> DEP_CODE <!-- 部门编码 -->
) )
VALUES ( #companyCode#, #inventName#, #inventCode#, #inventType#, #status#, #spec#, #length#, #wide#, #thick#, #material#, #coefficient#, #unit#, #createdBy#, #createdTime#, #depCode#) 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_NAME = #inventName#, <!-- 存货名称 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 --> INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 --> INVENT_TYPE = #inventType#, <!-- 存货类型 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 --> STATUS = #status#, <!-- 状态 0未启用 1启用 -->
SPEC = #spec#, <!-- 规格 --> SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 --> LENGTH = #length#, <!-- 长 -->
WIDE = #wide#, <!-- 宽 --> WIDE = #wide#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 --> THICK = #thick#, <!-- 厚 -->
MATERIAL = #material#, <!-- 材质 --> MATERIAL = #material#, <!-- 材质 -->
COEFFICIENT = #coefficient#, <!-- 系数 --> COEFFICIENT = #coefficient#, <!-- 系数 -->
UNIT = #unit#, <!-- 单位 --> UNIT = #unit#, <!-- 单位 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
...@@ -195,4 +195,19 @@ ...@@ -195,4 +195,19 @@
</isNotEmpty> </isNotEmpty>
ORDER BY INVENT_CODE ORDER BY INVENT_CODE
</select> </select>
</sqlMap>
\ No newline at end of file <!-- 规格下拉框 -->
<select id="queryComboBoxSpec" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
SPEC AS "spec"
FROM hpjx.t_hppz006 WHERE STATUS=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
ORDER BY ID
</select>
</sqlMap>
<?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">
<sqlMap namespace="HPPZ010">
<sql id="column">
ID as "id",
SUBJECT_ID as "subjectId", <!-- 授权主体ID -->
SUBJECT_TYPE as "subjectType", <!-- 授权主体类别 -->
OBJECT_ID as "objectId", <!-- 授权客体ID -->
OBJECT_TYPE as "objectType", <!-- 授权客体类别 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subjectId">
SUBJECT_ID = #subjectId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subjectType">
SUBJECT_TYPE = #subjectType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="objectId">
OBJECT_ID = #objectId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="objectType">
OBJECT_TYPE = #objectType#
</isNotEmpty>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ010">
SELECT <include refid="column"/>
FROM ${hpjxSchema}.T_HPPZ010
WHERE 1=1
<include refid="condition" />
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPPZ010 WHERE 1=1
<include refid="condition" />
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPPZ010 (
SUBJECT_ID, <!-- 授权主体ID -->
SUBJECT_TYPE, <!-- 授权主体类别 -->
OBJECT_ID, <!-- 授权客体ID -->
OBJECT_TYPE, <!-- 授权客体类别 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#subjectId#, #subjectType#, #objectId#, #objectType#, #createdBy#,
#createdName#, #createdTime#
)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPPZ010 WHERE ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPPZ010
SET
SUBJECT_ID = #subjectId#, <!-- 授权主体ID -->
SUBJECT_TYPE = #subjectType#, <!-- 授权主体类别 -->
OBJECT_ID = #objectId#, <!-- 授权客体ID -->
OBJECT_TYPE = #objectType#, <!-- 授权客体类别 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE ID = #id#
</update>
</sqlMap>
package com.baosight.hpjx.hp.zl.service; package com.baosight.hpjx.hp.zl.service;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
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.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.LogUtils;
import com.baosight.hpjx.util.StringUtil; 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.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import java.util.*; import java.util.*;
...@@ -23,15 +34,10 @@ public class ServiceHPZL001 extends ServiceBase { ...@@ -23,15 +34,10 @@ public class ServiceHPZL001 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
HPZL001 HPZL001 = new HPZL001(); HPZL001 HPZL001 = new HPZL001();
EiInfo outInfo = super.initLoad(inInfo, HPZL001); EiInfo outInfo = super.initLoad(inInfo, HPZL001);
outInfo.addBlock(EiConstant.queryBlock).setCell(0,"receiptDate",CommonMethod.getCurrentSameYearMonthDay());
outInfo.getBlock(EiConstant.resultBlock).getRows().clear(); outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
CommonMethod.initBlock(outInfo, CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID),
Arrays.asList( new HashMap<String,String>(1) {{put("status", "1" );
DdynamicEnum.PROJ_RECORD_BLOCK_ID), }});
new HashMap<String,String>(1) {{
put("status", "1" );
}});
return outInfo; return outInfo;
} }
...@@ -40,28 +46,46 @@ public class ServiceHPZL001 extends ServiceBase { ...@@ -40,28 +46,46 @@ public class ServiceHPZL001 extends ServiceBase {
*/ */
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
String receiptDate = inInfo.getCellStr(EiConstant.queryBlock,0,"receiptDate"); try {
inInfo.setCell(EiConstant.queryBlock,0,"receiptDate", StringUtil.removeHorizontalLine(receiptDate)); Map queryMap = EiInfoUtils.getFirstRow(inInfo);
/* 调用EI查询方法.*/ String receiptDate = MapUtils.getString(queryMap, "receiptDate");
return super.query(inInfo, "HPZL001.query", new HPZL001()); queryMap.put("receiptDate", StringUtil.removeSpecifiedCharacter(receiptDate,
StringUtil.DEFAULT_CHARACTER_TO_BE_REMOVED));
inInfo = super.query(inInfo, "HPZL001.query", new HPKC008());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
} }
/** /**
* 新增操作. * 新增操作.
*/ */
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock); try {
for (int i = 0; i < inInfo.getBlock(EiConstant.resultBlock).getRowCount(); i++) { CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock);
String itemName =inInfo.getCellStr(EiConstant.resultBlock,i,"itemName"); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
String[] str = itemName.split("-"); for (int i = 0; i < resultRows.size(); i++) {
inInfo.setCell(EiConstant.resultBlock,i,"itemCode", str[0]); Map resultRow = resultRows.get(i);
inInfo.setCell(EiConstant.resultBlock,i,"itemName", str[1]); // 去除日期字符串中的-
String receiptDate = inInfo.getCellStr(EiConstant.resultBlock,i,"receiptDate"); String datemonth = MapUtils.getString(resultRow, "receiptDate");
inInfo.setCell(EiConstant.resultBlock,i,"receiptDate", StringUtil.removeHorizontalLine(receiptDate)); resultRow.put("datemonth", StringUtil.removeHorizontalLine(datemonth));
} // 项目名称
return super.insert(inInfo,"HPZL001.insert"); Map params1 = new HashMap<>();
params1.put("itemCode", MapUtils.getString(resultRow, "itemCode"));
List<THPSC001> query1 = dao.query("HPSC001.query", params1);
resultRow.put("itemName", query1.get(0).getProjName());
// 生成单据号
resultRow.put("chkBillno", SequenceGenerator.getNextSequence(
HPConstant.SequenceId.HPZL001_NUMBER));
DaoUtils.insert("HPZL001.insert", resultRow);
}
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
} }
...@@ -124,20 +148,36 @@ public class ServiceHPZL001 extends ServiceBase { ...@@ -124,20 +148,36 @@ public class ServiceHPZL001 extends ServiceBase {
eiInfo.setMsg("删除成功!"); eiInfo.setMsg("删除成功!");
return eiInfo; return eiInfo;
} }
/** /**
* 审核操作. * 审核操作.
*/ */
public EiInfo operator(EiInfo inInfo) { public EiInfo operator(EiInfo inInfo) {
HPZL001 HPZL001 = new HPZL001(); HPZL001 HPZL001 = new HPZL001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
CommonMethod.updateuserInfo(inInfo,EiConstant.resultBlock); CommonMethod.updateuserInfo(inInfo, EiConstant.resultBlock);
return super.update(inInfo,"HPZL001.operator"); return super.update(inInfo, "HPZL001.operator");
} }
/** /**
* 导入数据 * 上传附件
*/ *
* @param inInfo
* @return
*/
public EiInfo bindDocIdById(EiInfo inInfo) {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
try {
for (int i = 0; i < resultRows.size(); i++) {
Map resultRow = resultRows.get(i);
DaoUtils.update("HPZL001.updateAffix", resultRow);
}
inInfo.setMsg("更新附件成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "更新附件信息失败");
}
return inInfo;
}
} }
<?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-10 14:47:08
Version : 1.0
tableName :hpjx.t_hpzl001
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
RECEIPT_DATE VARCHAR NOT NULL,
CHK_BILLNO VARCHAR NOT NULL,
ITEM_CODE VARCHAR NOT NULL,
ITEM_NAME VARCHAR NOT NULL,
UNIT VARCHAR,
DESC VARCHAR,
PRINC VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
AFFIX VARCHAR,
CREATED_BY VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR,
DEP_CODE VARCHAR
-->
<sqlMap namespace="HPZL001"> <sqlMap namespace="HPZL001">
<select id="query" parameterClass="java.util.HashMap" <select id="query" resultClass="com.baosight.hpjx.hp.zl.domain.HPZL001">
resultClass="com.baosight.hpjx.hp.zl.domain.HPZL001">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 --> RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
CHK_BILLNO as "chkBillno", <!-- 检查单号 --> CHK_BILLNO as "chkBillno", <!-- 检查单号 -->
ITEM_CODE as "itemCode", <!-- 项目号 --> ITEM_CODE as "itemCode", <!-- 项目号 -->
ITEM_NAME as "itemName", <!-- 项目名称 --> ITEM_NAME as "itemName", <!-- 项目名称 -->
UNIT as "unit", <!-- 生产组 --> UNIT as "unit", <!-- 生产组 -->
NOTES as "notes", <!-- 质量问题描述 --> NOTES as "notes", <!-- 质量问题描述 -->
PRINC as "princ", <!-- 检查人 --> PRINC as "princ", <!-- 检查人 -->
STATUS as "status", <!-- 单据状态 0待审核 1已审核 --> STATUS as "status", <!-- 单据状态 0待审核 1已审核 -->
AFFIX as "affix", <!-- 附件 --> AFFIX as "affix", <!-- 附件 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode" <!-- 部门编码 --> DEP_CODE as "depCode" <!-- 部门编码 -->
FROM hpjx.t_hpzl001 WHERE 1=1 FROM hpjx.t_hpzl001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
...@@ -63,10 +41,9 @@ ...@@ -63,10 +41,9 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
...@@ -75,109 +52,66 @@ ...@@ -75,109 +52,66 @@
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
</select> </select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="chkBillno">
CHK_BILLNO = #chkBillno#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemCode">
ITEM_CODE = #itemCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemName">
ITEM_NAME = #itemName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="desc">
NOTES = #notes#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ">
PRINC = #princ#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="affix">
AFFIX = #affix#
</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>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hpzl001 ( INSERT INTO hpjx.t_hpzl001 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
RECEIPT_DATE, <!-- 单据日期 --> RECEIPT_DATE, <!-- 单据日期 -->
CHK_BILLNO, <!-- 检查单号 --> CHK_BILLNO, <!-- 检查单号 -->
ITEM_CODE, <!-- 项目号 --> ITEM_CODE, <!-- 项目号 -->
ITEM_NAME, <!-- 项目名称 --> ITEM_NAME, <!-- 项目名称 -->
UNIT, <!-- 生产组 --> UNIT, <!-- 生产组 -->
NOTES, <!-- 质量问题描述 --> NOTES, <!-- 质量问题描述 -->
PRINC, <!-- 检查人 --> PRINC, <!-- 检查人 -->
STATUS, <!-- 单据状态 0待审核 1已审核 --> STATUS, <!-- 单据状态 0待审核 1已审核 -->
AFFIX, <!-- 附件 --> AFFIX, <!-- 附件 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_TIME <!-- 创建时间 --> CREATED_TIME <!-- 创建时间 -->
) ) VALUES (
VALUES (#companyCode#, #receiptDate#, #chkBillno#, #itemCode#, #itemName#, #unit#, #notes#, #createdBy#, #status#, #affix#, #createdBy#, #createdTime#) #companyCode#, #receiptDate#, #chkBillno#, #itemCode#, #itemName#, #unit#,
#notes#, #createdBy#, #status#, #affix#, #createdBy#, #createdTime#
)
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hpzl001 WHERE DELETE FROM hpjx.t_hpzl001 WHERE ID = #id#
ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hpzl001
SET
RECEIPT_DATE = #receiptDate#, <!-- 单据日期 -->
CHK_BILLNO = #chkBillno#, <!-- 检查单号 -->
ITEM_CODE = #itemCode#, <!-- 项目号 -->
ITEM_NAME = #itemName#, <!-- 项目名称 -->
UNIT = #unit#, <!-- 生产组 -->
NOTES = #notes#, <!-- 质量问题描述 -->
PRINC = #princ#, <!-- 检查人 -->
STATUS = #status#, <!-- 单据状态 0待审核 1已审核 -->
AFFIX = #affix#, <!-- 附件 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
ID = #id#
</update>
<update id="operator">
UPDATE hpjx.t_hpzl001 UPDATE hpjx.t_hpzl001
SET SET
STATUS = #status#, <!-- 单据状态 0待审核 1已审核 --> RECEIPT_DATE = #receiptDate#, <!-- 单据日期 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> CHK_BILLNO = #chkBillno#, <!-- 检查单号 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> ITEM_CODE = #itemCode#, <!-- 项目号 -->
WHERE ITEM_NAME = #itemName#, <!-- 项目名称 -->
ID = #id# UNIT = #unit#, <!-- 生产组 -->
NOTES = #notes#, <!-- 质量问题描述 -->
PRINC = #princ#, <!-- 检查人 -->
STATUS = #status#, <!-- 单据状态 0待审核 1已审核 -->
AFFIX = #affix#, <!-- 附件 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE ID = #id#
</update>
<!-- 审核操作 -->
<update id="operator">
UPDATE hpjx.t_hpzl001
SET
STATUS = #status#, <!-- 单据状态 0待审核 1已审核 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE ID = #id#
</update> </update>
</sqlMap> <!-- 更新附件信息 -->
\ No newline at end of file <update id="updateAffix">
UPDATE hpjx.t_hpzl001
SET
AFFIX = #affix#, <!-- 附件 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE ID = #id#
</update>
</sqlMap>
package com.baosight.hpjx.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
/**
* 实体类之间的属性复制
*
* @author:songx
* @date:2020/7/30,15:34
*/
public class BeanUtils extends org.springframework.beans.BeanUtils {
private static Logger logger = LoggerFactory.getLogger(BeanUtils.class);
/**
* 单个实体类之间的属性复制
*
* @param object
* @param clazz
* @param <T>
* @return
*/
public static <T> T copy(Object object, Class<T> clazz) {
return copy(object, clazz, false);
}
/**
* 单个对象实例化
*
* @param object
* @param clazz
* @param <T>
* @return
*/
public static <T> T copyOrEmpty(Object object, Class<T> clazz) {
return copy(object, clazz, true);
}
/**
* 单个对象实例化
*
* @param object
* @param clazz
* @param isNewEmpty 是否构建空对象,true:是
* @param <T>
* @return
*/
private static <T> T copy(Object object, Class<T> clazz, boolean isNewEmpty) {
if (object == null && !isNewEmpty) {
return null;
}
try {
T t = clazz.newInstance();
if (object != null) {
copyProperties(object, t);
}
return t;
} catch (Exception e) {
logger.error("clazz newInstance is error:{}", e.getMessage(), e);
return null;
}
}
/**
* 实体类之间的转换
*
* @param sources 来源
* @param clazz 目标对象
* @return
*/
public static <T> List<T> copy(Collection<?> sources, Class<T> clazz) {
return copy(sources, clazz, false);
}
/**
* 实体类之间的转换
*
* @param sources 来源
* @param clazz 目标对象
* @return
*/
public static <T> List<T> copyOrEmpty(Collection<?> sources, Class<T> clazz) {
return copy(sources, clazz, true);
}
/**
* 实体类之间的转换
*
* @param sources
* @param clazz
* @param isNewEmpty 是否构建空对象,true:是
* @param <T>
* @return
*/
private static <T> List<T> copy(Collection<?> sources, Class<T> clazz, boolean isNewEmpty) {
if (sources == null) {
return isNewEmpty ? Collections.emptyList() : null;
}
return sources.stream().map(source -> copy(source, clazz)).collect(Collectors.toList());
}
}
...@@ -33,18 +33,19 @@ public class LogUtils { ...@@ -33,18 +33,19 @@ public class LogUtils {
if (inInfo == null) { if (inInfo == null) {
return; return;
} }
inInfo.setMsg(title.concat(",原因:")); inInfo.setMsg(title);
if (e == null) { if (e == null) {
inInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setDetailMsg("未知"); inInfo.setDetailMsg("未知");
return; return;
} }
// 由于平台调用链不支持查看detailMsg的消息内容,因此这里修改成往Msg中写错误信息 // 由于平台调用链不支持查看detailMsg的消息内容,因此这里修改成往Msg中写错误信息
inInfo.setMsg(inInfo.getMsg().concat(e.getMessage()));
inInfo.setDetailMsg(e.getMessage()); inInfo.setDetailMsg(e.getMessage());
if (e instanceof PlatException) { if (e instanceof PlatException) {
inInfo.setMsg(inInfo.getMsg().concat(",原因:").concat(e.getMessage()));
inInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo.setStatus(EiConstant.STATUS_FAILURE);
} else { } else {
inInfo.setMsg(inInfo.getMsg().concat(",原因参见详细错误描述!"));
inInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo.setStatus(EiConstant.STATUS_FAILURE);
} }
} }
...@@ -69,11 +70,9 @@ public class LogUtils { ...@@ -69,11 +70,9 @@ public class LogUtils {
if (e == null) { if (e == null) {
inInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg(msg.concat("未知")); inInfo.setMsg(msg.concat("未知"));
inInfo.setDetailMsg("未知");
return; return;
} }
inInfo.setMsg(msg.concat(e.getMessage())); inInfo.setMsg(msg.concat(e.getMessage()));
inInfo.setDetailMsg(e.getMessage());
if (e instanceof PlatException) { if (e instanceof PlatException) {
inInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo.setStatus(EiConstant.STATUS_FAILURE);
} else { } else {
......
...@@ -13,7 +13,7 @@ public class StringUtil { ...@@ -13,7 +13,7 @@ public class StringUtil {
/** /**
* 默认的待去除字符, 用于{@link }静态方法. * 默认的待去除字符, 用于{@link }静态方法.
*/ */
private static final Character DEFAULT_CHARACTER_TO_BE_REMOVED = '-'; public static final Character DEFAULT_CHARACTER_TO_BE_REMOVED = '-';
/** /**
......
...@@ -5,78 +5,66 @@ ...@@ -5,78 +5,66 @@
<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:EFDatePicker ename="inqu_status-0-receiptDate" cname="单据日期"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFDatePicker ename="inqu_status-0-receiptDate" cname="单据日期" <EF:EFSelect ename="inqu_status-0-inventType" cname="存货类型" filter="contains" defaultValue="">
format="yyyy-MM-dd" required="true"/> <EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
<EF:EFSelect ename="inqu_status-0-matType" cname="物料类型" filter="contains" required="false" </EF:EFSelect>
template="#=textField#" valueTemplate="#=textField#" defaultValue=""> <EF:EFSelect ename="inqu_status-0-whCode" cname="仓库名称" filter="contains" defultValue="">
<EF:EFOption label="请选择" value=""></EF:EFOption> <EF:EFOption label="请选择" value=""/>
<EF:EFOption label="1-原材料" value="1"></EF:EFOption> <EF:EFOptions blockId="whName_block_id" textField="textField" valueField="valueField"/>
<EF:EFOption label="2-耗材" value="2"></EF:EFOption> </EF:EFSelect>
<EF:EFOption label="3-半成品" value="3"></EF:EFOption> <%--<EF:EFSelect ename="inqu_status-0-status" cname="单据状态" filter="contains" required="false"
<EF:EFOption label="4-产成品" value="4"></EF:EFOption> template="#=textField#" valueTemplate="#=textField#" defaultValue="">
</EF:EFSelect> <EF:EFOption label="请选择" value=""></EF:EFOption>
<EF:EFSelect ename="inqu_status-0-whCode" cname="仓库名称" <EF:EFOption label="0-待审核" value="0"></EF:EFOption>
valueTemplate="#=textField#" filter="contains" <EF:EFOption label="1-已审核" value="1"></EF:EFOption>
required="false" defultValue="ALL" </EF:EFSelect>--%>
template="#=textField#"> </div>
<EF:EFOption label="请选择" value=""></EF:EFOption>
<EF:EFOptions blockId="whName_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-status" cname="单据状态" filter="contains" required="false"
template="#=textField#" valueTemplate="#=textField#" defaultValue="">
<EF:EFOption label="请选择" value=""></EF:EFOption>
<EF:EFOption label="0-待审核" value="0"></EF:EFOption>
<EF:EFOption label="1-已审核" value="1"></EF:EFOption>
</EF:EFSelect>
</div>
</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="override" isFloat="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" width="100" readonly="false" /> <EF:EFColumn ename="statisticalNumber" cname="盘点单号" enable="false" width="130" algin="center"/>
<EF:EFColumn ename="statisticalNumber" cname="盘点单号" width="100" readonly="false" /> <EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd"
<EF:EFComboColumn ename="whCode" parseFormats="['yyyyMMdd']" width="90" align="center"/>
cname="仓库编码" <%--<EF:EFComboColumn ename="status" cname="单据状态" enable="false" width="100" readonly="true"
columnTemplate="#=textField#" textField="textField" valueField="valueField" align="center">
itemTemplate="#=textField#" <EF:EFOption label="0-待审核" value="0"></EF:EFOption>
blockName="wh_record_block_id" <EF:EFOption label="1-已审核" value="1"></EF:EFOption>
textField="textField" </EF:EFComboColumn>--%>
valueField="valueField" <EF:EFComboColumn ename="whCode" cname="仓库编码" columnTemplate="#=textField#"
align="center" itemTemplate="#=textField#" blockName="wh_record_block_id"
filter="contains" textField="textField" valueField="valueField"
width="100" align="center" filter="contains" width="100">
> </EF:EFComboColumn>
</EF:EFComboColumn> <EF:EFComboColumn ename="inventType" cname="存货类型" width="90" align="center">
<%-- <EF:EFColumn ename="whName" cname="仓库名称" width="100" readonly="false"/>--%> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
<EF:EFComboColumn ename="matType" cname="物料类型" width="100" readonly="false" </EF:EFComboColumn>
textField="textField" valueField="valueField" align="center"> <EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center"/>
<EF:EFOption label="1-原材料" value="1"></EF:EFOption> <EF:EFColumn ename="spec" cname="规格" width="120" align="center"/>
<EF:EFOption label="2-耗材" value="2"></EF:EFOption> <EF:EFColumn ename="bookAmount" cname="账面数量" format="{0:N3}" maxLength="20" width="90" align="right"
<EF:EFOption label="3-半成品" value="3"></EF:EFOption> sumType="all"/>
<EF:EFOption label="4-产成品" value="4"></EF:EFOption> <EF:EFColumn ename="bookWeight" cname="账面重量" format="{0:N3}" maxLength="20" width="90" align="right"
</EF:EFComboColumn> sumType="all"/>
<EF:EFColumn ename="matCode" cname="物料编码" width="100" readonly="false" align="center"/> <EF:EFColumn ename="entityAmount" cname="实物数量" format="{0:N3}" maxLength="20" width="100" align="right"
<%-- <EF:EFColumn ename="matName" cname="物料名称" width="100" readonly="false"/>--%> sumType="all"/>
<EF:EFColumn ename="bookAmount" cname="账面数量" format="{0:N3}" maxLength="20" width="100" readonly="false"/> <EF:EFColumn ename="entityWeight" cname="实物重量" format="{0:N3}" maxLength="20" width="100" align="right"
<EF:EFColumn ename="bookWeight" cname="账面重量" format="{0:N3}" maxLength="20" width="100" readonly="false"/> sumType="all"/>
<EF:EFColumn ename="entityAmount" cname="实物数量" format="{0:N3}" maxLength="20" width="100" readonly="false"/> <EF:EFColumn ename="diffAmount" cname="差异数量" format="{0:N3}" maxLength="20" width="100" align="right"
<EF:EFColumn ename="entityWeight" cname="实物重量" format="{0:N3}" maxLength="20" width="100" readonly="false"/> sumType="all"/>
<EF:EFColumn ename="diffAmount" cname="差异数量" format="{0:N3}" maxLength="20" width="100" readonly="false"/> <EF:EFColumn ename="diffWeight" cname="差异重量" format="{0:N3}" maxLength="20" width="100" align="right"
<EF:EFColumn ename="diffWeight" cname="差异重量" format="{0:N3}" maxLength="20" width="100" readonly="false"/> sumType="all"/>
<EF:EFComboColumn ename="status" cname="单据状态" width="100" readonly="true" <EF:EFColumn ename="notes" cname="备注" width="100"/>
textField="textField" valueField="valueField" align="center"> <EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFOption label="0-待审核" value="0"></EF:EFOption> <EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
<EF:EFOption label="1-已审核" value="1"></EF:EFOption> editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</EF:EFComboColumn> </EF:EFGrid>
<EF:EFColumn ename="notes" cname="备注" width="100" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
$(function() { $(function() {
$("#inqu_status-0-receiptDate").val(__eiInfo.blocks.inqu_status.rows[0]); // $("#inqu_status-0-receiptDate").val(__eiInfo.blocks.inqu_status.rows[0]);
// 查询 // 查询
$("#QUERY").on("click", function () { $("#QUERY").on("click", function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询 resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
}); });
$(function () { IPLATUI.EFGrid = {
result:{
$("#QUERY").on("click", function () { pageable: {
resultGrid.dataSource.page(1); pageSize: 20,
}); pageSizes: [10, 20, 30, 50, 100, 200],
},
IPLATUI.EFGrid.result = { columns: [{
pageable: { field: "datemonth",
pageSize: 20, attributes: {
pageSizes: [10,20,30,50,100,200], 'class': 'i-input-readonly',
}, required: true
columns: [ }
{ }]
field:"money", }
valueType:"N",//小计设置 }
type:"N",
},
{
field:"assessmentAmount",
valueType:"N",//小计设置
type:"N",
}
]
}
});
}); });
...@@ -6,38 +6,35 @@ ...@@ -6,38 +6,35 @@
<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:EFDatePicker ename="inqu_status-0-datemonth" cname="单据日期"
format="yyyy-MM" start="year" depth="year" readonly="true" required="true"/>
<EF:EFDatePicker ename="inqu_status-0-datemonth" cname="单据日期" <EF:EFInput ename="inqu_status-0-statisticalNumber" cname="统计单单号" colWidth="4" readonly="false"/>
format="yyyy-MM" start="year" depth="year" required="true"/> </div>
</EF:EFRegion>
<EF:EFInput ename="inqu_status-0-statisticalNumber" cname="统计单单号" colWidth="4" readonly="false"/>
</div> <EF:EFRegion id="result" title="明细信息">
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" autoFit="true">
</EF:EFRegion> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="statisticalNumber" cname="统计单单号" enable="false" width="130" align="center"/>
<EF:EFRegion id="result" title="明细信息"> <EF:EFColumn ename="datemonth" cname="月份" editType="date" dateFormat="yyyy-MM" parseFormats="['yyyyMM']"
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true"> start="year" depth="year" width="100" align="center"/>
<EF:EFComboColumn ename="materialCode" cname="存货名称" width="120" align="center">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="datemonth" cname="月份" editType="date" dateFormat="yyyy-MM" parseFormats="['yyyyMM']" start="year" depth="year" width="100" readonly="false" /> <EF:EFColumn ename="unit" cname="单位" width="100" align="center" maxLength="2"/>
<EF:EFColumn ename="statisticalNumber" cname="统计单单号" width="100" readonly="false" /> <EF:EFColumn ename="amount" cname="数量" width="100" align="right" format="{0:N3}" sumType="all"/>
<EF:EFColumn ename="materialCode" cname="物料编码" width="100" readonly="false"/> <EF:EFColumn ename="price" cname="单价" width="100" align="right" format="{0:C3}"/>
<EF:EFColumn ename="materialName" cname="物料名称" width="100" readonly="false"/> <EF:EFColumn ename="totalPrice" cname="金额" width="100" align="right" format="{0:C3}" sumType="all"/>
<EF:EFColumn ename="unit" cname="单位" width="100" readonly="false"/> <EF:EFColumn ename="notes" cname="备注" width="100" readonly="false"/>
<EF:EFColumn ename="amount" cname="数量" width="100" readonly="false"/> <EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="150" align="center" enable="false"
<EF:EFColumn ename="price" cname="单价" width="100" readonly="false"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="totalPrice" cname="金额" width="100" readonly="false"/> <EF:EFColumn ename="createdBy" cname="创建人" readonly="true" width="150" align="center" enable="false"/>
<EF:EFColumn ename="notes" cname="备注" width="100" readonly="false"/> <EF:EFColumn ename="updatedTime" cname="更新时间" readonly="true" width="150" align="center" enable="false"
<EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="150" align="center" enable="false" parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="createdBy" cname="创建人" readonly="true" width="150" align="center" enable="false"/> <EF:EFColumn ename="updatedBy" cname="更新人" readonly="true" width="150" align="center" enable="false"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" readonly="true" width="150" align="center" enable="false" parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/> </EF:EFGrid>
<EF:EFColumn ename="updatedBy" cname="更新人" readonly="true" width="150" align="center" enable="false"/> </EF:EFRegion>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage> </EF:EFPage>
$(function () {
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
}
// 查询
$("#QUERY").on("click", query);
// 保存
$("#BTN_SAVE").on("click", save);
// 删除
$("#BTN_DELETE").on("click", deleteFunc);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPPZ009", "save", true);
}
});
}
/**
* 删除
*/
let deleteFunc = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPPZ009", "delete", true);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage>
<div class="row" style="margin: 0 -10px;">
<div class="col-md-4">
<EF:EFRegion title="系统菜单树" id="tree" fitHeight="true">
<EF:EFTree bindId="groupsTree" ename="node" textField="text" valueField="label" hasChildren="leaf"
serviceName="XS0705" methodName="query" style="height:435px;">
</EF:EFTree>
</EF:EFRegion>
</div>
<div class="col-md-8">
<EF:EFRegion title="查询区" id="inqu">
<div class="row" >
<EF:EFInput type="hidden" cname="授权主体ID" ename="subjectId" row="0" blockId="inqu_status"/>
<EF:EFInput type="hidden" ename="objectCname" row ="0" blockId="inqu_status"/>
<EF:EFInput type="hidden" cname="授权类别" ename="operationType" row="0" blockId="inqu_status" value="ACCESS"/>
<EF:EFInput row="0" blockId="inqu_status" ename="objectEname" cname="授权客体名称" type="hidden"/>
<div class="col-xs-4">
<div class="form-group">
<label class="col-md-5 control-label">
授权主体名称
</label>
<div class="col-md-7">
<input name="inqu_status-0-subjectName" data-query="gt" class="k-textbox input-time query-need"
placeholder="请输入授权主体名称" />
</div>
</div>
</div>
<EF:EFSelect blockId="inqu_status" cname="授权主体类别" ename="subjectType" row="0" defaultValue="全部" colWidth="4" ratio="5:7">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="iplat.xs.subjectType" textField="label" valueField="value"/>
</EF:EFSelect>
<div class="col-xs-4">
<div class="form-group">
<label class="col-md-5 control-label">
授权客体名称
</label>
<div class="col-md-7">
<input name="inqu_status-0-objectName" data-query="gt" class="k-textbox input-time query-need"
placeholder="请输入授权客体名称" />
</div>
</div>
</div>
<EF:EFSelect blockId="inqu_status" cname="授权客体类别" colWidth="4" ename="objectType" row="0" defaultValue="全部" ratio="5:7">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="xs.og.objectType" textField="label" valueField="value"/>
</EF:EFSelect>
<div class="col-xs-8" style="text-align: right" id="inqu_inside"></div>
</div>
</EF:EFRegion>
<EF:EFInput ename="objectCname" cname="授权主体名称" type="hidden"/>
<EF:EFRegion title="记录集" id="result" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="false">
<EF:EFColumn ename="subjectId" cname="授权主体ID" hidden="true"/>
<EF:EFColumn ename="subjectName" cname="授权主体名称" readonly="true" locked="true"/>
<EF:EFComboColumn enable="false" cname="授权主体类别" locked="true" ename="subjectType"
defaultValue="USER" style="text-align:center;">
<EF:EFCodeOption codeName="iplat.xs.subjectType" textField="label" valueField="value"/>
</EF:EFComboColumn>
<EF:EFColumn ename="objectId" cname="授权客体ID" hidden="true"/>
<EF:EFColumn ename="objectName" cname="授权客体名称" readonly="true" locked="true"/>
<EF:EFComboColumn enable="false" cname="授权客体类别" locked="true" ename="objectType"
defaultValue="RESOURCE" style="text-align:center;">
<EF:EFCodeOption codeName="xs.og.objectType" textField="label" valueField="value"/>
</EF:EFComboColumn>
<EF:EFComboColumn cname="操作类型" ename="operationType" readonly="true"
defaultValue="ACCESS" style="text-align:center;">
<EF:EFCodeOption codeName="services.xs.operationType" textField="label" valueField="value"/>
</EF:EFComboColumn>
<EF:EFColumn ename="sortIndex" cname="排序" style="text-align:center;"/>
<EF:EFColumn ename="recCreator" cname="创建人" style="text-align:center;" readonly="true"/>
<EF:EFColumn ename="recCreateTime" cname="创建时间" editType="datetime" readonly="true" displayType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']" style="text-align:center;"/>
<EF:EFColumn ename="recRevisor" cname="修改人" style="text-align:center;" readonly="true"/>
<EF:EFColumn ename="recReviseTime" cname="修改时间" readonly="true" editType="datetime" displayType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']" style="text-align:center;"/>
<EF:EFColumn ename="archiveFlag" cname="归档标记" style="text-align:center;"/>
</EF:EFGrid>
</EF:EFRegion>
</div>
</div>
<EF:EFWindow id="authSubject" width="58%" top="100px" left="280px">
<div id="ef_popup_gridA" >
<EF:EFRegion id="inquA" title="查询条件" type="query" efRegionShowClear="true" efRegionSave="true">
<div class="row">
<div class="col-xs-2 control-label">
<span>用户组英文名</span>
</div>
<div class="col-xs-2">
<EF:EFInput ename="inqu_status-0-groupEname" cname="用户组英文名" inline="true"/>
</div>
<div class="col-xs-3 control-label">
<span>用户组中文名</span>
</div>
<div class="col-xs-2">
<EF:EFInput ename="inqu_status-0-groupCname" cname="用户组中文名" inline="true"/>
</div>
<div class="col-xs-2" style="text-align: right" id="inqua_inside"></div>
</div>
</EF:EFRegion>
<EF:EFRegion id="resultA" title="记录集">
<div class="text-right">
<EF:EFButton cname="确定" ename="ef_popup_gridA_commit"></EF:EFButton>
</div>
<EF:EFGrid blockId="resultA" queryMethod="queryForGridSubject" autoDraw="false">
<EF:EFColumn ename="groupId" locked="true" cname="群组ID" hidden="true" primaryKey="true"/>
<EF:EFColumn ename="groupEname" locked="true" cname="群组英文名" readonly="true" width="300"/>
<EF:EFColumn ename="groupCname" cname="群组中文名" readonly="true" width="300"/>
</EF:EFGrid>
</EF:EFRegion>
</div>
</EF:EFWindow>
<EF:EFWindow id="menuPageAuth" url="${ctx}/web/XS0707" width="78%" top="80px" left="120px"></EF:EFWindow>
</EF:EFPage>
let rowId;
$(function() { $(function() {
var day1 = new Date(); // var day1 = new Date();
day1.setTime(day1.getTime()); // day1.setTime(day1.getTime());
day1.setDate(day1.getDate()-1); // day1.setDate(day1.getDate()-1);
var month = day1.getMonth() + 1; // var month = day1.getMonth() + 1;
var year = day1.getFullYear(); // var year = day1.getFullYear();
var day = day1.getDate(); // var day = day1.getDate();
let inqu = $("#inqu") // let inqu = $("#inqu")
,result = $("#result") // ,result = $("#result")
,from = $("#from") // ,from = $("#from")
,receiptDate = $("#inqu_status-0-receiptDate"); // ,receiptDate = $("#inqu_status-0-receiptDate");
receiptDate.val(year+"-"+month+"-"+day) // receiptDate.val(year+"-"+month+"-"+day)
//
$("#inqu_status-0-receiptDate").val(year+"-"+month+"-"+day); // $("#inqu_status-0-receiptDate").val(year+"-"+month+"-"+day);
// 查询 // 查询
$("#QUERY").on("click", function () { $("#QUERY").on("click", function () {
...@@ -25,89 +24,102 @@ $(function() { ...@@ -25,89 +24,102 @@ $(function() {
"result": { "result": {
pageable: { pageable: {
input: true, input: true,
numeric: false, numeric: false,
pageSize: 20, pageSize: 20,
pageSizes: [10,20,30,50,100,200] pageSizes: [10, 20, 30, 50, 100, 200]
}, },
columns:[ columns: [{
{ field: "affix",
field: "receiptDate", template: function (item) {
title: "单据日期", let affix = item.affix;
}, if (isBlank(affix)) {
{ return '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
field: "chkBillno", + 'onclick="openUploadFile(' + item.id + ',1)" >附件上传</a>';
title: "检查单号", } else {
}, return '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
{ + 'href="' + IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM06.jsp?docId=' + affix
field: "itemName", + '" >下载</a>';
title: "项目名称", }
}, }
{ }, {
field: "unit", field: "operator",
title: "生产组", template: function (item) {
}, let chkBillno = item.chkBillno;
{ let auditStatus = item.status;
field: "notes", if (auditStatus == 0) {
title: "质量问题描述", return '<a style="cursor: pointer;display: flex;justify-content: center;" ' +
}, 'onclick="audit(' + item.id + ',\'' + chkBillno + '\',1)" >审核</a>';
{ } else {
field: "princ", return '<a style="cursor: pointer;display: flex;justify-content: center;" ' +
title: "检查人", 'onclick="audit(' + item.id + ',\'' + chkBillno + '\',0)" >反审</a>';
}, }
{ }
field: "status", }]
title: "状态", }
},
{
field: "affix",
title: "附件",
},
{
field: "operator",
template:function(item){
let auditStatus = item.status;
if(auditStatus == 0) {
return '<a style="cursor: pointer;display: flex;justify-content: center;" ' +
'onclick="audit('+item.id+',1)" >审核</a>';
}else{
return '<a style="cursor: pointer;display: flex;justify-content: center;" ' +
'onclick="audit('+item.id+',0)" >反审</a>';
}
}
}
],
},
}; };
// 关闭事件
IPLATUI.EFWindow = {
"uploadFile": {
close: function (e) {
let $iframe = uploadFileWindow.element.children("iframe");
let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象
let uploadFile = iframejQuery("#fileDocId").val();
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", rowId);
inEiInfo.set("result-0-affix", uploadFile);
EiCommunicator.send('HPZL001', 'bindDocIdById', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
},
}
};
}); });
function audit(id,auditStatus){ /**
* 文件上传
const inEiInfo = new EiInfo(); *
* @param id
inEiInfo.set("result-0-id",id); */
inEiInfo.set("result-0-status",auditStatus ); function openUploadFile(id) {
EiCommunicator.send('HPZL001','operator', inEiInfo, { uploadFileWindow.open().center();
onSuccess(response) { rowId = id;
NotificationUtil(response.msg); }
},
onFail(errorMessage, status, e) { /**
NotificationUtil("执行失败!", "error"); * 审核操作
} *
}, * @param id
{ * @param chkBillno
async: false * @param auditStatus
} */
); function audit(id, chkBillno, auditStatus) {
let message = "确认对单号[" + chkBillno + "]进行" + (auditStatus == 1 ? "审核" : "反审") + "操作吗? ";
JSUtils.confirm(message, {
} ok: function () {
\ No newline at end of file const inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-status", auditStatus);
EiCommunicator.send('HPZL001', 'operator', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
if(response.status >= 0){
resultGrid.dataSource.page(1);
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
});
}
...@@ -6,72 +6,63 @@ ...@@ -6,72 +6,63 @@
<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:EFDatePicker ename="inqu_status-0-receiptDate" cname="单据日期" colWidth="3" <EF:EFDatePicker ename="inqu_status-0-receiptDate" cname="单据日期" colWidth="3"
format="yyyy-MM-dd" required="true"/> format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect ename="inqu_status-0-itemCode" cname="项目名称" colWidth="3" <EF:EFSelect ename="inqu_status-0-itemCode" cname="项目名称" colWidth="3"
valueTemplate="#=textField#" valueTemplate="#=textField#" template="#=textField#"
template="#=textField#" textField="textField" valueField="valueField"
textField="textField" required="true" locked="true" filter="contains">
valueField="valueField" <EF:EFOption label="--请选择--" value=""/>
required="true" <EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
locked="true" </EF:EFSelect>
filter="contains"> <EF:EFInput ename="inqu_status-0-princ" cname="检查人" colWidth="3" readonly="false"/>
<EF:EFOption label="--请选择--" value=""/> <EF:EFSelect ename="inqu_status-0-status" cname="处理状态" colWidth="3">
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOption label="--请选择--" value=""/>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-princ" cname="检查人" colWidth="3" readonly="false"/>
<EF:EFSelect ename="inqu_status-0-status" cname="处理状态" colWidth="3">
<EF:EFOption label="--请选择--" value=""/>
<EF:EFOption label="审核" value="1"></EF:EFOption> <EF:EFOption label="审核" value="1"></EF:EFOption>
<EF:EFOption label="待审核" value="0"></EF:EFOption> <EF:EFOption label="待审核" value="0"></EF:EFOption>
</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="chkBillno" cname="检查单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" width="100" readonly="false" /> <EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd"
<EF:EFColumn ename="chkBillno" cname="检查单号" width="100" readonly="false" /> parseFormats="['yyyyMMdd']" width="120" readonly="false"/>
<EF:EFComboColumn ename="itemName" cname="项目名称" <EF:EFComboColumn ename="itemCode" cname="项目名称" columnTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#" blockName="proj_record_block_id"
itemTemplate="#=textField#" textField="textField" valueField="valueField" maxLength="20"
blockName="proj_record_block_id" readonly="false" style="color:blue;" required="true" filter="contains" width="220">
textField="textField" </EF:EFComboColumn>
valueField="textField" <EF:EFColumn ename="unit" cname="生产组" width="100" readonly="false"/>
maxLength="20" <EF:EFColumn ename="notes" cname="质量问题描述" width="100" readonly="false"/>
readonly="false" <EF:EFColumn ename="princ" cname="检查人" width="100" readonly="true"/>
style="color:blue;" <EF:EFComboColumn ename="status" cname="状态" enable="false" align="center"
required="true" columnTemplate="#=valueField#-#=textField#"
filter="contains" itemTemplate="#=valueField#-#=textField#" textField="textField"
width="220"> valueField="valueField" width="100" required="true" optionLabel=" ">
</EF:EFComboColumn> <EF:EFOption label="--请选择--" value=""></EF:EFOption>
<EF:EFColumn ename="unit" cname="生产组" width="100" readonly="false"/> <EF:EFOption label="审核" value="1"></EF:EFOption>
<EF:EFColumn ename="notes" cname="质量问题描述" width="100" readonly="false"/> <EF:EFOption label="未审核" value="0"></EF:EFOption>
<EF:EFColumn ename="princ" cname="检查人" width="100" readonly="true"/> </EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="状态" align="center" columnTemplate="#=valueField#-#=textField#" optionLabel=" " <EF:EFColumn ename="affix" cname="附件" enable="false" width="100" align="center"/>
itemTemplate="#=valueField#-#=textField#" textField="textField" <EF:EFColumn ename="operator" cname="操作" enable="false" width="100" readonly="false"/>
valueField="valueField" width="100" required="true"> <EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="150" align="center" enable="false"
<EF:EFOption label="--请选择--" value=""></EF:EFOption> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"
<EF:EFOption label="审核" value="1"></EF:EFOption> hidden="true"/>
<EF:EFOption label="未审核" value="0"></EF:EFOption> <EF:EFColumn ename="createdBy" cname="创建人" readonly="true" width="150" align="center" enable="false"
</EF:EFComboColumn> hidden="true"/>
<EF:EFColumn ename="affix" cname="附件" width="100" readonly="false"/> <EF:EFColumn ename="updatedTime" cname="更新时间" readonly="true" width="150" align="center" enable="false"
<EF:EFColumn ename="operator" cname="操作" width="100" readonly="false"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"
<EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="150" align="center" enable="false" hidden="true"/>
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" hidden ="true" /> <EF:EFColumn ename="updatedBy" cname="更新人" readonly="true" width="150" align="center" enable="false"
<EF:EFColumn ename="createdBy" cname="创建人" readonly="true" width="150" align="center" enable="false" hidden ="true"/> hidden="true"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" readonly="true" width="150" align="center" enable="false"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" hidden ="true"/>
<EF:EFColumn ename="updatedBy" cname="更新人" readonly="true" width="150" align="center" enable="false" hidden ="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<%-- EEDM8010页面加载时,不会加载EEDM6000 (lazyload="true") --%>
<EF:EFWindow id="uploadFile" url="${ctx}/web/HPSC099" lazyload="true" refresh="true">
</EF:EFWindow>
</EF:EFPage> </EF:EFPage>
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