Commit 9a80e53c by yukang

Merge branch 'dev' of https://gitlab.baocloud.cn/bggf/smart/hp-smart into dev

parents 3e187ec5 22269ad8
...@@ -217,6 +217,20 @@ public class HPSqlConstant { ...@@ -217,6 +217,20 @@ public class HPSqlConstant {
} }
/** /**
* HPSC004 SQL名称定义
*
* @author:songx
* @date:2024/2/5,10:16
*/
public class HPSC004 {
// 锁
public static final String LOCK = "HPSC004.lock";
// 更新时间完工情况
public static final String UPDATE_COMPLETE = "HPSC004.updateComplete";
}
/**
* @author:songx * @author:songx
* @date:2024/2/5,10:16 * @date:2024/2/5,10:16
*/ */
......
...@@ -182,9 +182,9 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -182,9 +182,9 @@ public class ServiceHPKC001 extends ServiceBase {
// 去除日期字符串中的- // 去除日期字符串中的-
fKc001.setReceiptDate(StringUtil.removeHorizontalLine(fKc001.getReceiptDate())); fKc001.setReceiptDate(StringUtil.removeHorizontalLine(fKc001.getReceiptDate()));
// 仓库名称 // 仓库名称
fKc001.setWhName(HPPZTools.getPz007ByCode(fKc001.getWhCode()).getWhName()); fKc001.setWhName(HPPZTools.HpPz007.getByCode(fKc001.getWhCode()).getWhName());
// 存货名称 // 存货名称
fKc001.setInventName(HPPZTools.getPz004ByCode(fKc001.getInventCode()).getInventName()); fKc001.setInventName(HPPZTools.HpPz004.getByCode(fKc001.getInventCode()).getInventName());
} }
/** /**
......
...@@ -85,8 +85,11 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -85,8 +85,11 @@ public class ServiceHPKC003 extends ServiceBase {
try { try {
List<Map> resultRows = eiInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = eiInfo.getBlock(EiConstant.resultBlock).getRows();
List<String> prodNos = ObjectUtils.listKey(resultRows, "prodNo"); List<String> prodNos = ObjectUtils.listKey(resultRows, "prodNo");
// 锁 List<String> prodOrderNos = ObjectUtils.listKey(resultRows, "prodOrderNo");
// 锁库存
HPKCTools.HpKc003.lock(prodNos); HPKCTools.HpKc003.lock(prodNos);
// 锁生产计划明细
HPSCTools.HpSc004.lock(prodOrderNos);
// 查询数据 // 查询数据
Map<String, HPKC003> dbKc003Map = HPKCTools.HpKc003.map(prodNos); Map<String, HPKC003> dbKc003Map = HPKCTools.HpKc003.map(prodNos);
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
...@@ -103,7 +106,7 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -103,7 +106,7 @@ public class ServiceHPKC003 extends ServiceBase {
newKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO)); newKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
DaoUtils.insert(HPKC003.INSERT, newKc003); DaoUtils.insert(HPKC003.INSERT, newKc003);
// 同步生产计划 // 同步生产计划
DaoUtils.update("HPSC004.update", this.synchronousPlan(newKc003)); HPSCTools.syncPlan(newKc003.getProdOrderNo(), newKc003.getAmount());
// 更新生产任务已完成数量 // 更新生产任务已完成数量
HPSCTools.HpSc005a.updateCompleteNum(newKc003.getProdTaskNo(), newKc003.getAmount()); HPSCTools.HpSc005a.updateCompleteNum(newKc003.getProdTaskNo(), newKc003.getAmount());
// 修改库存 // 修改库存
...@@ -118,27 +121,4 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -118,27 +121,4 @@ public class ServiceHPKC003 extends ServiceBase {
return eiInfo; return eiInfo;
} }
/**
* 新增入库及删除入库单做同步计划订单
* @param hpkc003
*/
public HPSC004 synchronousPlan(HPKC003 hpkc003) {
HPSC004 hpsc004 = (HPSC004) this.dao.get("HPSC004.queryDetail", "productionOrderNo", hpkc003.getProdOrderNo());
AssertUtils.isNull(hpsc004, String.format("生产订单[%s]对应的任务计划不存在", hpkc003.getProdOrderNo()));
BigDecimal actualCompletionNum = hpkc003.getAmount().add(hpsc004.getActualCompletionNum());
BigDecimal actualCompletionUnitWt = hpkc003.getWeight().add(hpsc004.getActualCompletionUnitWt());
hpsc004.setActualCompletionNum(actualCompletionNum);
hpsc004.setActualCompletionUnitWt(actualCompletionUnitWt);
//计算是否生产完成
if (hpsc004.getNum().compareTo(actualCompletionNum) < 0
&& hpsc004.getUnitWt().compareTo(actualCompletionUnitWt) < 0) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
hpsc004.setActualCompletionDate(DateUtils.toDateStr(new Date(),DateUtils.DEFAULT_DATETIME_PATTERN));
} else {
hpsc004.setActualCompletionDate("");
}
return hpsc004;
}
} }
...@@ -88,11 +88,13 @@ public class ServiceHPKC003A extends ServiceEPBase { ...@@ -88,11 +88,13 @@ public class ServiceHPKC003A extends ServiceEPBase {
List<String> prodOrderNos = ObjectUtils.listKey(resultRows, "prodOrderNo"); List<String> prodOrderNos = ObjectUtils.listKey(resultRows, "prodOrderNo");
// 任务号 // 任务号
List<String> prodTaskNos = ObjectUtils.listKey(resultRows, "prodTaskNo"); List<String> prodTaskNos = ObjectUtils.listKey(resultRows, "prodTaskNo");
// 锁订单 // 锁生产计划
HPSCTools.HpSc004.lock(prodOrderNos);
// 锁生产订单
HPSCTools.HpSc005.lock(prodOrderNos); HPSCTools.HpSc005.lock(prodOrderNos);
// 锁任务 // 锁生产任务
HPSCTools.HpSc005a.lock(prodTaskNos); HPSCTools.HpSc005a.lock(prodTaskNos);
// 查询任务信息 // 查询生产任务信息
Map<String, HPSC005B> dbSc005bMap = HPSCTools.HpSc005b.map(prodTaskNos); Map<String, HPSC005B> dbSc005bMap = HPSCTools.HpSc005b.map(prodTaskNos);
// 数据校验 // 数据校验
for (Map row : resultRows) { for (Map row : resultRows) {
...@@ -100,8 +102,7 @@ public class ServiceHPKC003A extends ServiceEPBase { ...@@ -100,8 +102,7 @@ public class ServiceHPKC003A extends ServiceEPBase {
BigDecimal applyNum = MapUtils.getBigDecimal(row, "applyNum"); BigDecimal applyNum = MapUtils.getBigDecimal(row, "applyNum");
HPSC005B fSc005b = new HPSC005B(); HPSC005B fSc005b = new HPSC005B();
fSc005b.fromMap(row); fSc005b.fromMap(row);
AssertUtils.isEmpty(whCode, String.format("任务号[%s]的仓库不存在为空", AssertUtils.isEmpty(whCode, String.format("任务号[%s]的仓库不存在为空", fSc005b.getProdTaskNo()));
fSc005b.getProdTaskNo()));
HPSC005B dbSc005b = dbSc005bMap.get(fSc005b.getProdTaskNo()); HPSC005B dbSc005b = dbSc005bMap.get(fSc005b.getProdTaskNo());
AssertUtils.isTrue(ProdOrderStatusEnum.NOT_ASSIGN.getCode().equals(dbSc005b.getStatus()), AssertUtils.isTrue(ProdOrderStatusEnum.NOT_ASSIGN.getCode().equals(dbSc005b.getStatus()),
String.format("生产任务ID[%s]状态不是已分派,不允许操作", fSc005b.getId())); String.format("生产任务ID[%s]状态不是已分派,不允许操作", fSc005b.getId()));
...@@ -127,11 +128,13 @@ public class ServiceHPKC003A extends ServiceEPBase { ...@@ -127,11 +128,13 @@ public class ServiceHPKC003A extends ServiceEPBase {
newKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO)); newKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
newKc003.setDocumentDate(DateUtils.shortDate()); newKc003.setDocumentDate(DateUtils.shortDate());
newKc003.setWhCode(whCode); newKc003.setWhCode(whCode);
newKc003.setWhName(HPPZTools.getPz007ByCode(whCode).getWhName()); newKc003.setWhName(HPPZTools.HpPz007.getByCode(whCode).getWhName());
newKc003.setAmount(applyNum); newKc003.setAmount(applyNum);
newKc003.setWeight(applyNum.multiply(dbSc005b.getUnitWt())); newKc003.setWeight(applyNum.multiply(dbSc005b.getUnitWt()));
newKc003.setDeleteFlag(CommonConstant.YesNo.NO_0); newKc003.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPKC003.INSERT, newKc003); DaoUtils.insert(HPKC003.INSERT, newKc003);
// 同步生产计划
HPSCTools.syncPlan(newKc003.getProdOrderNo(), newKc003.getAmount());
// 更新生产任务已完成数量 // 更新生产任务已完成数量
HPSCTools.HpSc005a.updateCompleteNum(fSc005b.getProdTaskNo(), applyNum); HPSCTools.HpSc005a.updateCompleteNum(fSc005b.getProdTaskNo(), applyNum);
// 修改库存 // 修改库存
......
...@@ -141,9 +141,9 @@ public class ServiceHPKC005 extends ServiceBase { ...@@ -141,9 +141,9 @@ public class ServiceHPKC005 extends ServiceBase {
// 去除日期字符串中的- // 去除日期字符串中的-
fKc005.setReceiptDate(StringUtil.removeHorizontalLine(fKc005.getReceiptDate())); fKc005.setReceiptDate(StringUtil.removeHorizontalLine(fKc005.getReceiptDate()));
// 仓库名称 // 仓库名称
fKc005.setWhName(HPPZTools.getPz007ByCode(fKc005.getWhCode()).getWhName()); fKc005.setWhName(HPPZTools.HpPz007.getByCode(fKc005.getWhCode()).getWhName());
// 存货名称 // 存货名称
fKc005.setInventName(HPPZTools.getPz004ByCode(fKc005.getInventCode()).getInventName()); fKc005.setInventName(HPPZTools.HpPz004.getByCode(fKc005.getInventCode()).getInventName());
// 差异数量 // 差异数量
fKc005.setDiffAmount(fKc005.getEntityAmount().subtract(fKc005.getBookAmount())); fKc005.setDiffAmount(fKc005.getEntityAmount().subtract(fKc005.getBookAmount()));
// 差异重量 // 差异重量
......
...@@ -198,7 +198,7 @@ public class ServiceHPKC006 extends ServiceBase { ...@@ -198,7 +198,7 @@ public class ServiceHPKC006 extends ServiceBase {
// 去除日期字符串中的- // 去除日期字符串中的-
fKc006.setReceiptDate(StringUtil.removeHorizontalLine(fKc006.getReceiptDate())); fKc006.setReceiptDate(StringUtil.removeHorizontalLine(fKc006.getReceiptDate()));
// 仓库名称 // 仓库名称
fKc006.setWhName(HPPZTools.getPz007ByCode(fKc006.getWhCode()).getWhName()); fKc006.setWhName(HPPZTools.HpPz007.getByCode(fKc006.getWhCode()).getWhName());
// 存货名称 // 存货名称
//fKc006.setInventName(HPPZTools.getPz004ByCode(fKc006.getInventCode()).getInventName()); //fKc006.setInventName(HPPZTools.getPz004ByCode(fKc006.getInventCode()).getInventName());
} }
......
...@@ -183,9 +183,9 @@ public class ServiceHPKC007 extends ServiceBase { ...@@ -183,9 +183,9 @@ public class ServiceHPKC007 extends ServiceBase {
// 去除日期字符串中的- // 去除日期字符串中的-
fKc007.setReceiptDate(StringUtil.removeHorizontalLine(fKc007.getReceiptDate())); fKc007.setReceiptDate(StringUtil.removeHorizontalLine(fKc007.getReceiptDate()));
// 仓库名称 // 仓库名称
fKc007.setWhName(HPPZTools.getPz007ByCode(fKc007.getWhCode()).getWhName()); fKc007.setWhName(HPPZTools.HpPz007.getByCode(fKc007.getWhCode()).getWhName());
// 存货名称 // 存货名称
fKc007.setInventName(HPPZTools.getPz004ByCode(fKc007.getInventCode()).getInventName()); fKc007.setInventName(HPPZTools.HpPz004.getByCode(fKc007.getInventCode()).getInventName());
} }
/** /**
......
...@@ -89,7 +89,7 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -89,7 +89,7 @@ public class ServiceHPKC008 extends ServiceBase {
// 去除日期字符串中的- // 去除日期字符串中的-
fKc008.setDateMonth(StringUtil.removeHorizontalLine(fKc008.getDateMonth())); fKc008.setDateMonth(StringUtil.removeHorizontalLine(fKc008.getDateMonth()));
// 存货名称 // 存货名称
fKc008.setInventName(HPPZTools.getPz004ByCode(fKc008.getInventCode()).getInventName()); fKc008.setInventName(HPPZTools.HpPz004.getByCode(fKc008.getInventCode()).getInventName());
// 计算总金额 // 计算总金额
fKc008.setTotalPrice(fKc008.getAmount().multiply(fKc008.getPrice())); fKc008.setTotalPrice(fKc008.getAmount().multiply(fKc008.getPrice()));
// 生成单据号 // 生成单据号
...@@ -120,7 +120,7 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -120,7 +120,7 @@ public class ServiceHPKC008 extends ServiceBase {
// 去除日期字符串中的- // 去除日期字符串中的-
fKc008.setDateMonth(StringUtil.removeHorizontalLine(fKc008.getDateMonth())); fKc008.setDateMonth(StringUtil.removeHorizontalLine(fKc008.getDateMonth()));
// 存货名称 // 存货名称
fKc008.setInventName(HPPZTools.getPz004ByCode(fKc008.getInventCode()).getInventName()); fKc008.setInventName(HPPZTools.HpPz004.getByCode(fKc008.getInventCode()).getInventName());
// 计算总金额 // 计算总金额
fKc008.setTotalPrice(fKc008.getAmount().multiply(fKc008.getPrice())); fKc008.setTotalPrice(fKc008.getAmount().multiply(fKc008.getPrice()));
DaoUtils.update(HPKC008.UPDATE, fKc008); DaoUtils.update(HPKC008.UPDATE, fKc008);
......
...@@ -285,10 +285,10 @@ public class ServiceHPKC009 extends ServiceBase { ...@@ -285,10 +285,10 @@ public class ServiceHPKC009 extends ServiceBase {
private void setBaseInfo(List<HPKC009> kc009s) { private void setBaseInfo(List<HPKC009> kc009s) {
// 仓库名称 // 仓库名称
List<String> whCodes = kc009s.stream().map(HPKC009::getWhCode).collect(Collectors.toList()); List<String> whCodes = kc009s.stream().map(HPKC009::getWhCode).collect(Collectors.toList());
Map<String, HPPZ007> mapPz007 = HPPZTools.mapPz007(whCodes); Map<String, HPPZ007> mapPz007 = HPPZTools.HpPz007.map(whCodes);
// 存货名称 // 存货名称
List<String> inventCodes = kc009s.stream().map(HPKC009::getInventCode).collect(Collectors.toList()); List<String> inventCodes = kc009s.stream().map(HPKC009::getInventCode).collect(Collectors.toList());
Map<String, HPPZ004> mapPz004 = HPPZTools.mapPz004(inventCodes); Map<String, HPPZ004> mapPz004 = HPPZTools.HpPz004.map(inventCodes);
for (HPKC009 kc009 : kc009s) { for (HPKC009 kc009 : kc009s) {
// 仓库名称 // 仓库名称
String whCode = kc009.getWhCode(); String whCode = kc009.getWhCode();
......
...@@ -15,12 +15,12 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -15,12 +15,12 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br> * Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
* *
* @version 1.0 * @version 1.0
* @history 2024-01-22 14:36:36 create * @history 2024-02-06 15:01:45 create
*/ */
public class HPPZ004 extends DaoEPBase { public class HPPZ004 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_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
...@@ -34,7 +34,8 @@ public class HPPZ004 extends DaoEPBase { ...@@ -34,7 +34,8 @@ public class HPPZ004 extends DaoEPBase {
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/ public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/ public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
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_DEP_CODE = "DEP_CODE"; /* 部门编码*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
...@@ -48,96 +49,102 @@ public class HPPZ004 extends DaoEPBase { ...@@ -48,96 +49,102 @@ public class HPPZ004 extends DaoEPBase {
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/ public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/ public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/ public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String QUERY = "HPPZ004.query"; public static final String QUERY = "HPPZ004.query";
public static final String COUNT = "HPPZ004.count"; public static final String COUNT = "HPPZ004.count";
public static final String INSERT = "HPPZ004.insert"; public static final String INSERT = "HPPZ004.insert";
public static final String UPDATE = "HPPZ004.update"; public static final String UPDATE = "HPPZ004.update";
public static final String DELETE = "HPPZ004.delete"; public static final String DELETE = "HPPZ004.delete";
private Long id = null; private Long id;
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private Integer inventType = null; /* 存货类型*/ private Integer inventType; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/ private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/ private String inventName = " "; /* 存货名称*/
private Integer status = 1; /* 状态 0未启用 1启用*/ private Integer status; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/ private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/ private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/ private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/ private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/ private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag; /* 是否删除0.否1.是*/
/** /**
* initialize the metadata. * initialize the metadata.
*/ */
public void initMetaData() { public void initMetaData() {
EiColumn eiColumn; EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID); eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true); eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" "); eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE); eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留"); eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE); eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码"); eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE); eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型"); eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE); eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("存货编码"); eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME); eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("存货名称"); eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS); eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0未启用 1启用"); eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY); eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人"); eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME); eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称"); eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME); eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间"); eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY); eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人"); eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME); eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称"); eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME); eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间"); eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
} }
/** /**
* the constructor. * the constructor.
*/ */
public HPPZ004() { public HPPZ004() {
initMetaData(); initMetaData();
} }
/** /**
* get the id . * get the id .
* @return the id * @return the id
...@@ -145,7 +152,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -145,7 +152,7 @@ public class HPPZ004 extends DaoEPBase {
public Long getId() { public Long getId() {
return this.id; return this.id;
} }
/** /**
* set the id . * set the id .
* *
...@@ -161,7 +168,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -161,7 +168,7 @@ public class HPPZ004 extends DaoEPBase {
public String getCompanyCode() { public String getCompanyCode() {
return this.companyCode; return this.companyCode;
} }
/** /**
* set the companyCode - 企业编码 预留. * set the companyCode - 企业编码 预留.
* *
...@@ -177,7 +184,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -177,7 +184,7 @@ public class HPPZ004 extends DaoEPBase {
public String getDepCode() { public String getDepCode() {
return this.depCode; return this.depCode;
} }
/** /**
* set the depCode - 部门编码. * set the depCode - 部门编码.
* *
...@@ -193,7 +200,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -193,7 +200,7 @@ public class HPPZ004 extends DaoEPBase {
public Integer getInventType() { public Integer getInventType() {
return this.inventType; return this.inventType;
} }
/** /**
* set the inventType - 存货类型. * set the inventType - 存货类型.
* *
...@@ -209,7 +216,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -209,7 +216,7 @@ public class HPPZ004 extends DaoEPBase {
public String getInventCode() { public String getInventCode() {
return this.inventCode; return this.inventCode;
} }
/** /**
* set the inventCode - 存货编码. * set the inventCode - 存货编码.
* *
...@@ -225,7 +232,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -225,7 +232,7 @@ public class HPPZ004 extends DaoEPBase {
public String getInventName() { public String getInventName() {
return this.inventName; return this.inventName;
} }
/** /**
* set the inventName - 存货名称. * set the inventName - 存货名称.
* *
...@@ -241,7 +248,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -241,7 +248,7 @@ public class HPPZ004 extends DaoEPBase {
public Integer getStatus() { public Integer getStatus() {
return this.status; return this.status;
} }
/** /**
* set the status - 状态 0未启用 1启用. * set the status - 状态 0未启用 1启用.
* *
...@@ -257,7 +264,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -257,7 +264,7 @@ public class HPPZ004 extends DaoEPBase {
public String getCreatedBy() { public String getCreatedBy() {
return this.createdBy; return this.createdBy;
} }
/** /**
* set the createdBy - 创建人. * set the createdBy - 创建人.
* *
...@@ -273,7 +280,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -273,7 +280,7 @@ public class HPPZ004 extends DaoEPBase {
public String getCreatedName() { public String getCreatedName() {
return this.createdName; return this.createdName;
} }
/** /**
* set the createdName - 创建人名称. * set the createdName - 创建人名称.
* *
...@@ -289,7 +296,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -289,7 +296,7 @@ public class HPPZ004 extends DaoEPBase {
public String getCreatedTime() { public String getCreatedTime() {
return this.createdTime; return this.createdTime;
} }
/** /**
* set the createdTime - 创建时间. * set the createdTime - 创建时间.
* *
...@@ -305,7 +312,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -305,7 +312,7 @@ public class HPPZ004 extends DaoEPBase {
public String getUpdatedBy() { public String getUpdatedBy() {
return this.updatedBy; return this.updatedBy;
} }
/** /**
* set the updatedBy - 更新人. * set the updatedBy - 更新人.
* *
...@@ -321,7 +328,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -321,7 +328,7 @@ public class HPPZ004 extends DaoEPBase {
public String getUpdatedName() { public String getUpdatedName() {
return this.updatedName; return this.updatedName;
} }
/** /**
* set the updatedName - 更新人名称. * set the updatedName - 更新人名称.
* *
...@@ -337,7 +344,7 @@ public class HPPZ004 extends DaoEPBase { ...@@ -337,7 +344,7 @@ public class HPPZ004 extends DaoEPBase {
public String getUpdatedTime() { public String getUpdatedTime() {
return this.updatedTime; return this.updatedTime;
} }
/** /**
* set the updatedTime - 更新时间. * set the updatedTime - 更新时间.
* *
...@@ -347,13 +354,29 @@ public class HPPZ004 extends DaoEPBase { ...@@ -347,13 +354,29 @@ public class HPPZ004 extends DaoEPBase {
this.updatedTime = updatedTime; this.updatedTime = updatedTime;
} }
/** /**
* get the deleteFlag - 是否删除0.否1.是.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除0.否1.是.
*
* @param deleteFlag - 是否删除0.否1.是
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the value from Map. * get the value from Map.
* *
* @param map - source data map * @param map - source data map
*/ */
@Override @Override
public void fromMap(Map map) { public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id)); setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode)); setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
...@@ -367,14 +390,15 @@ public class HPPZ004 extends DaoEPBase { ...@@ -367,14 +390,15 @@ public class HPPZ004 extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName)); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
} }
/** /**
* set the value to Map. * set the value to Map.
*/ */
@Override @Override
public Map toMap() { public Map toMap() {
Map map = new HashMap(); Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID))); map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE))); map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
...@@ -389,7 +413,8 @@ public class HPPZ004 extends DaoEPBase { ...@@ -389,7 +413,8 @@ public class HPPZ004 extends DaoEPBase {
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY))); map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME))); map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME))); map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
return map; return map;
} }
} }
...@@ -77,7 +77,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -77,7 +77,7 @@ public class ServiceHPPZ006 extends ServiceBase {
HPPZ006 fPz006 = new HPPZ006(); HPPZ006 fPz006 = new HPPZ006();
fPz006.fromMap(resultRows.get(i)); fPz006.fromMap(resultRows.get(i));
// 存货名称 // 存货名称
fPz006.setInventName(HPPZTools.getPz004ByCode(fPz006.getInventCode()).getInventName()); fPz006.setInventName(HPPZTools.HpPz004.getByCode(fPz006.getInventCode()).getInventName());
fPz006.setSpec(HPPZTools.jointSpec(fPz006.getLength(),fPz006.getWidth(),fPz006.getThick())); fPz006.setSpec(HPPZTools.jointSpec(fPz006.getLength(),fPz006.getWidth(),fPz006.getThick()));
DaoUtils.insert(HPPZ006.INSERT, fPz006); DaoUtils.insert(HPPZ006.INSERT, fPz006);
} }
...@@ -126,7 +126,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -126,7 +126,7 @@ public class ServiceHPPZ006 extends ServiceBase {
HPPZ006 fPz006 = new HPPZ006(); HPPZ006 fPz006 = new HPPZ006();
fPz006.fromMap(resultRows.get(i)); fPz006.fromMap(resultRows.get(i));
// 存货名称 // 存货名称
fPz006.setInventName(HPPZTools.getPz004ByCode(fPz006.getInventCode()).getInventName()); fPz006.setInventName(HPPZTools.HpPz004.getByCode(fPz006.getInventCode()).getInventName());
fPz006.setSpec(HPPZTools.jointSpec(fPz006.getLength(),fPz006.getWidth(),fPz006.getThick())); fPz006.setSpec(HPPZTools.jointSpec(fPz006.getLength(),fPz006.getWidth(),fPz006.getThick()));
DaoUtils.update(HPPZ006.UPDATE, fPz006); DaoUtils.update(HPPZ006.UPDATE, fPz006);
} }
......
...@@ -116,7 +116,7 @@ public class ServiceHPPZ011 extends ServiceBase { ...@@ -116,7 +116,7 @@ public class ServiceHPPZ011 extends ServiceBase {
*/ */
private void add(HPPZ011 fPz011) { private void add(HPPZ011 fPz011) {
// 校验厂区名是否存在 // 校验厂区名是否存在
HPPZ011 dbPz011 = HPPZTools.getPz011ByName(fPz011.getFactoryName()); HPPZ011 dbPz011 = HPPZTools.HpPz011.getByName(fPz011.getFactoryName());
if (dbPz011 != null) { if (dbPz011 != null) {
fPz011.setFactoryCode(dbPz011.getFactoryCode()); fPz011.setFactoryCode(dbPz011.getFactoryCode());
} else { } else {
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag" <!-- 更新时间 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -54,10 +55,10 @@ ...@@ -54,10 +55,10 @@
<sql id="order"> <sql id="order">
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="order">
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="order">
ID DESC ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
......
...@@ -142,7 +142,9 @@ ...@@ -142,7 +142,9 @@
FACTORY_NAME as "factoryName" <!-- 厂区名称 --> FACTORY_NAME as "factoryName" <!-- 厂区名称 -->
FROM ${hpjxSchema}.T_HPPZ011 FROM ${hpjxSchema}.T_HPPZ011
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
<include refid="condition"/> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
ORDER BY FACTORY_CODE ASC ORDER BY FACTORY_CODE ASC
</select> </select>
...@@ -175,7 +177,7 @@ ...@@ -175,7 +177,7 @@
<isNotEmpty prepend=" AND " property="factoryCode"> <isNotEmpty prepend=" AND " property="factoryCode">
A.FACTORY_CODE = #factoryCode# A.FACTORY_CODE = #factoryCode#
</isNotEmpty> </isNotEmpty>
ORDER BY FACTORY_CODE ASC ORDER BY A.FACTORY_CODE ASC
</select> </select>
</sqlMap> </sqlMap>
...@@ -53,138 +53,167 @@ public class HPPZTools { ...@@ -53,138 +53,167 @@ public class HPPZTools {
AssertUtils.isEmpty(results, String.format("厂区生产组ID[%s]不存在", id)); AssertUtils.isEmpty(results, String.format("厂区生产组ID[%s]不存在", id));
return results.get(0); return results.get(0);
} }
}
/**
/** * 查询厂区信息
* 查询存货 *
* * @param factoryName
* @param inventCode * @return
* @return */
*/ public static HPPZ011 getByName(String factoryName) {
public static HPPZ004 getPz004ByCode(String inventCode) { AssertUtils.isEmpty(factoryName, "厂区名称不能为空");
AssertUtils.isEmpty(inventCode, "存货编码不能为空"); Map queryMap = new HashMap();
Map queryMap = new HashMap(); queryMap.put("factoryName", factoryName);
queryMap.put("inventCode", inventCode); List<HPPZ011> dbPz011s = DaoBase.getInstance().query(HPSqlConstant.HPPZ011.GET, queryMap);
List<HPPZ004> pz004s = DaoBase.getInstance().query("HPPZ004.query", queryMap); return CollectionUtils.isEmpty(dbPz011s) ? null : dbPz011s.get(0);
AssertUtils.isNull(pz004s, String.format("存货编码[%s]不存在", inventCode));
return pz004s.get(0);
}
/**
* 查询仓库
*
* @param whCode
* @return
*/
public static HPPZ007 getPz007ByCode(String whCode) {
AssertUtils.isEmpty(whCode, "仓库编码不能为空");
Map queryMap = new HashMap();
queryMap.put("whCode", whCode);
List<HPPZ007> pz007s = DaoBase.getInstance().query("HPPZ007.queryByWhCode", queryMap);
AssertUtils.isNull(pz007s, String.format("仓库编码[%s]不存在", whCode));
return pz007s.get(0);
}
/**
* 查询存货信息
*
* @param inventCodes
* @return
*/
public static List<HPPZ004> listPz004(List<String> inventCodes) {
if (CollectionUtils.isEmpty(inventCodes)) {
return null;
} }
Map queryMap = new HashMap();
queryMap.put("inventCodes", inventCodes);
return DaoBase.getInstance().query(HPPZ004.QUERY, queryMap);
} }
/** /**
* 查询存货信息 * HPPZ004 公共DAO定义
* *
* @param inventCodes * @author:songx
* @return * @date:2024/2/6,13:37
*/ */
public static Map<String, HPPZ004> mapPz004(List<String> inventCodes) { public static class HpPz004 {
List<HPPZ004> pz004s = listPz004(inventCodes);
if (CollectionUtils.isEmpty(pz004s)) { /**
return null; * 查询存货
*
* @param inventCode
* @return
*/
public static HPPZ004 getByCode(String inventCode) {
AssertUtils.isEmpty(inventCode, "存货编码不能为空");
Map queryMap = new HashMap();
queryMap.put("inventCode", inventCode);
List<HPPZ004> pz004s = DaoBase.getInstance().query(HPPZ004.QUERY, queryMap);
AssertUtils.isNull(pz004s, String.format("存货编码[%s]不存在", inventCode));
return pz004s.get(0);
} }
return pz004s.stream().collect(Collectors.toMap(HPPZ004::getInventCode, item -> item));
} /**
* 查询存货信息
/** *
* 查询仓库信息 * @param inventCodes
* * @return
* @param whCodes */
* @return public static List<HPPZ004> list(List<String> inventCodes) {
*/ if (CollectionUtils.isEmpty(inventCodes)) {
public static List<HPPZ007> listPz007(List<String> whCodes) { return null;
if (CollectionUtils.isEmpty(whCodes)) { }
return null; Map queryMap = new HashMap();
queryMap.put("inventCodes", inventCodes);
return DaoBase.getInstance().query(HPPZ004.QUERY, queryMap);
} }
Map queryMap = new HashMap();
queryMap.put("whCodes", whCodes); /**
return DaoBase.getInstance().query("HPPZ007.query", queryMap); * 查询存货信息
} *
* @param inventCodes
/** * @return
* 查询仓库信息 */
* public static Map<String, HPPZ004> map(List<String> inventCodes) {
* @param whCodes List<HPPZ004> pz004s = list(inventCodes);
* @return if (CollectionUtils.isEmpty(pz004s)) {
*/ return null;
public static Map<String, HPPZ007> mapPz007(List<String> whCodes) { }
List<HPPZ007> pz007s = listPz007(whCodes); return pz004s.stream().collect(Collectors.toMap(HPPZ004::getInventCode, item -> item));
if (CollectionUtils.isEmpty(pz007s)) {
return null;
} }
return pz007s.stream().collect(Collectors.toMap(HPPZ007::getWhCode, item -> item));
} }
/** /**
* 查询企业信息 * HPPZ007 公共DAO定义
* *
* @param companyCode * @author:songx
* @return * @date:2024/2/6,13:37
*/
public static HPPZ009 getPz009(String companyCode) {
AssertUtils.isEmpty(companyCode, "企业编码不能为空");
Map queryMap = new HashMap();
queryMap.put("companyCode", companyCode);
List<HPPZ009> pz009s = DaoBase.getInstance().query("HPPZ009.query", queryMap);
return CollectionUtils.isEmpty(pz009s) ? null : pz009s.get(0);
}
/**
* 查询厂区信息
*
* @param factoryName
* @return
*/ */
public static HPPZ011 getPz011ByName(String factoryName) { public static class HpPz007 {
AssertUtils.isEmpty(factoryName, "厂区名称不能为空");
Map queryMap = new HashMap(); /**
queryMap.put("factoryName", factoryName); * 查询仓库
List<HPPZ011> dbPz011s = DaoBase.getInstance().query(HPSqlConstant.HPPZ011.GET, queryMap); *
return CollectionUtils.isEmpty(dbPz011s) ? null : dbPz011s.get(0); * @param whCode
* @return
*/
public static HPPZ007 getByCode(String whCode) {
AssertUtils.isEmpty(whCode, "仓库编码不能为空");
Map queryMap = new HashMap();
queryMap.put("whCode", whCode);
List<HPPZ007> pz007s = DaoBase.getInstance().query(HPPZ007.QUERY, queryMap);
AssertUtils.isNull(pz007s, String.format("仓库编码[%s]不存在", whCode));
return pz007s.get(0);
}
/**
* 查询仓库信息
*
* @param whCodes
* @return
*/
public static List<HPPZ007> list(List<String> whCodes) {
if (CollectionUtils.isEmpty(whCodes)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("whCodes", whCodes);
return DaoBase.getInstance().query("HPPZ007.query", queryMap);
}
/**
* 查询仓库信息
*
* @param whCodes
* @return
*/
public static Map<String, HPPZ007> map(List<String> whCodes) {
List<HPPZ007> pz007s = list(whCodes);
if (CollectionUtils.isEmpty(pz007s)) {
return null;
}
return pz007s.stream().collect(Collectors.toMap(HPPZ007::getWhCode, item -> item));
}
} }
/** /**
* 企业是否启用 * HPPZ009 公共DAO定义
* *
* @param companyCode * @author:songx
* @return * @date:2024/2/6,13:37
*/ */
public static boolean isValid(String companyCode) { public static class HpPz009 {
HPPZ009 pz009 = getPz009(companyCode);
if (pz009 == null) { /**
return false; * 查询企业信息
*
* @param companyCode
* @return
*/
public static HPPZ009 getByCode(String companyCode) {
AssertUtils.isEmpty(companyCode, "企业编码不能为空");
Map queryMap = new HashMap();
queryMap.put("companyCode", companyCode);
List<HPPZ009> pz009s = DaoBase.getInstance().query("HPPZ009.query", queryMap);
return CollectionUtils.isEmpty(pz009s) ? null : pz009s.get(0);
}
/**
* 企业是否启用
*
* @param companyCode
* @return
*/
public static boolean isValid(String companyCode) {
HPPZ009 pz009 = getByCode(companyCode);
if (pz009 == null) {
return false;
}
return CommonConstant.YesNo.YES_1.equals(pz009.getValidFlag());
} }
return CommonConstant.YesNo.YES_1.equals(pz009.getValidFlag());
} }
/** /**
* 拼接规格 * 拼接规格
* @param length * @param length
......
...@@ -87,6 +87,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -87,6 +87,7 @@ public class HPSC003 extends DaoEPBase {
private String updatedTime ; /* 更新时间*/ private String updatedTime ; /* 更新时间*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
private Long matId = null; /* 物料ID*/
private String schedule = ""; private String schedule = "";
...@@ -207,6 +208,10 @@ public class HPSC003 extends DaoEPBase { ...@@ -207,6 +208,10 @@ public class HPSC003 extends DaoEPBase {
eiColumn.setDescName("厚"); eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("matId");
eiColumn.setDescName("物料ID");
eiMetadata.addMeta(eiColumn);
} }
...@@ -317,7 +322,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -317,7 +322,7 @@ public class HPSC003 extends DaoEPBase {
/** /**
* set the prdtCode - 部件编码. * set the prdtCode - 部件编码.
* *
* @param prdtCode - 部件编码 * @param prdtType - 部件编码
*/ */
public void setPrdtType(Integer prdtType) { public void setPrdtType(Integer prdtType) {
this.prdtType = prdtType; this.prdtType = prdtType;
...@@ -561,6 +566,15 @@ public class HPSC003 extends DaoEPBase { ...@@ -561,6 +566,15 @@ public class HPSC003 extends DaoEPBase {
public void setThick(BigDecimal thick) { public void setThick(BigDecimal thick) {
this.thick = thick; this.thick = thick;
} }
public Long getMatId() {
return matId;
}
public void setMatId(Long matId) {
this.matId = matId;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -592,6 +606,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -592,6 +606,7 @@ public class HPSC003 extends DaoEPBase {
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get("length")), length)); setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get("length")), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get("width")), width)); setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get("width")), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get("thick")), thick)); setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get("thick")), thick));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get("matId")), matId));
} }
...@@ -625,6 +640,7 @@ public class HPSC003 extends DaoEPBase { ...@@ -625,6 +640,7 @@ public class HPSC003 extends DaoEPBase {
map.put("length", StringUtils.toString(length, eiMetadata.getMeta("length"))); map.put("length", StringUtils.toString(length, eiMetadata.getMeta("length")));
map.put("width", StringUtils.toString(width, eiMetadata.getMeta("width"))); map.put("width", StringUtils.toString(width, eiMetadata.getMeta("width")));
map.put("thick", StringUtils.toString(thick, eiMetadata.getMeta("thick"))); map.put("thick", StringUtils.toString(thick, eiMetadata.getMeta("thick")));
map.put("matId", StringUtils.toString(matId, eiMetadata.getMeta("matId")));
return map; return map;
} }
......
...@@ -132,7 +132,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -132,7 +132,7 @@ public class ServiceHPSC002 extends ServiceBase {
hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue()); hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue());
hppz002.setTotalWt(totalWt); hppz002.setTotalWt(totalWt);
if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentId().equals("root")) { if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentId().equals("root")) {
hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName()); hppz002.setPrdtName(HPPZTools.HpPz004.getByCode(hppz002.getPrdtCode()).getInventName());
} }
DaoUtils.update("HPSC002.update", hppz002.toMap()); DaoUtils.update("HPSC002.update", hppz002.toMap());
} }
...@@ -377,6 +377,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -377,6 +377,7 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC003.setRemark(THPSC002.getRemark()); HPSC003.setRemark(THPSC002.getRemark());
HPSC003.setPlanCompletionDate(""); HPSC003.setPlanCompletionDate("");
HPSC003.setStatus(0); HPSC003.setStatus(0);
HPSC003.setMatId(THPSC002.getId());
DaoUtils.insert("HPSC003.insert", HPSC003.toMap()); DaoUtils.insert("HPSC003.insert", HPSC003.toMap());
//生产计划详情 //生产计划详情
......
...@@ -127,6 +127,26 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -127,6 +127,26 @@ public class ServiceHPSC003 extends ServiceBase {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
HPSC004.fromMap(map); HPSC004.fromMap(map);
DaoUtils.update("HPSC004.updateHPSC0004", HPSC004.toMap()); DaoUtils.update("HPSC004.updateHPSC0004", HPSC004.toMap());
List list = this.dao.query("HPSC004.query", new HashMap<String,Object>(){{
put("companyCode",HPSC004.getCompanyCode());
put("projCode",HPSC004.getProjCode());
put("parentId",HPSC004.getParentId());
put("planCommentDate"," ");
put("planCompletionDate"," ");
}});
if (list.size() == 0) {
List<HPSC004> list1 = this.dao.query("HPSC004.queryDate", new HashMap<String,Object>(){{
put("companyCode",HPSC004.getCompanyCode());
put("projCode",HPSC004.getProjCode());
put("parentId",HPSC004.getParentId());
}});
HPSC003 HPSC003 = new HPSC003();
HPSC003.setCompanyCode(HPSC004.getCompanyCode());
HPSC003.setProjCode(HPSC004.getProjCode());
HPSC003.setPlanInfoNo(HPSC004.getParentId());
HPSC003.setPlanCompletionDate(list1.get(0).getPlanCompletionDate());
DaoUtils.update("HPSC003.updateDate", HPSC003.toMap());
}
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!"); inInfo.setMsg("修改成功!");
......
...@@ -57,26 +57,6 @@ public class ServiceHPSC004 extends ServiceBase { ...@@ -57,26 +57,6 @@ public class ServiceHPSC004 extends ServiceBase {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
HPSC004.fromMap(map); HPSC004.fromMap(map);
DaoUtils.insert("HPSC004.insert", HPSC004.toMap()); DaoUtils.insert("HPSC004.insert", HPSC004.toMap());
List list = this.dao.query("HPSC004.query", new HashMap<String,Object>(){{
put("companyCode",HPSC004.getCompanyCode());
put("projCode",HPSC004.getPrdtCode());
put("parentId",HPSC004.getParentId());
put("planCommentDate","");
put("planCompletionDate","");
}});
if (list == null) {
List<Map> list1 = this.dao.query("HPSC004.query", new HashMap<String,Object>(){{
put("companyCode",HPSC004.getCompanyCode());
put("projCode",HPSC004.getPrdtCode());
put("parentId",HPSC004.getParentId());
}});
HPSC003 HPSC003 = new HPSC003();
HPSC003.setCompanyCode(HPSC004.getCompanyCode());
HPSC003.setPrdtCode(HPSC004.getPrdtCode());
HPSC003.setPlanInfoNo(HPSC004.getParentId());
HPSC003.setPlanCompletionDate(list1.get(0).get("planCompletionDate").toString());
DaoUtils.update("HPSC003.updateDate", HPSC003.toMap());
}
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!"); inInfo.setMsg("新增成功!");
......
...@@ -110,7 +110,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -110,7 +110,7 @@ public class ServiceHPSC005A extends ServiceBase {
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
// 刷新主订单信息 // 刷新主订单信息
inInfo = this.refreshOrderInfo(inInfo); inInfo = this.refreshOrderInfo(inInfo, prodOrderNo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据操作成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据操作成功!");
} catch (Exception e) { } catch (Exception e) {
...@@ -167,6 +167,8 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -167,6 +167,8 @@ public class ServiceHPSC005A extends ServiceBase {
*/ */
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail");
String prodOrderNo = MapUtils.getString(detailMap, "productionOrderNo");
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HPSC005A fSc005a = new HPSC005A(); HPSC005A fSc005a = new HPSC005A();
...@@ -181,7 +183,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -181,7 +183,7 @@ public class ServiceHPSC005A extends ServiceBase {
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
// 刷新主订单信息 // 刷新主订单信息
inInfo = this.refreshOrderInfo(inInfo); inInfo = this.refreshOrderInfo(inInfo, prodOrderNo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) { } catch (Exception e) {
...@@ -196,12 +198,9 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -196,12 +198,9 @@ public class ServiceHPSC005A extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
private EiInfo refreshOrderInfo(EiInfo inInfo) { private EiInfo refreshOrderInfo(EiInfo inInfo, String prodOrderNo) {
Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail");
String prodOrderNo = MapUtils.getString(detailMap, "productionOrderNo");
HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo); HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo);
inInfo.getBlock("detail").getRows().clear(); inInfo.addBlock("detail").addRow(dbSc005);
inInfo.getBlock("detail").addRow(dbSc005);
return inInfo; return inInfo;
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
Generate time : 2024-01-17 10:33:49
Version : 1.0
schema : hpjx
tableName : T_HPSC003
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
PROJ_TYPE TINYINT,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PLAN_INFO_NO VARCHAR,
PRDT_CODE VARCHAR,
PRDT_NAME VARCHAR,
PLAN_COMPLETION_DATE VARCHAR,
STATUS TINYINT,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME,
DEP_CODE VARCHAR,
REMARK VARCHAR
-->
<sqlMap namespace="HPSC003"> <sqlMap namespace="HPSC003">
<sql id="condition"> <sql id="condition">
...@@ -75,49 +54,53 @@ ...@@ -75,49 +54,53 @@
<isNotEmpty prepend=" AND " property="remark"> <isNotEmpty prepend=" AND " property="remark">
REMARK = #remark# REMARK = #remark#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
MAT_ID = #matId#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC003"> resultClass="com.baosight.hpjx.hp.sc.domain.HPSC003">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
PROJ_TYPE as "projType", <!-- 项目类型 --> PROJ_TYPE as "projType", <!-- 项目类型 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PLAN_INFO_NO as "planInfoNo", <!-- 生产计划单号 --> PLAN_INFO_NO as "planInfoNo", <!-- 生产计划单号 -->
INVENT_RECORD_ID as "inventRecordId", INVENT_RECORD_ID as "inventRecordId",
PRDT_TYPE as "prdtType", PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 --> PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 --> PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
STATUS as "status", <!-- 状态 0-计划中,1-生产中 --> STATUS as "status", <!-- 状态 0-计划中,1-生产中 -->
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", <!-- 部门编码 -->
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
SPEC as "spec", SPEC as "spec",
LENGTH as "length", <!-- 长 --> LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 --> WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 --> THICK as "thick", <!-- 厚 -->
CONCAT(( MAT_ID AS "matId",
SELECT CONCAT((
format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2) SELECT
FROM format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2)
hpjx.T_HPSC004 FROM
WHERE hpjx.T_HPSC004
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO WHERE
),'%') AS "schedule" PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO
),'%') AS "schedule"
FROM hpjx.T_HPSC003 WHERE 1=1 FROM hpjx.T_HPSC003 WHERE 1=1
<include refid="condition" /> <include refid="condition"/>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID asc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -128,81 +111,35 @@ ...@@ -128,81 +111,35 @@
<include refid="condition" /> <include refid="condition" />
</select> </select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planInfoNo">
PLAN_INFO_NO = #planInfoNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME LIKE ('%$prdtName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate">
PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.T_HPSC003 (ID, INSERT INTO hpjx.T_HPSC003 (ID,
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
PROJ_TYPE, <!-- 项目类型 --> PROJ_TYPE, <!-- 项目类型 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
PLAN_INFO_NO, <!-- 生产计划单号 --> PLAN_INFO_NO, <!-- 生产计划单号 -->
INVENT_RECORD_ID, INVENT_RECORD_ID,
SPEC, SPEC,
LENGTH, <!-- 长 --> LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 --> WIDTH, <!-- 宽 -->
THICK, <!-- 厚 --> THICK, <!-- 厚 -->
PRDT_TYPE, PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 --> PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 --> PRDT_NAME, <!-- 产品名称 -->
PLAN_COMPLETION_DATE, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE, <!-- 计划完成日期 -->
STATUS, <!-- 状态 0-计划中,1-生产中 --> STATUS, <!-- 状态 0-计划中,1-生产中 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 --> UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
REMARK <!-- 备注 --> REMARK, <!-- 备注 -->
) MAT_ID
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #planInfoNo#,#inventRecordId#, )
#spec#, #length#, #width#, #thick#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #status#, #createdBy#, VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #planInfoNo#,#inventRecordId#,
#createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#) #spec#, #length#, #width#, #thick#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #status#,
#createdBy#,
#createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#,#matId#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -213,28 +150,28 @@ ...@@ -213,28 +150,28 @@
<update id="update"> <update id="update">
UPDATE hpjx.T_HPSC003 UPDATE hpjx.T_HPSC003
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
PROJ_TYPE = #projType#, <!-- 项目类型 --> PROJ_TYPE = #projType#, <!-- 项目类型 -->
PROJ_CODE = #projCode#, <!-- 项目编码 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目编码 --> PROJ_NAME = #projName#, <!-- 项目编码 -->
PLAN_INFO_NO = #planInfoNo#, <!-- 生产计划单号 --> PLAN_INFO_NO = #planInfoNo#, <!-- 生产计划单号 -->
PRDT_TYPE = #prdtType#, PRDT_TYPE = #prdtType#,
SPEC = #spec#, <!-- 规格 --> SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 --> LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 --> WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 --> THICK = #thick#, <!-- 厚 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 --> PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 --> PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
STATUS = #status#, <!-- 状态 0-计划中,1-生产中 --> STATUS = #status#, <!-- 状态 0-计划中,1-生产中 -->
CREATED_BY = #createdBy#, <!-- 创建人 --> CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 --> CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DEP_CODE = #depCode#, <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
REMARK = #remark# <!-- 备注 --> REMARK = #remark# <!-- 备注 -->
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
<!-- 部件下拉框 --> <!-- 部件下拉框 -->
......
...@@ -110,6 +110,13 @@ ...@@ -110,6 +110,13 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<!-- 公共修改字段 -->
<sql id="updateRevise">
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
</sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004"> resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004">
SELECT SELECT
...@@ -170,108 +177,6 @@ ...@@ -170,108 +177,6 @@
<include refid="condition" /> <include refid="condition" />
</select> </select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deptCode">
DEPT_CODE = #deptCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtName">
PARENT_PRDT_NAME = #parentPrdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="type">
TYPE = #type#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="leaf">
LEAF = #leaf#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sort">
SORT = #sort#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="icon">
ICON = #icon#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="num">
NUM = #num#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitWt">
UNIT_WT = #unitWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWt">
TOTAL_WT = #totalWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath1">
FILE_PATH1 = #filePath1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath2">
FILE_PATH2 = #filePath2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath3">
FILE_PATH3 = #filePath3#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath4">
FILE_PATH4 = #filePath4#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath5">
FILE_PATH5 = #filePath5#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCommentDate">
PLAN_COMMENT_DATE = #planCommentDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate">
PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionDate">
ACTUAL_COMPLETION_DATE = #actualCompletionDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionNum">
ACTUAL_COMPLETION_NUM = #actualCompletionNum#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionUnitWt">
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="delStatus">
DEL_STATUS = #delStatus#
</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="remark">
REMARK = #remark#
</isNotEmpty>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.T_HPSC004 (ID, INSERT INTO hpjx.T_HPSC004 (ID,
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
...@@ -382,6 +287,17 @@ ...@@ -382,6 +287,17 @@
ID = #id# ID = #id#
</update> </update>
<!-- 更新完成数量、重量、时间 -->
<update id="updateComplete">
UPDATE hpjx.T_HPSC004
SET
ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#, <!-- 实际完工重量 -->
<include refid="updateRevise"/>
WHERE ID = #id#
</update>
<select id="queryDetail" parameterClass="java.util.HashMap" <select id="queryDetail" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004"> resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004">
SELECT SELECT
...@@ -447,6 +363,19 @@ ...@@ -447,6 +363,19 @@
ID = #id# ID = #id#
</update> </update>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hpjxSchema}.T_HPSC004
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<isNotEmpty prepend=" AND " property="prodOrderNo">
PRODUCTION_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNos">
PRODUCTION_ORDER_NO IN <iterate close=")" open="(" conjunction="," property="prodOrderNos">#prodOrderNos[]#</iterate>
</isNotEmpty>
</update>
<!-- 零部件下拉框 --> <!-- 零部件下拉框 -->
<select id="queryInventComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryInventComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
......
package com.baosight.hpjx.hp.sc.tools; package com.baosight.hpjx.hp.sc.tools;
import com.baosight.hpjx.core.dao.DaoBase; import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC001; import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.kc.domain.HPKC005; import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.kc.domain.HPKC010; import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.hp.pz.domain.HPPZ004; import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.hp.sc.domain.HPSC001; import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.sc.domain.HPSC002; import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A; import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.domain.HPSC005B; import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.StringUtils; import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -62,7 +68,33 @@ public class HPSCTools { ...@@ -62,7 +68,33 @@ public class HPSCTools {
} else { } else {
updateMap.put("status", 0); updateMap.put("status", 0);
} }
DaoBase.getInstance().update(HPSqlConstant.HPSC005.UPDATE_ASSIGN_NUM, updateMap); DaoUtils.update(HPSqlConstant.HPSC005.UPDATE_ASSIGN_NUM, updateMap);
}
/**
* 新增入库及删除入库单做同步计划订单
*
* @param prodOrderNo
* @param num
*/
public static void syncPlan(String prodOrderNo, BigDecimal num) {
HPSC004 dbSc004 = HPSCTools.HpSc004.get(prodOrderNo);
AssertUtils.isNull(dbSc004, String.format("生产订单计划[%s]不存在", prodOrderNo));
BigDecimal completionNum = num.add(dbSc004.getActualCompletionNum());
AssertUtils.isGt(BigDecimal.ZERO, completionNum, "更新后的生产计划完成数量小于0,请检查");
BigDecimal completionUnitWt = completionNum.multiply(dbSc004.getUnitWt());
// 计算重量
HPSC004 newSc004 = new HPSC004();
newSc004.setId(dbSc004.getId());
newSc004.setActualCompletionNum(completionNum);
newSc004.setActualCompletionUnitWt(completionUnitWt);
// 计算是否生产完成
if (dbSc004.getNum().compareTo(completionNum) == 0) {
newSc004.setActualCompletionDate(DateUtils.shortDateTime());
} else {
newSc004.setActualCompletionDate("");
}
DaoUtils.update(HPSqlConstant.HPSC004.UPDATE_COMPLETE, newSc004);
} }
/** /**
...@@ -113,6 +145,59 @@ public class HPSCTools { ...@@ -113,6 +145,59 @@ public class HPSCTools {
} }
} }
/**
* HPSC005公共DAO定义
*
* @author:songx
* @date:2024/2/4,10:17
*/
public static class HpSc004 {
/**
* 锁
*
* @param prodOrderNo
* @return
*/
public static void lock(String prodOrderNo) {
if (StringUtils.isBlank(prodOrderNo)) {
return;
}
Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo);
DaoBase.getInstance().update(HPSqlConstant.HPSC004.LOCK, queryMap);
}
/**
* 锁
*
* @param prodOrderNos
* @return
*/
public static void lock(List<String> prodOrderNos) {
if (CollectionUtils.isEmpty(prodOrderNos)) {
return;
}
Map queryMap = new HashMap();
queryMap.put("prodOrderNos", prodOrderNos);
DaoBase.getInstance().update(HPSqlConstant.HPSC004.LOCK, queryMap);
}
/**
* 查询
*
* @param prodOrderNo
* @return
*/
public static HPSC004 get(String prodOrderNo) {
AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap();
queryMap.put("productionOrderNo", prodOrderNo);
List<HPSC004> results = DaoBase.getInstance().query(HPSC004.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单号[%s]信息不存在", prodOrderNo));
return results.get(0);
}
}
/** /**
* HPSC005公共DAO定义 * HPSC005公共DAO定义
...@@ -162,7 +247,7 @@ public class HPSCTools { ...@@ -162,7 +247,7 @@ public class HPSCTools {
AssertUtils.isNull(id, "生产任务ID不能为空"); AssertUtils.isNull(id, "生产任务ID不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("id", id); queryMap.put("id", id);
List<HPSC005> results = DaoBase.getInstance().query("HPSC005.query", queryMap); List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产任务ID[%s]信息不存在", id)); AssertUtils.isNull(results, String.format("生产任务ID[%s]信息不存在", id));
return results.get(0); return results.get(0);
} }
...@@ -220,7 +305,7 @@ public class HPSCTools { ...@@ -220,7 +305,7 @@ public class HPSCTools {
* @return * @return
*/ */
public static HPSC005 get(String prodOrderNo) { public static HPSC005 get(String prodOrderNo) {
AssertUtils.isNull(prodOrderNo, "生产订单号不能为空"); AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("productionOrderNo", prodOrderNo); queryMap.put("productionOrderNo", prodOrderNo);
List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap); List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap);
......
...@@ -128,7 +128,7 @@ public class SecurityUserStandardImpl extends ServiceEPBase implements ISecurity ...@@ -128,7 +128,7 @@ public class SecurityUserStandardImpl extends ServiceEPBase implements ISecurity
} else if (!"-1".equals(userMap.get("isLocked")) && !"-1".equals(userMap.get("status"))) { } else if (!"-1".equals(userMap.get("isLocked")) && !"-1".equals(userMap.get("status"))) {
// 登录校验增加企业是否启用 modify by songx at 2024-01-16 // 登录校验增加企业是否启用 modify by songx at 2024-01-16
String dbCompanyCode = (String) userMap.get("companyCode"); String dbCompanyCode = (String) userMap.get("companyCode");
if (StringUtils.isBlank(dbCompanyCode) || HPPZTools.isValid(dbCompanyCode)) { if (StringUtils.isBlank(dbCompanyCode) || HPPZTools.HpPz009.isValid(dbCompanyCode)) {
String pwdExpireDateString = (String) userMap.get("pwdExpireDate"); String pwdExpireDateString = (String) userMap.get("pwdExpireDate");
String accountExpireDateString = (String) userMap.get("accountExpireDate"); String accountExpireDateString = (String) userMap.get("accountExpireDate");
String nowDateString = DateUtils.curDateStr8(); String nowDateString = DateUtils.curDateStr8();
......
...@@ -42,9 +42,14 @@ let select = function () { ...@@ -42,9 +42,14 @@ let select = function () {
return; return;
} }
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
let whCode = rows[i]['whCode'];
let applyNum = rows[i]['applyNum']; let applyNum = rows[i]['applyNum'];
let num = rows[i]['num']; let num = rows[i]['num'];
let completeNum = rows[i]['completeNum']; let completeNum = rows[i]['completeNum'];
if (isBlank(whCode)) {
message("第" + (i + 1) + "行请选择仓库名称");
return;
}
if (isBlank(applyNum) || !isNumber(applyNum) || !(applyNum > 0)) { if (isBlank(applyNum) || !isNumber(applyNum) || !(applyNum > 0)) {
message("第" + (i + 1) + "行申请数量必须大于0"); message("第" + (i + 1) + "行申请数量必须大于0");
return; return;
......
...@@ -42,12 +42,12 @@ ...@@ -42,12 +42,12 @@
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="150" align="center"/> <EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="150" align="center"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/> <EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/> <EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partCode" cname="零部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="150"/>
<EF:EFColumn ename="orgNo" cname="生产组编码" enable="false" width="150"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/> <EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="150" hidden="true"/>
<EF:EFColumn ename="orgNo" cname="生产组编码" enable="false" width="150" hidden="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
...@@ -15,12 +15,8 @@ ...@@ -15,12 +15,8 @@
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput cname="部件编码" ename="inventCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="部件名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零部件编码" ename="subInventCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零部件名称" ename="subInventName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="零部件名称" ename="subInventName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFSelect cname="是否打印" ename="isPrint" blockId="inqu_status" row="0" colWidth="3" defaultValue=""> <EF:EFSelect cname="是否打印" ename="isPrint" blockId="inqu_status" row="0" colWidth="3" defaultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.isPrint"/> <EF:EFCodeOption codeName="hpjx.hpjx.isPrint"/>
...@@ -29,6 +25,8 @@ ...@@ -29,6 +25,8 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/> <EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect> </EF:EFSelect>
</div>
<div class="row">
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" startName="createdDateFrom" endName="createdDateTo" <EF:EFDateSpan startCname="创建日期(从)" endCname="至" startName="createdDateFrom" endName="createdDateTo"
blockId="inqu_status" row="0" role="date" format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" blockId="inqu_status" row="0" role="date" format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8"
endRatio="4:8" readonly="true"> endRatio="4:8" readonly="true">
...@@ -61,11 +59,11 @@ ...@@ -61,11 +59,11 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="100" align="center"/> <EF:EFColumn ename="remark" cname="备注" enable="false" width="100" align="center"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/> <EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="inventCode" cname="部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="subInventCode" cname="零部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="prodNo" cname="生产订单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="prodNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="saleNo" cname="销售单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="saleNo" cname="销售单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="oldSaleNo" cname="原销售单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="oldSaleNo" cname="原销售单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="inventCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="subInventCode" cname="零部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="120" align="center"/> <EF:EFColumn ename="createdName" cname="创建人" enable="false" width="120" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
......
...@@ -12,6 +12,7 @@ $(function() { ...@@ -12,6 +12,7 @@ $(function() {
"result": { "result": {
columns: [{ columns: [{
field: "whCode", field: "whCode",
title: "仓库名称",
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < whNameGlobalData.length; i++) { for (let i = 0; i < whNameGlobalData.length; i++) {
if (whNameGlobalData[i]['valueField'] === dataItem['whCode']) { if (whNameGlobalData[i]['valueField'] === dataItem['whCode']) {
...@@ -32,6 +33,7 @@ $(function() { ...@@ -32,6 +33,7 @@ $(function() {
} }
}, { }, {
field: "inventName", field: "inventName",
title: "存货名称",
template: function (dataItem) { template: function (dataItem) {
//let flag = false; //let flag = false;
for (let i = 0; i < inventNameGlobalData.length; i++) { for (let i = 0; i < inventNameGlobalData.length; i++) {
...@@ -54,7 +56,7 @@ $(function() { ...@@ -54,7 +56,7 @@ $(function() {
var eiInfo = new EiInfo(); var eiInfo = new EiInfo();
eiInfo.set("inqu_status-0-inventTypes", [1, 2, 5]); eiInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
eiInfo.set("inqu_status-0-inventType", options.model["inventType"]); eiInfo.set("inventType", options.model["inventType"]);
eiInfo.set("isSplicingSymbol",false); eiInfo.set("isSplicingSymbol",false);
//eiInfo.set("inqu_status-0-inventTypes", [1, 2, 5]); //eiInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
//eiInfo.set("inqu_status-0-inventCode", options.model["inventCode"]); //eiInfo.set("inqu_status-0-inventCode", options.model["inventCode"]);
...@@ -92,6 +94,7 @@ $(function() { ...@@ -92,6 +94,7 @@ $(function() {
}*/ }*/
}, { }, {
field: "inventRecordId", field: "inventRecordId",
title: "规格",
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < specGlobalData.length; i++) { for (let i = 0; i < specGlobalData.length; i++) {
if (specGlobalData[i]['valueField'] === dataItem['inventRecordId']) { if (specGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="otherEnterNo" cname="入库单号" enable="false" width="130" align="center"/> <EF:EFColumn ename="otherEnterNo" cname="入库单号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd" <EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd"
parseFormats="['yyyyMMdd']" width="90" align="center" required="true" readonly="true"/> parseFormats="['yyyyMMdd']" width="90" align="center" required="true" readonly="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true" readonly="true"> <EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true" readonly="true">
......
var inventNameGlobalData = []; var inventNameGlobalData = [];
var prdtNameGlobalData = [];
// 传递参数 将附件ID与当前记录ID进行绑定 // 传递参数 将附件ID与当前记录ID进行绑定
// let rowId = ''; // let rowId = '';
let parentId = ''; let parentId = '';
...@@ -41,7 +42,11 @@ $(function () { ...@@ -41,7 +42,11 @@ $(function () {
select: function (e) { select: function (e) {
var nodeData = this.dataItem(e.node); var nodeData = this.dataItem(e.node);
let eiInfo = new EiInfo(); let eiInfo = new EiInfo();
eiInfo.set("inqu_status-0-inventTypes", [3, 4]); if (nodeData.lv == 1){
eiInfo.set("inqu_status-0-inventTypes", [4]);
}else if (nodeData.lv == 2){
eiInfo.set("inqu_status-0-inventTypes", [3]);
}
var dataSource; var dataSource;
EiCommunicator.send("HPPZ006", "queryPrdtComboBox", eiInfo, { EiCommunicator.send("HPPZ006", "queryPrdtComboBox", eiInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
...@@ -56,6 +61,7 @@ $(function () { ...@@ -56,6 +61,7 @@ $(function () {
IPLATUI.EFTree.materialTree.selectTreeNode.projCode = nodeData.projCode; IPLATUI.EFTree.materialTree.selectTreeNode.projCode = nodeData.projCode;
IPLATUI.EFTree.materialTree.selectTreeNode.prdtName = nodeData.prdtName; IPLATUI.EFTree.materialTree.selectTreeNode.prdtName = nodeData.prdtName;
IPLATUI.EFTree.materialTree.selectTreeNode.projName = nodeData.projName; IPLATUI.EFTree.materialTree.selectTreeNode.projName = nodeData.projName;
IPLATUI.EFTree.materialTree.selectTreeNode.lv = nodeData.lv;
// 重新查询EFGrid // 重新查询EFGrid
parentId = nodeData.nodeId; parentId = nodeData.nodeId;
query(); query();
...@@ -150,11 +156,18 @@ $(function () { ...@@ -150,11 +156,18 @@ $(function () {
onAdd: function (e) { onAdd: function (e) {
// 动态设置默认邮箱 // 动态设置默认邮箱
let selectTreeNode = IPLATUI.EFTree.materialTree.selectTreeNode; let selectTreeNode = IPLATUI.EFTree.materialTree.selectTreeNode;
//e.items[0]['prdtType'] = selectTreeNode.lv = 4;
$.each(e.items, function (index, item) { $.each(e.items, function (index, item) {
item['projCode'] = selectTreeNode.projCode; item['projCode'] = selectTreeNode.projCode;
item['projName'] = selectTreeNode.projName; item['projName'] = selectTreeNode.projName;
item['parentId'] = selectTreeNode.nodeId; item['parentId'] = selectTreeNode.nodeId;
item['parentPrdtName'] = selectTreeNode.prdtName; item['parentPrdtName'] = selectTreeNode.prdtName;
if (selectTreeNode.lv == 1){
item['prdtType'] = 4;
}else if (selectTreeNode.lv == 2){
item['prdtType'] = 3;
}
//item['id'] = null
}); });
}, },
/** /**
...@@ -198,6 +211,7 @@ $(function () { ...@@ -198,6 +211,7 @@ $(function () {
columns: [ columns: [
{ {
field: "operator", field: "operator",
title: "操作",
template: function (item) { template: function (item) {
console.log(item) console.log(item)
let auditStatus = item.status; let auditStatus = item.status;
...@@ -205,26 +219,77 @@ $(function () { ...@@ -205,26 +219,77 @@ $(function () {
let template = ''; let template = '';
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' // template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
// + 'onclick="openUploadFile(' + item.id + ',1)" >附件上传</a>'; // + 'onclick="openUploadFile(' + item.id + ',1)" >附件上传</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' if (item.id){
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>'; template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
}
if (lv === '3') { if (lv === '3') {
if (auditStatus == 0) { if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="check(' + item.id + ',1)" >提交</a>'; 'onclick="check(' + item.id + ',1)" >提交</a>';
} else { } /*else {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="check(' + item.id + ',0)" >撤回</a>'; 'onclick="check(' + item.id + ',0)" >撤回</a>';
} }*/
} }
return template; return template;
} }
},{ },{
field: "prdtName", field: "prdtName",
query: function (container, options) { title: "部件名称",
/*query: function (container, options) {
let eiInfo = new EiInfo(); let eiInfo = new EiInfo();
eiInfo.set("inqu_status-0-inventTypes", [3, 4]); eiInfo.set("inqu_status-0-inventTypes", [3, 4]);
eiInfo.set("inqu_status-0-inventType", options.model["prdtType"]); eiInfo.set("inqu_status-0-inventType", options.model["prdtType"]);
return eiInfo; return eiInfo;
}*/
template: function (dataItem) {
for (let i = 0; i < prdtNameGlobalData.length; i++) {
if (prdtNameGlobalData[i]['textField'] === dataItem['prdtName']) {
//dataItem["prdtCode"] = prdtNameGlobalData[i]['valueField']
resultGrid.setCellValue(0, "prdtCode", prdtNameGlobalData[i]['valueField']);
return prdtNameGlobalData[i]['textField'];
}
}
return dataItem["prdtName"];
},
editor: function (container, options) {
var grid = container.closest(".k-grid").data("kendoGrid");
var cellIndex = grid.cellIndex(container);
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
let eiInfo = new EiInfo();
let selectTreeNode = IPLATUI.EFTree.materialTree.selectTreeNode;
if (selectTreeNode.lv == 1){
eiInfo.set("inventType", 4);
}else if (selectTreeNode.lv == 2){
eiInfo.set("inventType", 3);
}else {
eiInfo.set("inventTypes", [3,4]);
}
eiInfo.set("isSplicingSymbol",false);
var dataSource;
EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("invent_name_block_id").getMappedRows();
prdtNameGlobalData = dataSource;
},
onFail: function (ei) {
}
}, {async: false});
input.kendoAutoComplete({
valuePrimitive: true,
dataSource: dataSource,
dataTextField: "textField",
dataValueField: "valueField",
required: "true",
optionLabelTemplate: "#:textField#",
valueTemplate: "#:valueField#",
template: "#:textField#",
filter: "contains"
});
} }
}, { }, {
field: "parentPrdtName", field: "parentPrdtName",
...@@ -274,22 +339,7 @@ $(function () { ...@@ -274,22 +339,7 @@ $(function () {
// }); // });
// } // }
// } // }
], ]
loadComplete: function (grid) {
// 此grid对象
// grid.dataSource.bind("change", function(e) {
// if (e.field == "inventRecordId") {
// var tr,index;
// // 获取此model元素信息
// var item = e.items[0];
// for (let i = 0; i < inventNameGlobalData.length; i++) {
// if (inventNameGlobalData[i]['valueField'] === item.inventRecordId) {
// resultGrid.setCellValue(item, 'prdtCode', inventNameGlobalData[i]['textField'])
// }
// }
// }
// });
}
}, },
}; };
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
<EF:EFPage title="物料清单"> <EF:EFPage title="物料清单">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect ename="inqu_status-0-prdtType" cname="部件类型" colWidth="3" filter="contains" <%--<EF:EFSelect ename="inqu_status-0-prdtType" cname="部件类型" colWidth="3" filter="contains"
template="#=textField#" valueTemplate="#=textField#"> template="#=textField#" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFSelect> </EF:EFSelect>--%>
<EF:EFSelect cname="部件名称" ename="inqu_status-0-prdtCode" filter="contains" defultValue=""> <EF:EFSelect cname="部件名称" ename="inqu_status-0-prdtCode" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
...@@ -46,23 +46,33 @@ ...@@ -46,23 +46,33 @@
<EF:EFColumn ename="level" cname="层级" hidden="true"/> <EF:EFColumn ename="level" cname="层级" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/> <EF:EFColumn enable="false" ename="projCode" cname="项目编码"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/> <EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFComboColumn cname="部件类型" ename="prdtType" width="90" align="center" required="true"> <%--<EF:EFComboColumn cname="部件类型" ename="prdtType" width="90" align="center" required="true"
columnTemplate="#=textField#"
itemTemplate="#=textField#"
textField="textField"
valueField="valueField">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFComboColumn>--%>
<EF:EFComboColumn ename="prdtType" cname="部件类型" align="center" required="true"
filter="contains" width="90">
<EF:EFOption label="零部件" value="3"/>
<EF:EFOption label="部件" value="4"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFPopupColumn ename="prdtName" cname="部件名称" width="200" popupType="ServiceGrid" <%--<EF:EFPopupColumn ename="prdtName" cname="部件名称" width="200" popupType="ServiceGrid"
popupTitle="部件信息" serviceName="HPPZ006" methodName="queryPrdtComboBox" resultId="invent_prdt_name_block_id" popupTitle="部件信息" serviceName="HPPZ006" methodName="queryPrdtComboBox" resultId="invent_prdt_name_block_id"
columnEnames="param1Field,textField" columnEnames="param1Field,textField"
columnCnames="部件名称,部件编码" columnCnames="部件名称,部件编码"
backFillColumnIds="param1Field,textField" backFillColumnIds="param1Field,textField"
backFillFieldIds="prdtName,prdtCode" backFillFieldIds="prdtName,prdtCode"
valueField="param1Field" textField="param1Field"/> valueField="param1Field" textField="param1Field"/>--%>
<EF:EFColumn ename="prdtCode" cname="部件编码"/> <EF:EFColumn ename="prdtName" cname="部件名称" width="200" align="center" maxLength="50"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" hidden = 'true'/>
<EF:EFColumn ename="length" cname="长" format="{0:N3}"/> <EF:EFColumn ename="length" cname="长" format="{0:N3}"/>
<EF:EFColumn ename="width" cname="宽" format="{0:N3}"/> <EF:EFColumn ename="width" cname="宽" format="{0:N3}"/>
<EF:EFColumn ename="thick" cname="厚" format="{0:N3}"/> <EF:EFColumn ename="thick" cname="厚" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="备注" /> <EF:EFColumn ename="remark" cname="备注" />
<EF:EFColumn enable="false" ename="parentId" hidden="true" cname="上级部件名称"/> <EF:EFColumn enable="false" ename="parentId" hidden="true" cname="上级部件名称"/>
<EF:EFColumn enable="false" ename="parentPrdtName" cname="上级部件名称"/> <EF:EFColumn enable="false" ename="parentPrdtName" hidden="true" cname="上级部件名称"/>
<EF:EFColumn ename="num" required="true" cname="数量"/> <EF:EFColumn ename="num" required="true" cname="数量"/>
<EF:EFColumn ename="unitWt" required="true" format="{0:N3}" cname="单重"/> <EF:EFColumn ename="unitWt" required="true" format="{0:N3}" cname="单重"/>
<EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" cname="总重"/> <EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" cname="总重"/>
......
...@@ -19,14 +19,18 @@ $(function () { ...@@ -19,14 +19,18 @@ $(function () {
console.log(item) console.log(item)
let auditStatus = item.status; let auditStatus = item.status;
let template = ''; let template = '';
if (item.matId != null){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.matId + ')" >附件清单</a>';
}
if (auditStatus == 0) { if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',1)" >提交</a>'; 'onclick="check(' + item.id + ',1)" >提交</a>';
} }
else { /*else {
template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' + template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',0)" >撤回</a>'; 'onclick="check(' + item.id + ',0)" >撤回</a>';
} }*/
return template; return template;
} }
}, },
...@@ -283,4 +287,4 @@ function check_time(model,rows){ ...@@ -283,4 +287,4 @@ function check_time(model,rows){
} }
} }
return true; return true;
} }
\ No newline at end of file
...@@ -41,12 +41,12 @@ ...@@ -41,12 +41,12 @@
<EF:EFColumn enable="false" ename="projCode" cname="项目号" readonly="true"/> <EF:EFColumn enable="false" ename="projCode" cname="项目号" readonly="true"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称" readonly="true"/> <EF:EFColumn enable="false" ename="projName" cname="项目名称" readonly="true"/>
<EF:EFColumn enable="false" ename="planInfoNo" cname="生产计划单号" readonly="true"/> <EF:EFColumn enable="false" ename="planInfoNo" cname="生产计划单号" readonly="true"/>
<EF:EFComboColumn ename="prdtType" cname="部件类型" width="90" align="center" enable="false"> <EF:EFComboColumn ename="prdtType" cname="部件类型" hidden = 'true' width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" /> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码" readonly="true"/> <EF:EFColumn enable="false" ename="prdtCode" cname="部件编码" readonly="true" hidden = "true"/>
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称" readonly="true"/> <EF:EFColumn enable="false" ename="prdtName" cname="部件名称" readonly="true"/>
<EF:EFColumn hidden="true" enable="false" ename="spec" cname="规格" readonly="true"/> <EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/> <EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150" <EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150"
required='true'/> required='true'/>
...@@ -63,12 +63,14 @@ ...@@ -63,12 +63,14 @@
<EF:EFRegion id="detail" title="明细信息"> <EF:EFRegion id="detail" title="明细信息">
<EF:EFGrid blockId="detail" autoDraw="no"> <EF:EFGrid blockId="detail" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" hidden="true"/>
<EF:EFColumn ename="parentId" cname="父ID" hidden="true"/> <EF:EFColumn ename="parentId" cname="父ID" hidden="true"/>
<EF:EFComboColumn ename="prdtType" cname="零件类型" width="90" align="center" readonly="true"> <EF:EFComboColumn ename="prdtType" cname="零件类型" width="90" align="center" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" /> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="零件编码"/> <EF:EFColumn enable="false" ename="prdtCode" cname="零部件编码" hidden = "true"/>
<EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="零件名称"/> <EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="零件名称"/>
<EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/> <EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/> <EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<%-- <EF:EFComboColumn enable="false" ename="delStatus" cname="状态">--%> <%-- <EF:EFComboColumn enable="false" ename="delStatus" cname="状态">--%>
......
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="140" align="center"/> <EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/> <EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center"/> <EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center"/> <EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
...@@ -99,6 +99,20 @@ $(function () { ...@@ -99,6 +99,20 @@ $(function () {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>'; + 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>';
return template return template
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
// + 'onclick="openUploadFile(' + item.id + ',1)" >附件上传</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
if (lv === '3') {
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="check(' + item.id + ',1)" >提交</a>';
} /*else {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="check(' + item.id + ',0)" >撤回</a>';
}*/
}
return template;
} }
},{ },{
field: "inventName", field: "inventName",
......
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