Commit 7bd20139 by wancheng

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

parents 18a227f3 06ec3643
......@@ -33,8 +33,8 @@ public class HPKC001 extends DaoEPBase {
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_PURCHASE_CODE = "purchaseCode"; /* 采购单号*/
public static final String FIELD_OLD_PURCHASE_CODE = "oldPurchaseCode"; /* 原采购单号*/
public static final String FIELD_PURCHASE_NO = "purchaseNo"; /* 采购单号*/
public static final String FIELD_OLD_PURCHASE_NO = "oldPurchaseNo"; /* 原采购单号*/
public static final String FIELD_RECEIPT_DATE = "receiptDate"; /* 单据日期*/
public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
......@@ -56,7 +56,7 @@ public class HPKC001 extends DaoEPBase {
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_OLD_PURCHASE_CODE = "OLD_PURCHASE_CODE"; /* 原采购单号*/
public static final String COL_OLD_PURCHASE_NO = "OLD_PURCHASE_NO"; /* 原采购单号*/
public static final String COL_RECEIPT_DATE = "RECEIPT_DATE"; /* 单据日期*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
......@@ -69,11 +69,11 @@ public class HPKC001 extends DaoEPBase {
public static final String COL_REMARKS = "REMARKS"; /* 备注*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String QUERY = "t_hpkc001.query";
public static final String COUNT = "t_hpkc001.count";
public static final String INSERT = "t_hpkc001.insert";
public static final String UPDATE = "t_hpkc001.update";
public static final String DELETE = "t_hpkc001.delete";
public static final String QUERY = "HPKC001.query";
public static final String COUNT = "HPKC001.count";
public static final String INSERT = "HPKC001.insert";
public static final String UPDATE = "HPKC001.update";
public static final String DELETE = "HPKC001.delete";
private Long id = null; /* 主键id*/
private String companyCode = " "; /* 企业编码 预留*/
......@@ -84,8 +84,8 @@ public class HPKC001 extends DaoEPBase {
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime ; /* 更新时间*/
private String purchaseCode = " "; /* 采购单号*/
private String oldPurchaseCode = " "; /* 原采购单号*/
private String purchaseNo = " "; /* 采购单号*/
private String oldPurchaseNo = " "; /* 原采购单号*/
private String receiptDate ; /* 单据日期*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
......@@ -141,11 +141,11 @@ public class HPKC001 extends DaoEPBase {
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PURCHASE_CODE);
eiColumn = new EiColumn(FIELD_PURCHASE_NO);
eiColumn.setDescName("采购单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OLD_PURCHASE_CODE);
eiColumn = new EiColumn(FIELD_OLD_PURCHASE_NO);
eiColumn.setDescName("原采购单号");
eiMetadata.addMeta(eiColumn);
......@@ -354,36 +354,36 @@ public class HPKC001 extends DaoEPBase {
this.updatedTime = updatedTime;
}
/**
* get the purchaseCode - 采购单号.
* @return the purchaseCode
* get the purchaseNo - 采购单号.
* @return the purchaseNo
*/
public String getPurchaseCode() {
return this.purchaseCode;
public String getPurchaseNo() {
return this.purchaseNo;
}
/**
* set the purchaseCode - 采购单号.
* set the purchaseNo - 采购单号.
*
* @param purchaseCode - 采购单号
* @param purchaseNo - 采购单号
*/
public void setPurchaseCode(String purchaseCode) {
this.purchaseCode = purchaseCode;
public void setPurchaseNo(String purchaseNo) {
this.purchaseNo = purchaseNo;
}
/**
* set the oldPurchaseCode - 原采购单号.
* set the oldPurchaseNo - 原采购单号.
*
* @param oldPurchaseCode - 原采购单号
* @param oldPurchaseNo - 原采购单号
*/
public void setOldPurchaseCode(String oldPurchaseCode) {
this.oldPurchaseCode = oldPurchaseCode;
public void setOldPurchaseNo(String oldPurchaseNo) {
this.oldPurchaseNo = oldPurchaseNo;
}
/**
* get the oldPurchaseCode - 原采购单号.
* @return the oldPurchaseCode
* get the oldPurchaseNo - 原采购单号.
* @return the oldPurchaseNo
*/
public String getOldPurchaseCode() {
return this.oldPurchaseCode;
public String getOldPurchaseNo() {
return this.oldPurchaseNo;
}
/**
......@@ -579,8 +579,8 @@ public class HPKC001 extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setPurchaseCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PURCHASE_CODE)), purchaseCode));
setOldPurchaseCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OLD_PURCHASE_CODE)), oldPurchaseCode));
setPurchaseNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PURCHASE_NO)), purchaseNo));
setOldPurchaseNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OLD_PURCHASE_NO)), oldPurchaseNo));
setReceiptDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIPT_DATE)), receiptDate));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
......@@ -610,8 +610,8 @@ public class HPKC001 extends DaoEPBase {
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_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_PURCHASE_CODE, StringUtils.toString(purchaseCode, eiMetadata.getMeta(FIELD_PURCHASE_CODE)));
map.put(FIELD_OLD_PURCHASE_CODE, StringUtils.toString(oldPurchaseCode, eiMetadata.getMeta(FIELD_OLD_PURCHASE_CODE)));
map.put(FIELD_PURCHASE_NO, StringUtils.toString(purchaseNo, eiMetadata.getMeta(FIELD_PURCHASE_NO)));
map.put(FIELD_OLD_PURCHASE_NO, StringUtils.toString(oldPurchaseNo, eiMetadata.getMeta(FIELD_OLD_PURCHASE_NO)));
map.put(FIELD_RECEIPT_DATE, StringUtils.toString(receiptDate, eiMetadata.getMeta(FIELD_RECEIPT_DATE)));
map.put(FIELD_WH_CODE, StringUtils.toString(whCode, eiMetadata.getMeta(FIELD_WH_CODE)));
map.put(FIELD_WH_NAME, StringUtils.toString(whName, eiMetadata.getMeta(FIELD_WH_NAME)));
......
......@@ -42,6 +42,7 @@ public class ServiceHPKC001 extends ServiceBase {
queryMap.put("inventTypes", DEFAULT_INVENT_CODE);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_ALL_BLOCK_ID), queryMap, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC001().eiMetadata);
} catch (PlatException e) {
......@@ -92,7 +93,7 @@ public class ServiceHPKC001 extends ServiceBase {
// 设置基础信息
this.setBaseInfo(fKc001);
// 生成入库单号
fKc001.setPurchaseCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC001_NUMBER));
fKc001.setPurchaseNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC001_NUMBER));
DaoUtils.insert(HPKC001.INSERT, fKc001);
// 修改库存
HPKCTools.updateStock(fKc001.getWhCode(), fKc001.getInventRecordId(), fKc001.getAmount(),
......@@ -131,7 +132,7 @@ public class ServiceHPKC001 extends ServiceBase {
this.setBaseInfo(fKc001);
DaoUtils.update(HPKC001.UPDATE, fKc001);
// 计算差异数量与重量
HPKC001 dbKc001 = mapKc001.get(fKc001.getPurchaseCode());
HPKC001 dbKc001 = mapKc001.get(fKc001.getPurchaseNo());
BigDecimal diffAmount = fKc001.getAmount().subtract(dbKc001.getAmount());
BigDecimal diffWeight = fKc001.getWeight().subtract(dbKc001.getWeight());
// 修改库存
......@@ -197,12 +198,12 @@ public class ServiceHPKC001 extends ServiceBase {
fKc001.fromMap(resultRows.get(i));
DaoUtils.update(HPKC001.DELETE, fKc001);
// 生成红冲记录
HPKC001 dbKc001 = mapKc001.get(fKc001.getPurchaseCode());
HPKC001 dbKc001 = mapKc001.get(fKc001.getPurchaseNo());
HPKC001 newKc006 = BeanUtils.copy(dbKc001, HPKC001.class);
newKc006.setPurchaseCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.OTHER_ENTER_NO));
newKc006.setPurchaseNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.OTHER_ENTER_NO));
newKc006.setAmount(newKc006.getAmount().negate());
newKc006.setWeight(newKc006.getWeight().negate());
newKc006.setOldPurchaseCode(newKc006.getPurchaseCode());
newKc006.setOldPurchaseNo(newKc006.getPurchaseNo());
newKc006.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.insert(HPKC001.INSERT, newKc006);
// 修改库存
......
......@@ -12,8 +12,8 @@
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
PURCHASE_CODE as "purchaseCode", <!-- 采购单号 -->
OLD_PURCHASE_CODE as "oldPurchaseCode", <!-- 原采购单号 -->
PURCHASE_NO as "purchaseNo", <!-- 采购单号 -->
OLD_PURCHASE_NO as "oldPurchaseNo", <!-- 原采购单号 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
......@@ -55,8 +55,8 @@
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="purchaseCode">
PURCHASE_CODE = #purchaseCode#
<isNotEmpty prepend=" AND " property="purchaseNo">
PURCHASE_NO = #purchaseNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
......@@ -91,8 +91,8 @@
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="oldPurchaseCode">
OLD_PURCHASE_CODE = #oldPurchaseCode#
<isNotEmpty prepend=" AND " property="oldPurchaseNo">
OLD_PURCHASE_NO = #oldPurchaseNo#
</isNotEmpty>
</sql>
......@@ -123,8 +123,8 @@
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
PURCHASE_CODE, <!-- 采购单号 -->
OLD_PURCHASE_CODE, <!-- 原采购单号 -->
PURCHASE_NO, <!-- 采购单号 -->
OLD_PURCHASE_NO, <!-- 原采购单号 -->
RECEIPT_DATE, <!-- 单据日期 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
......@@ -138,7 +138,7 @@
DELETE_FLAG <!-- 是否删除0.否1.是 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#oldPurchaseCode#,#purchaseCode#, #receiptDate#, #whCode#, #whName#, #inventType#,
#oldPurchaseNo#,#purchaseNo#, #receiptDate#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#,
#remarks#, #deleteFlag#
)
......
......@@ -106,7 +106,7 @@ public class HPKCTools {
if (CollectionUtils.isEmpty(results)) {
return null;
}
return results.stream().collect(Collectors.toMap(HPKC001::getPurchaseCode, item -> item));
return results.stream().collect(Collectors.toMap(HPKC001::getPurchaseNo, item -> item));
}
/**
......
......@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
......@@ -12,6 +13,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.service.soa.XLocalManager;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.text.SimpleDateFormat;
......@@ -28,7 +30,9 @@ public class ServiceHPSC001 extends ServiceBase {
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
Map map = new HashMap();
map.put("companyCode", UserSessionUtils.getCompanyCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), map);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC001().eiMetadata);
} catch (PlatException e) {
......@@ -139,7 +143,7 @@ public class ServiceHPSC001 extends ServiceBase {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpsc001.fromMap(map);
this.dao.update("HPSC001.check", hpsc001.toMap());
DaoUtils.update("HPSC001.check", hpsc001.toMap());
if(hpsc001.getStatus() == 1){
Map sqlMap = new HashMap();
sqlMap.put("id",hpsc001.getId());
......
......@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.sc.service;
import cn.hutool.core.bean.BeanUtil;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
......@@ -69,7 +70,6 @@ public class ServiceHPSC002 extends ServiceBase {
*/
@Override
public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPSC002 hppz002 = new HPSC002();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
......@@ -84,14 +84,10 @@ public class ServiceHPSC002 extends ServiceBase {
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue())));
hppz002.setDelStatus(1);
hppz002.setTotalWt(totalWt);
hppz002.setCreatedBy(UserSession.getUserId());
hppz002.setCreatedTime(sdf.format(new Date()));
hppz002.setUpdatedBy(null);
hppz002.setUpdatedTime(null);
if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentPrdtCode().equals("root")) {
hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName());
}
this.dao.insert("HPSC002.insert", hppz002.toMap());
DaoUtils.insert("HPSC002.insert", hppz002.toMap());
if (!hppz002.getParentPrdtCode().equals("root")) {
this.checkTreeNodeLeaf(new Long(hppz002.getParentPrdtCode()));
}
......@@ -114,16 +110,13 @@ public class ServiceHPSC002 extends ServiceBase {
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPSC002 hppz002 = new HPSC002();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz002.fromMap(map);
hppz002.setUpdatedBy(UserSession.getUserId());
hppz002.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC001.update", hppz002.toMap());
DaoUtils.update("HPSC001.update", hppz002.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
......@@ -225,7 +218,7 @@ public class ServiceHPSC002 extends ServiceBase {
}else{
queryMap.put("leaf", "1");
}
this.dao.update("HPSC002.updateTreeNodeLeaf", queryMap);
DaoUtils.update("HPSC002.updateTreeNodeLeaf", queryMap);
}
......@@ -247,7 +240,7 @@ public class ServiceHPSC002 extends ServiceBase {
// 二级如果已经审核了则需要去看看计划是否已经更新
}
}
this.dao.update("HPSC002.check", hppz002.toMap());
DaoUtils.update("HPSC002.check", hppz002.toMap());
}
// 处理三级审核之后判断是否都审核完成,如果都审核完成则二级直接审核通过
......@@ -270,7 +263,7 @@ public class ServiceHPSC002 extends ServiceBase {
map2.put("status",0);
map2.put("id",THPSC002.getParentPrdtCode());
}
this.dao.update("HPSC002.check",map2);
DaoUtils.update("HPSC002.check",map2);
//处理项目管理中物料状态
Map map3 = new HashMap();
......@@ -287,13 +280,13 @@ public class ServiceHPSC002 extends ServiceBase {
Map map4 = new HashMap();
map4.put("projCode",THPSC002.getProjCode());
map4.put("materialStatus",2);
this.dao.update("HPSC001.checkByProjCode",map4);
DaoUtils.update("HPSC001.checkByProjCode",map4);
} else if (num1 > 0 && num1 < num2) {
// 部分审批
Map map4 = new HashMap();
map4.put("projCode",THPSC002.getProjCode());
map4.put("materialStatus",1);
this.dao.update("HPSC001.checkByProjCode",map4);
DaoUtils.update("HPSC001.checkByProjCode",map4);
}
}
......@@ -322,7 +315,7 @@ public class ServiceHPSC002 extends ServiceBase {
Map sqlMap = new HashMap();
sqlMap.put("id",hppz002.getId());
sqlMap.put("filePath1",hppz002.getFilePath1());
this.dao.update("HPSC002.bindDocIdById", hppz002.toMap());
DaoUtils.update("HPSC002.bindDocIdById", hppz002.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
......@@ -361,10 +354,8 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC003.setCreatedTime(sdf.format(new Date()));
HPSC003.setUpdatedBy(null);
HPSC003.setUpdatedTime(null);
this.dao.insert("HPSC003.insert", HPSC003.toMap());
DaoUtils.insert("HPSC003.insert", HPSC003.toMap());
//根据生产计划单号找到ID
HPSC003 ent = (HPSC003) this.dao.get("HPSC003.query","planInfoNo", SCJHD);
//生产计划详情
Map queryMap = new HashMap();
queryMap.put("id", id);
......@@ -377,7 +368,7 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC004.setDeptCode("");
HPSC004.setProjCode(HPSC002.getProjCode());
HPSC004.setProjName(HPSC002.getProjName());
HPSC004.setParentPrdtCode(StringUtils.toString(ent.getId()));
HPSC004.setParentPrdtCode(SCJHD);
HPSC004.setParentPrdtName(HPSC002.getParentPrdtName());
HPSC004.setPrdtType(HPSC002.getPrdtType());
HPSC004.setPrdtCode(HPSC002.getPrdtCode());
......@@ -395,7 +386,7 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC004.setCreatedTime(sdf.format(new Date()));
HPSC004.setUpdatedBy(null);
HPSC004.setUpdatedTime(null);
this.dao.insert("HPSC004.insert", HPSC004.toMap());
DaoUtils.insert("HPSC004.insert", HPSC004.toMap());
}
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.HPConstants;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
......@@ -65,7 +66,7 @@ public class ServiceHPSC003 extends ServiceBase {
HPSC003.setCreatedTime(sdf.format(new Date()));
HPSC003.setUpdatedBy(null);
HPSC003.setUpdatedTime(null);
this.dao.insert("HPSC003.insert", HPSC003.toMap());
DaoUtils.insert("HPSC003.insert", HPSC003.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
......@@ -85,7 +86,6 @@ public class ServiceHPSC003 extends ServiceBase {
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPSC003 HPSC003 = new HPSC003();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
......@@ -93,9 +93,7 @@ public class ServiceHPSC003 extends ServiceBase {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC003.fromMap(map);
HPSC003.setUpdatedBy(UserSession.getUserId());
HPSC003.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC003.update", HPSC003.toMap());
DaoUtils.update("HPSC003.update", HPSC003.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
......@@ -111,16 +109,13 @@ public class ServiceHPSC003 extends ServiceBase {
}
public EiInfo updateHPSC0004(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPSC004 HPSC004 = new HPSC004();
EiBlock eiBlock = inInfo.getBlock("detail");
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC004.fromMap(map);
HPSC004.setUpdatedBy(UserSession.getUserId());
HPSC004.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC004.updateHPSC0004", HPSC004.toMap());
DaoUtils.update("HPSC004.updateHPSC0004", HPSC004.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
......@@ -181,15 +176,12 @@ public class ServiceHPSC003 extends ServiceBase {
*/
public EiInfo checkHPSC0003(EiInfo eiInfo) {
try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Map map = new HashMap();
String id = eiInfo.get("id").toString();
map.put("id", id);
HPSC003 HPSC003 = (HPSC003) this.dao.get("HPSC003.query","id",id);
HPSC003.setStatus(1);
HPSC003.setUpdatedBy(UserSession.getUserId());
HPSC003.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC003.update", HPSC003.toMap());
DaoUtils.update("HPSC003.update", HPSC003.toMap());
//生成生产订单
HashMap params = new HashMap();
params.put("parentPrdtCode",HPSC003.getId());
......@@ -208,19 +200,11 @@ public class ServiceHPSC003 extends ServiceBase {
HPSC005.setNum(HPSC004.getNum());
HPSC005.setTotalWt(HPSC004.getUnitWt());
HPSC005.setStatus(0);
HPSC005.setCreatedBy(UserSession.getUserId());
HPSC005.setCreatedTime(sdf.format(new Date()));
HPSC005.setFilePath1(HPSC004.getFilePath1());
HPSC005.setFilePath2(HPSC004.getFilePath2());
HPSC005.setFilePath3(HPSC004.getFilePath3());
HPSC005.setFilePath4(HPSC004.getFilePath4());
HPSC005.setFilePath5(HPSC004.getFilePath5());
this.dao.insert("HPSC005.insert", HPSC005.toMap());
DaoUtils.insert("HPSC005.insert", HPSC005.toMap());
HPSC004.setProductionOrderNo(SCDD);
HPSC004.setUpdatedBy(UserSession.getUserId());
HPSC004.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC004.update", HPSC004.toMap());
DaoUtils.update("HPSC004.update", HPSC004.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -44,18 +45,13 @@ public class ServiceHPSC004 extends ServiceBase {
*/
@Override
public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPSC004 HPSC004 = new HPSC004();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC004.fromMap(map);
HPSC004.setCreatedBy(UserSession.getUserId());
HPSC004.setCreatedTime(sdf.format(new Date()));
HPSC004.setUpdatedBy(null);
HPSC004.setUpdatedTime(null);
this.dao.insert("HPSC004.insert", HPSC004.toMap());
DaoUtils.insert("HPSC004.insert", HPSC004.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
......@@ -75,16 +71,13 @@ public class ServiceHPSC004 extends ServiceBase {
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPSC004 HPSC004 = new HPSC004();
EiBlock eiBlock = inInfo.getBlock("detail");
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC004.fromMap(map);
HPSC004.setUpdatedBy(UserSession.getUserId());
HPSC004.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC004.update", HPSC004.toMap());
DaoUtils.update("HPSC004.update", HPSC004.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.iplat4j.core.ei.EiBlock;
......@@ -48,18 +49,13 @@ public class ServiceHPSC005 extends ServiceBase {
*/
@Override
public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPSC005 HPSC005 = new HPSC005();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC005.fromMap(map);
HPSC005.setCreatedBy(UserSession.getUserId());
HPSC005.setCreatedTime(sdf.format(new Date()));
HPSC005.setUpdatedBy(null);
HPSC005.setUpdatedTime(null);
this.dao.insert("HPSC005.insert", HPSC005.toMap());
DaoUtils.insert("HPSC005.insert", HPSC005.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
......@@ -79,16 +75,13 @@ public class ServiceHPSC005 extends ServiceBase {
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPSC005 HPSC005 = new HPSC005();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC005.fromMap(map);
HPSC005.setUpdatedBy(UserSession.getUserId());
HPSC005.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC005.update", HPSC005.toMap());
DaoUtils.update("HPSC005.update", HPSC005.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
......@@ -135,7 +128,6 @@ public class ServiceHPSC005 extends ServiceBase {
*/
public EiInfo assign(EiInfo eiInfo) {
try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String ids = eiInfo.get("ids").toString();
String orgId = eiInfo.get("orgId").toString();
//先找到分派的组织
......@@ -149,9 +141,7 @@ public class ServiceHPSC005 extends ServiceBase {
HPSC005.setStatus(1);
HPSC005.setOrgNo(map.get("orgId").toString());
HPSC005.setOrgName(map.get("orgCname").toString());
HPSC005.setUpdatedBy(UserSession.getUserId());
HPSC005.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC005.updateAssign", HPSC005.toMap());
DaoUtils.update("HPSC005.updateAssign", HPSC005.toMap());
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.iplat4j.core.ei.EiBlock;
......@@ -10,6 +11,7 @@ import com.baosight.xservices.xs.og.domain.XSOG01;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
......@@ -22,6 +24,7 @@ public class ServiceHPSC098 extends ServiceBase {
*/
public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = new EiInfo();
outInfo.set("inqu_status-0-companyCode", UserSessionUtils.getCompanyCode());
outInfo.set("inqu_status-0-orgCname", inInfo.get("inqu_status-0-orgCname"));
outInfo = super.query(outInfo, "XSOG0801.queryOrgList", new XSOG01());
EiBlock r3Block = new EiBlock("result");
......@@ -38,6 +41,7 @@ public class ServiceHPSC098 extends ServiceBase {
EiBlock eiBlock = outInfo.addBlock("result");
HashMap params = new HashMap();
params.put("orgCname",inInfo.get("inqu_status-0-orgCname"));
params.put("companyCode", UserSessionUtils.getCompanyCode());
List list = dao.query("XSOG0801.queryOrgList",params,0,-999999);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(XSOG01.eiMetadata);
outInfo.addBlock(EiConstant.resultBlock).addRows(list);
......
......@@ -62,6 +62,9 @@
<isNotEmpty prepend=" AND " property="materialStatus">
MATERIAL_STATUS = #materialStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isEmpty property="orderBy">
CREATED_TIME desc
......
......@@ -76,7 +76,7 @@
<select id="query" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002B">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPSC002B A, ${platSchema}.TEUDM02 B
FROM ${hpjxSchema}.T_HPSC002A A, ${platSchema}.TEUDM02 B
WHERE 1=1
AND A.DOC_ID = B.DOC_ID
<include refid="condition"/>
......@@ -85,14 +85,14 @@
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC002B A, ${platSchema}.TEUDM02 B
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC002A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC002B (
INSERT INTO ${hpjxSchema}.T_HPSC002A (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEPT_CODE, <!-- 部门编码 预留 -->
MAT_ID, <!-- 物料ID -->
......@@ -107,7 +107,7 @@
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPSC002B WHERE ID = #id#
DELETE FROM ${hpjxSchema}.T_HPSC002A WHERE ID = #id#
</delete>
</sqlMap>
......@@ -34,19 +34,19 @@
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
PROJ_CODE LIKE ('%$projCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planInfoNo">
PLAN_INFO_NO = #planInfoNo#
PLAN_INFO_NO LIKE ('%$planInfoNo$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
PRDT_CODE LIKE ('%$prdtCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
......@@ -99,7 +99,7 @@
REMARK as "remark", <!-- 备注 -->
CONCAT((
SELECT
ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100
format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2)
FROM
hpjx.T_HPSC004
WHERE
......@@ -143,7 +143,7 @@
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
PRDT_NAME LIKE ('%$prdtName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate">
PLAN_COMPLETION_DATE = #planCompletionDate#
......
......@@ -415,6 +415,7 @@
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
NUM as "num", <!-- 数量 -->
......
......@@ -32,9 +32,11 @@ customerName=\u6B66\u6C49\u5B9D\u4FE1\u5927\u6570\u636E\u4E8B\u4E1A\u90E8
enterpriseName=\u6B66\u6C49\u5B9D\u4FE1\u5927\u6570\u636E\u4E8B\u4E1A\u90E8
datasource.type=dbcp
jdbc.driverClassName=com.mysql.jdbc.Driver
#jdbc.url=jdbc:mysql://127.0.0.1:3306/iplat?useSSL=false&useUnicode=true&characterEncoding=utf-8
jdbc.url=jdbc:mysql://10.24.1.94:3306/iplat?useSSL=false&useUnicode=true&characterEncoding=utf-8
jdbc.username=root
jdbc.password=fnvu~aKs9LTDYUxe
#jdbc.password=root
jdbc.maxActive=20
jdbc.validationQuery=SELECT 1 FROM ${platSchema}.TEDFA00
......
......@@ -27,7 +27,10 @@ org.quartz.jobStore.isClustered = true
org.quartz.jobStore.clusterCheckinInterval = 20000
org.quartz.dataSource.appDS.driver = com.mysql.jdbc.Driver
org.quartz.dataSource.appDS.URL = jdbc:mysql://10.24.1.94:3306/iplat?useSSL=false&useUnicode=true&characterEncoding=utf-8
#org.quartz.dataSource.appDS.URL = jdbc:mysql://127.0.0.1:3306/iplat?useSSL=false&useUnicode=true&characterEncoding=utf-8
org.quartz.dataSource.appDS.user = root
#org.quartz.dataSource.appDS.password =root
org.quartz.dataSource.appDS.password =fnvu~aKs9LTDYUxe
org.quartz.dataSource.appDS.maxConnections = 30
......
......@@ -21,7 +21,7 @@ $(function() {
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-whType", options.model["inventType"]);
inInfo.set("serviceName", "HPPZ007");
inInfo.set("methodName", "queryComboBox");
......@@ -41,7 +41,7 @@ $(function() {
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-inventType", options.model["inventType"]);
inInfo.set("serviceName", "HPPZ006");
inInfo.set("methodName", "queryMaterialComboBox");
......@@ -50,7 +50,7 @@ $(function() {
refreshSelect(container, inInfo);
}
}, {
field: "spe",
field: "inventRecordId",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
......@@ -61,7 +61,7 @@ $(function() {
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-inventCode", options.model["inventCode"]);
inInfo.set("serviceName", "HPPZ006");
inInfo.set("methodName", "queryComboBoxSpec");
......@@ -81,6 +81,20 @@ $(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 < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === item.inventRecordId) {
resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field'])
resultGrid.setCellValue(item, 'unit', inventAllGlobalData[i]['param2Field'])
}
}
}
});
}
}
}
......@@ -98,7 +112,7 @@ $(function() {
$(window).load(function () {
// 仓库名称
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
inInfo.set("inqu_status-0-inventTypes", [1, 2]);
EiCommunicator.send("HPPZ007", "queryComboBox", inInfo, {
onSuccess: function (ei) {
whNameGlobalData = ei.getBlock("wh_record_block_id").getMappedRows();
......
......@@ -11,7 +11,7 @@
<div class="row">
<EF:EFDatePicker cname="单据日期" ename="inqu_status-0-receiptDate" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="采购单号" ename="inqu_status-0-chpurchaseCodeeckNo" colWidth="3"/>
<EF:EFInput cname="采购单号" ename="inqu_status-0-chpurchaseNoeckNo" colWidth="3"/>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
......@@ -36,7 +36,7 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="purchaseCode" cname="采购单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="purchaseNo" cname="采购单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="90" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true">
......@@ -44,9 +44,9 @@
</EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center"/>
<EF:EFColumn ename="material" cname="材质" width="120" align="center"/>
<EF:EFColumn ename="unit" cname="单位" width="120" align="center"/>
<EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center"/>
<EF:EFColumn ename="material" cname="材质" width="120" align="center" enable="false"/>
<EF:EFColumn ename="unit" cname="单位" width="120" align="center" enable="false"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="remark" cname="备注" width="150" readonly="true"/>
......
......@@ -17,15 +17,15 @@
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn cname="企业编码" ename="companyCode" enable="false" width="120" align="center"/>
<EF:EFColumn cname="企业名称" ename="companyName" width="140" editType="textarea" required="true"/>
<EF:EFColumn cname="企业名称" ename="companyName" width="140" required="true"/>
<EF:EFComboColumn cname="是否启用" ename="validFlag" width="80" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hppz.validFlag"/>
</EF:EFComboColumn>
<EF:EFColumn cname="备注" ename="remark" width="150" editType="textarea"/>
<EF:EFColumn cname="创建人名称" ename="createdName" enable="false" align="center"/>
<EF:EFColumn cname="创建人" ename="createdName" enable="false" align="center"/>
<EF:EFColumn cname="创建时间" ename="createdTime" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
<EF:EFColumn cname="修改人名称" ename="updatedName" enable="false" align="center"/>
<EF:EFColumn cname="修改人" ename="updatedName" enable="false" align="center"/>
<EF:EFColumn cname="修改时间" ename="updatedTime" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
</EF:EFGrid>
......
......@@ -76,8 +76,6 @@ function uploadFileCallback(docId) {
}, {
async: false
});
// 关闭弹窗
JSColorbox.close();
}
/**
......
......@@ -16,17 +16,30 @@ $(function () {
{
field: "operator",
template: function (item) {
console.log(item)
let auditStatus = item.status;
let template = '';
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',1)" >审核</a>';
} else {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
}
else {
template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',0)" >反审</a>';
}
return template;
}
},
{
field: "planCompletionDate",
template: function (item){
let auditStatus = item.status;
let template = '';
if (auditStatus == 1){
template += 'this.blur();';
}
return template;
}
}
],
onRowClick : function(e) {
......@@ -96,11 +109,9 @@ $(function () {
template: function (item) {
let filePath1 = item.filePath1;
let template = '';
if (filePath1 === ' ') {
template = '';
} else {
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'href="'+ctx+'/EU/DM/EUDM06.jsp?docId=' + filePath1 + '" >下载</a>';
if (filePath1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>';
}
return template
}
......@@ -111,6 +122,15 @@ $(function () {
}
});
function showUploadFile(id) {
JSColorbox.open({
href: "HPSC002B?methodName=initLoad&inqu_status-0-id=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
function check(id, auditStatus) {
const inEiInfo = new EiInfo();
inEiInfo.set("id", id);
......
......@@ -9,14 +9,19 @@
</head>
<EF:EFPage title="生产计划">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<EF:EFRegion id="inqu" title="查询条件" align-item="center"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="planInfoNo" cname="生产计划单号:" row="0"/>
<EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期"
format="yyyy-MM-dd" required="true"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0">
<div class="row" > <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="projCode" colWidth="3" cname="项目编号:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="projName" colWidth="3" cname="项目名称:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="prdtCode" colWidth="3" cname="产品编码:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="prdtName" colWidth="3" cname="产品名称:" row="0"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" ename="planInfoNo" colWidth="3" cname="生产计划单号:" row="0"/>
<EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" colWidth="3" cname="计划完成日期:"
format="yyyy-MM-dd"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" colWidth="3" ename="status" row="0">
<EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="已审核" value="1"/>
</EF:EFSelect>
......@@ -36,7 +41,7 @@
<EF:EFColumn enable="false" ename="prdtCode" cname="产品编码" readonly="true"/>
<EF:EFColumn enable="false" ename="prdtName" cname="产品名称" readonly="true"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150"
required='true'/>
required='true' readonly="true"/>
<EF:EFColumn enable="false" ename="schedule" cname="生产完工进度" format="{0:N2}" readonly="true"/>
<EF:EFComboColumn enable="false" ename="status" cname="状态">
<EF:EFOption label="未审核" value="0"/>
......@@ -53,7 +58,7 @@
<EF:EFComboColumn ename="prdtType" cname="部件类型" width="90" align="center" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" required='true' cname="部件编码"/>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码"/>
<EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="部件名称"/>
<EF:EFComboColumn enable="false" ename="delStatus" cname="状态">
<EF:EFOption label="已删除" value="0"/>
......@@ -61,9 +66,9 @@
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="num" readonly="true" cname="计划数量"/>
<EF:EFColumn enable="false" ename="unitWt" readonly="true" cname="计划重量"/>
<EF:EFColumn ename="planCommentDate" cname="计划开始时间" editType="date" dateFormat="yyyy/MM/dd" width="150"
<EF:EFColumn ename="planCommentDate" required='true' cname="计划开始时间" editType="date" dateFormat="yyyy/MM/dd" width="150"
/>
<EF:EFColumn ename="planCompletionDate" cname="计划结束时间" editType="date" dateFormat="yyyy/MM/dd" width="150"
<EF:EFColumn ename="planCompletionDate" required='true' cname="计划结束时间" editType="date" dateFormat="yyyy/MM/dd" width="150"
/>
<EF:EFColumn ename="actualCompletionDate" cname="实际完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150"
enable="false"/>
......
......@@ -59,11 +59,9 @@ $(function () {
template: function (item) {
let filePath1 = item.filePath1;
let template = '';
if (filePath1 === ' ') {
template = '';
} else {
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'href="'+ctx+'/EU/DM/EUDM06.jsp?docId=' + filePath1 + '" >下载</a>';
if (filePath1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>';
}
return template
}
......@@ -71,7 +69,14 @@ $(function () {
],
}
});
function showUploadFile(id) {
JSColorbox.open({
href: "HPSC002B?methodName=initLoad&inqu_status-0-id=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
let assignCallback = function (orgId) {
var info = new EiInfo()
info.set("ids",ids.join(','));
......
......@@ -4,11 +4,15 @@ $(function () {
IPLATUI.EFUpload = {
uploadFile: {
success: function(e) {
$("#fileDocId").val(e.response.docId);
let docId = e.response.docId;
if (isBlank(docId)) {
return;
}
$("#fileDocId").val(docId);
NotificationUtil("附件上传成功");
console.log($("#fileDocId").val())
try {
parent.JSColorbox.setValueCallback(e.response.docId);
parent.JSColorbox.setValueCallback(docId);
} catch (e){
}
},
......
......@@ -4,16 +4,10 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="附件上传">
<EF:EFRegion id="result">
<EF:EFUpload blockId="result" ename="uploadFile" docTag="hk_file11" path="A"/>
</EF:EFRegion>
<EF:EFInput ename="fileDocId" cname="" hidden="true"/>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/SC/HPSC099.js"></script>
\ No newline at end of file
......@@ -16,7 +16,7 @@
<span class="my-text" id="my-text1">用户管理</span>
</button>
<button id="my-button-2" class="my-button" onclick="switchWindow(1)">
<span class="my-text" id="my-text2">用户组管理</span>
<span class="my-text" id="my-text2">角色管理</span>
</button>
</div>
......
......@@ -109,7 +109,7 @@
<div class="col-md-12" style="padding-left: 0;padding-right: 0">
<EF:EFTab id="authInfo" showClose="false">
<div title="所属用户组">
<div title="所属角色">
<EF:EFInput blockId="inqu_status" row="0" ename="userIdForParentGroups" cname="登录账号"
type="hidden"/>
<EF:EFGrid blockId="result1" queryMethod="queryUserParentGroups" autoDraw="no" autoBind="false">
......
......@@ -13,7 +13,7 @@
<div class="my-head">
<div id="my-front">
<button id="my-button-1" class="my-button" onclick="switchWindow(1)">
<span class="my-text" id="my-text1">用户组授权</span>
<span class="my-text" id="my-text1">角色授权</span>
</button>
<%--<button id="my-button-2" class="my-button" onclick="switchWindow(2)">
<span class="my-text" id="my-text2">资源授权</span>
......
......@@ -28,13 +28,13 @@
<div id="splitter" class="i-fit-height">
<div id="left-pane" class="i-fit-height">
<div class="col-md-12" style="padding-left: 0;padding-right: 8px">
<EF:EFRegion id="inqu" title="用户组信息" style="padding-left:0;padding-right:0" fitHeight="true">
<EF:EFRegion id="inqu" title="角色信息" style="padding-left:0;padding-right:0" fitHeight="true">
<%-- <EF:EFRegion id="inqu" title="用户组查询" type="query" efRegionShowClear="true" efRegionSave="true"--%>
<%-- style="padding-left:0;padding-right:0">--%>
<div class="row" id="inquRegion">
<EF:EFInput ename="inqu_status-0-groupEname" cname="用户组英文名" placeholder="请输入用户组英文名"
<EF:EFInput ename="inqu_status-0-groupEname" cname="角色英文名" placeholder="请输入角色英文名"
colWidth="6"/>
<EF:EFInput ename="inqu_status-0-groupCname" cname="用户组中文名" placeholder="请输入用户组中文名"
<EF:EFInput ename="inqu_status-0-groupCname" cname="角色中文名" placeholder="请输入角色中文名"
colWidth="6"/>
</div>
<hr>
......@@ -44,10 +44,10 @@
<EF:EFGrid blockId="result" autoDraw="no" serviceName="XS02" personal="true" checkMode="single">
<EF:EFColumn ename="groupId" cname="用户群组ID" readonly="false" hidden="true"
primaryKey="true"/>
<EF:EFColumn ename="groupEname" cname="用户组英文名" style="text-align:left;" readonly="true"
<EF:EFColumn ename="groupEname" cname="角色英文名" style="text-align:left;" readonly="true"
data-regex="/^[@_a-zA-Z0-9]{1,32}$/"
data-errorprompt="对不起,用户组英文名只能是32位英文字母或数字字符或下划线或@符"/>
<EF:EFColumn ename="groupCname" cname="用户组中文名" style="text-align:left;" readonly="true"/>
data-errorprompt="对不起,角色英文名只能是32位英文字母或数字字符或下划线或@符"/>
<EF:EFColumn ename="groupCname" cname="角色中文名" style="text-align:left;" readonly="true"/>
<EF:EFColumn ename="manageGroupEname" cname="管辖组英文名" style="text-align:left;"
hidden="true"/>
<EF:EFColumn ename="manageGroupCname" cname="管辖组中文名" style="text-align:left;"
......@@ -92,7 +92,7 @@
</EF:EFRegion>
<hr style="margin-top: 4px">
<div class="i-region-header" style="padding-left: 8px; display: flex;">
<span>用户组成员</span>
<span>角色成员</span>
</div>
<%-- <EF:EFRegion id="userTable" title="用户组成员" style="overflow-y:auto">--%>
<EF:EFGrid blockId="resultB" autoDraw="false" autoBind="false" serviceName="XS3002"
......
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