Commit 6c8f42bf by yukang

合同管理

parent b1447e8f
...@@ -101,6 +101,8 @@ public class HGConstant { ...@@ -101,6 +101,8 @@ public class HGConstant {
public static final String INSPEC_CODE = "INSPEC_CODE"; public static final String INSPEC_CODE = "INSPEC_CODE";
// 保养单号 // 保养单号
public static final String UPKEEP_CODE = "UPKEEP_CODE"; public static final String UPKEEP_CODE = "UPKEEP_CODE";
public static final String CW_CONTRACT_NO = "CW_CONTRACT_NO";
} }
/** /**
......
...@@ -34,6 +34,9 @@ public class HGCW999 extends DaoEPBase { ...@@ -34,6 +34,9 @@ public class HGCW999 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_DOC_NAME = "docName"; /* 文件ID*/
public static final String FIELD_BIZ_TYPE = "bizType"; /* 业务类型*/ public static final String FIELD_BIZ_TYPE = "bizType"; /* 业务类型*/
public static final String COL_ID = "ID"; /* 主键ID*/ public static final String COL_ID = "ID"; /* 主键ID*/
...@@ -43,6 +46,7 @@ public class HGCW999 extends DaoEPBase { ...@@ -43,6 +46,7 @@ public class HGCW999 extends DaoEPBase {
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/ public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/ public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/
public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件ID*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/ public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/ public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/ public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
...@@ -64,6 +68,7 @@ public class HGCW999 extends DaoEPBase { ...@@ -64,6 +68,7 @@ public class HGCW999 extends DaoEPBase {
private String depCode = " "; /* 部门编码 预留*/ private String depCode = " "; /* 部门编码 预留*/
private Long matId = new Long(0); /* 物料ID*/ private Long matId = new Long(0); /* 物料ID*/
private String docId = " "; /* 文件ID*/ private String docId = " "; /* 文件ID*/
private String docName = " "; /* 文件ID*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/ private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/ private String createdTime = " "; /* 创建时间*/
...@@ -107,6 +112,10 @@ public class HGCW999 extends DaoEPBase { ...@@ -107,6 +112,10 @@ public class HGCW999 extends DaoEPBase {
eiColumn.setDescName("文件ID"); eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_NAME);
eiColumn.setDescName("文件名称");
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);
...@@ -384,6 +393,7 @@ public class HGCW999 extends DaoEPBase { ...@@ -384,6 +393,7 @@ public class HGCW999 extends DaoEPBase {
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId)); setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId)); setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName)); setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime)); setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
...@@ -407,6 +417,7 @@ public class HGCW999 extends DaoEPBase { ...@@ -407,6 +417,7 @@ public class HGCW999 extends DaoEPBase {
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID))); map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID))); map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY))); map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME))); map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME))); map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
...@@ -417,4 +428,12 @@ public class HGCW999 extends DaoEPBase { ...@@ -417,4 +428,12 @@ public class HGCW999 extends DaoEPBase {
return map; return map;
} }
public String getDocName() {
return docName;
}
public void setDocName(String docName) {
this.docName = docName;
}
} }
...@@ -3,7 +3,10 @@ package com.baosight.hggp.hg.cw.service; ...@@ -3,7 +3,10 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW002; import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils; import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
...@@ -11,6 +14,8 @@ import com.baosight.iplat4j.core.ei.EiConstant; ...@@ -11,6 +14,8 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
...@@ -66,12 +71,30 @@ public class ServiceHGCW002 extends ServiceBase { ...@@ -66,12 +71,30 @@ public class ServiceHGCW002 extends ServiceBase {
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 List<Map> detail1Rows = inInfo.getBlock("detail1").getRows();
for (int i = 0; i < resultRows.size(); i++) { List<Map> detail2Rows = inInfo.getBlock("detail2").getRows();
if (CollectionUtils.isNotEmpty(resultRows)) {
HGCW002 HGCW002 = new HGCW002(); HGCW002 HGCW002 = new HGCW002();
HGCW002.fromMap(resultRows.get(i)); HGCW002.fromMap(resultRows.get(0));
if (HGCW002.getId() == null || HGCW002.getId() == 0) { if (HGCW002.getId() == null || HGCW002.getId() == 0) {
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
String contractNumber =userVO.getUsercode() +
HGCW002.getContractType() +
SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_CONTRACT_NO);
HGCW002.setCompanyCode(userVO.getUsercode());
HGCW002.setCompanyName(userVO.getUsername());
HGCW002.setContractNumber(contractNumber);
HGCW002.setReviewStatus(0);
HGCW002.setBalanceStatus(1);
HGCW002.setPlanStartDate(DateUtils.formatShort(HGCW002.getPlanStartDate()));
HGCW002.setPlanEndDate(DateUtils.formatShort(HGCW002.getPlanEndDate()));
HGCW002.setSigningDate(DateUtils.formatShort(HGCW002.getSigningDate()));
this.add(HGCW002); this.add(HGCW002);
// 写入其他数据
HGCWTools.HgCw003.save(detail1Rows,contractNumber,userVO);
HGCWTools.HgCw999.batchUpdate(detail2Rows,HGCW002.getId());
} else { } else {
this.modify(HGCW002); this.modify(HGCW002);
} }
......
...@@ -39,8 +39,8 @@ public class ServiceHGCW002A extends ServiceBase { ...@@ -39,8 +39,8 @@ public class ServiceHGCW002A extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJECT_CODE_BOX_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJECT_CODE_BOX_BLOCK_ID), null, false);
inInfo.addBlock("result1").addBlockMeta(new HGCW002().eiMetadata); inInfo.addBlock("detail1").addBlockMeta(new HGCW002().eiMetadata);
inInfo.addBlock("result2").addBlockMeta(new HGCW002().eiMetadata); inInfo.addBlock("detail2").addBlockMeta(new HGCW002().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
......
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import org.apache.commons.collections.CollectionUtils;
import java.util.*;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW002B extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "修改合同",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
String id = inInfo.getString("id");
HGCW002 HGCW002 = HGCWTools.HgCw002.getId(id);
inInfo.addBlock(EiConstant.resultBlock).addRow(HGCW002);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJECT_CODE_BOX_BLOCK_ID),
new HashMap<String,Object>(){
{put("projCode",HGCW002.getProjCode());}
}, false);
//获取清单
List<HGCW003> hgcw003List = HGCWTools.HgCw003.queryByContractNumber(HGCW002.getContractNumber());
inInfo.addBlock("detail1").addRows(hgcw003List);
List<HGCW999> hgcw999List = HGCWTools.HgCw999.queryByBiz(HGCW002.getId(),"HT");
inInfo.addBlock("detail2").addRows(hgcw999List);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
/**
*
*/
public class ServiceHGCW099 extends ServiceBase {
/**
* 画面初始化.
*/
@OperationLogAnnotation(operModul = "附件上传",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
/**
* 附件上传.
*/
@OperationLogAnnotation(operModul = "附件上传",operType = "上传",operDesc = "附件上传")
public EiInfo form(EiInfo inInfo) {
return inInfo;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.ds.domain.HGDS002;
import com.baosight.hggp.util.FileUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ProjectInfo;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.service.soa.XServiceManager;
import org.apache.commons.collections.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHGCW999 extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "物料清单-附件清单A-初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW999().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "物料清单-附件清单A-查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
inInfo = super.query(inInfo, "HGCW999.queryRun", new HGCW999());
} else {
inInfo = super.query(inInfo, "HGCW999.queryDev", new HGCW999());
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
public EiInfo queryDoc(EiInfo inInfo) {
try {
String docId = inInfo.getString("docId");
HGCW999 HGCW999 = new HGCW999();
List<HGCW999> list = new ArrayList<>();
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
list = this.dao.query("HGCW999.queryRun",map);
} else {
list = this.dao.query("HGCW999.queryDev",map);
}
if (CollectionUtils.isNotEmpty(list)) {
HGCW999 = list.get(0);
inInfo.set("data",HGCW999);
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "新增",operDesc = "物料清单-附件清单A-新增操作")
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGCW999 fSc002A = new HGCW999();
fSc002A.fromMap(resultRows.get(i));
DaoUtils.insert(HGCW999.INSERT, fSc002A);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "删除",operDesc = "物料清单-附件清单A-删除操作")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGCW999 fSc002A = new HGCW999();
fSc002A.fromMap(resultRows.get(i));
DaoUtils.update(HGCW999.DELETE, fSc002A);
// if (!fSc002A.getDocId().isEmpty()) {
// this.delectDoc(fSc002A.getDocId());
// }
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 删除文件
* @param docId 文件ID
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "删除",operDesc = "删除附件文件")
public void delectDoc(String docId){
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
List<HGDS002> list = this.dao.query(HGDS002.QUERY,map);
if (list.size() > 0) {
String realPath = list.get(0).getRealPath();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HGCW999.FIELD_DOC_ID,list.get(0).getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo();
eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口
EiInfo outInfo = XServiceManager.call(eiInfo);
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败");
}
}
}else {
FileUtils.deleteFile(realPath);
}
this.dao.delete(HGDS002.DELETE,map);
}
}
}
...@@ -23,27 +23,8 @@ ...@@ -23,27 +23,8 @@
--> -->
<sqlMap namespace="HGCW001"> <sqlMap namespace="HGCW001">
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
......
...@@ -47,27 +47,9 @@ ...@@ -47,27 +47,9 @@
--> -->
<sqlMap namespace="HGCW002"> <sqlMap namespace="HGCW002">
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -417,6 +399,9 @@ ...@@ -417,6 +399,9 @@
DEP_CODE <!-- 部门编码 --> DEP_CODE <!-- 部门编码 -->
) )
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #contractNumber#, #contractName#, #contractType#, #contractCategory#, #partyA#, #partyB#, #partyC#, #planStartDate#, #planEndDate#, #contractStatus#, #partyAName#, #partyAPhoneNumber#, #alreadyName#, #alreadyPhoneNumber#, #engineeringAddress#, #signingDate#, #mainContractNumber#, #contractContent#, #contractingMethod#, #paymentMethod#, #pricingMethod#, #taxPoints#, #totalContractPriceExcluding#, #valueAddedTax#, #totalContractPriceIncluding#, #reviewStatus#, #balanceStatus#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#) VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #contractNumber#, #contractName#, #contractType#, #contractCategory#, #partyA#, #partyB#, #partyC#, #planStartDate#, #planEndDate#, #contractStatus#, #partyAName#, #partyAPhoneNumber#, #alreadyName#, #alreadyPhoneNumber#, #engineeringAddress#, #signingDate#, #mainContractNumber#, #contractContent#, #contractingMethod#, #paymentMethod#, #pricingMethod#, #taxPoints#, #totalContractPriceExcluding#, #valueAddedTax#, #totalContractPriceIncluding#, #reviewStatus#, #balanceStatus#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW002
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -28,27 +28,9 @@ ...@@ -28,27 +28,9 @@
--> -->
<sqlMap namespace="HGCW003"> <sqlMap namespace="HGCW003">
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
......
...@@ -21,6 +21,33 @@ ...@@ -21,6 +21,33 @@
--> -->
<sqlMap namespace="HGCW999"> <sqlMap namespace="HGCW999">
<sql id="column">
A.ID as "id", <!-- 主键ID -->
A.ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
A.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
A.COMPANY_NAME as "companyName", <!-- 公司名称 -->
A.DEP_CODE as "depCode", <!-- 部门编码 预留 -->
A.MAT_ID as "matId", <!-- 物料ID -->
A.DOC_ID as "docId", <!-- 文件ID -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
A.BIZ_TYPE as "bizType" <!-- 业务类型 -->
</sql>
<sql id="columnDev">
<include refid="column"/>,
B.DOC_NAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="columnRun">
<include refid="column"/>,
B.RES_CNAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="condition"> <sql id="condition">
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
...@@ -66,85 +93,77 @@ ...@@ -66,85 +93,77 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <!-- 开发环境 -->
resultClass="com.baosight.hggp.hg.cw.domain.HGCW999"> <sql id="conditionDev">
SELECT AND A.DOC_ID = B.DOC_ID
ID as "id", <!-- 主键ID --> <include refid="condition"/>
ACCOUNT_CODE as "accountCode", <!-- 企业编码 --> <isNotEmpty prepend=" AND " property="docName">
COMPANY_CODE as "companyCode", <!-- 公司编码 --> B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
COMPANY_NAME as "companyName", <!-- 公司名称 --> </isNotEmpty>
DEP_CODE as "depCode", <!-- 部门编码 预留 --> </sql>
MAT_ID as "matId", <!-- 物料ID -->
DOC_ID as "docId", <!-- 文件ID --> <!-- 正式环境 -->
CREATED_BY as "createdBy", <!-- 创建人 --> <sql id="conditionRun">
CREATED_NAME as "createdName", <!-- 创建人名称 --> AND A.DOC_ID = B.RES_ID
CREATED_TIME as "createdTime", <!-- 创建时间 --> <include refid="condition"/>
UPDATED_BY as "updatedBy", <!-- 修改人 --> <isNotEmpty prepend=" AND " property="docName">
UPDATED_NAME as "updatedName", <!-- 修改人名称 --> B.RES_CNAME LIKE CONCAT('%', #docName#, '%')
UPDATED_TIME as "updatedTime", <!-- 修改时间 --> </isNotEmpty>
BIZ_TYPE as "bizType" <!-- 业务类型 --> </sql>
FROM ${hggpSchema}.HGCW999 WHERE 1=1
<include refid="condition" /> <sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="order">
$orderBy$ $order$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="order">
ID asc A.ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql>
<select id="queryDev" resultClass="com.baosight.hggp.hg.cw.domain.HGCW999">
SELECT
<include refid="columnDev"/>
FROM ${hggpSchema}.HGCW999 A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
<include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="countDev" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW999 WHERE 1=1 SELECT COUNT(*) FROM ${hggpSchema}.HGCW999 A, ${platSchema}.TEUDM02 B
<include refid="condition" /> WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
</select> </select>
<!-- <select id="queryRun" resultClass="com.baosight.hggp.hg.cw.domain.HGCW999">
<isNotEmpty prepend=" AND " property="id"> SELECT
ID = #id# <include refid="columnRun"/>
</isNotEmpty> FROM ${hggpSchema}.HGCW999 A, ${platSchema}.TEUDM05 B
<isNotEmpty prepend=" AND " property="accountCode"> WHERE 1=1
ACCOUNT_CODE = #accountCode# <include refid="conditionRun"/>
</isNotEmpty> <include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="companyCode"> <include refid="order"/>
COMPANY_CODE = #companyCode# </select>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName"> <select id="countRun" resultClass="int">
COMPANY_NAME = #companyName# SELECT COUNT(*) FROM ${hggpSchema}.HGCW999 A, ${platSchema}.TEUDM05 B
</isNotEmpty> WHERE 1=1
<isNotEmpty prepend=" AND " property="depCode"> <include refid="conditionRun"/>
DEP_CODE = #depCode# <include refid="customCondition"/>
</isNotEmpty> </select>
<isNotEmpty prepend=" AND " property="matId">
MAT_ID = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType">
BIZ_TYPE = #bizType#
</isNotEmpty>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGCW999 (ID, <!-- 主键ID --> INSERT INTO ${hggpSchema}.HGCW999 (ID, <!-- 主键ID -->
...@@ -189,5 +208,14 @@ ...@@ -189,5 +208,14 @@
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
<update id="batchUpdate">
UPDATE ${hggpSchema}.HGCW999
SET
MAT_ID = #matId#, <!-- 物料ID -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
WHERE
DOC_ID IN <iterate close=")" open="(" conjunction="," property="docIds">#docIds[]#</iterate>
</update>
</sqlMap> </sqlMap>
package com.baosight.hggp.hg.cw.tools;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sc.domain.HGSC001A;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.iplat4j.core.ProjectInfo;
import org.apache.commons.collections.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class HGCWTools {
public static class HgCw002 {
public static UserVO getUserCompany() {
UserVO userVO = new UserVO();
List<Org> orgList = HGXSTools.XsOrg.queryByUser();
if (CollectionUtils.isNotEmpty(orgList)) {
Org org = orgList.get(0);
if (!org.getOrgType().equals("company")) {
//如果不是公司公司,则找到上一级
Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId());
userVO.setUsercode(org1.getOrgId());
userVO.setUsername(org1.getOrgCname());
} else {
userVO.setUsercode(org.getOrgId());
userVO.setUsername(org.getOrgCname());
}
}
return userVO;
}
public static HGCW002 getId(String id) {
AssertUtils.isNull(id, "合同ID不能为空!");
List<HGCW002> results = DaoBase.getInstance().query(HGCW002.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
}
public static class HgCw003{
public static void save(List<Map> rows, String contractNumber, UserVO userVO) {
AssertUtils.isNull(contractNumber, "合同号不能为空!");
rows.forEach(row -> {
HGCW003 HGCW003 = new HGCW003();
HGCW003.fromMap(row);
HGCW003.setCompanyCode(userVO.getUsercode());
HGCW003.setCompanyName(userVO.getUsername());
HGCW003.setContractNumber(contractNumber);
DaoUtils.insert(HGCW003.INSERT, HGCW003);
});
}
/**
* 根据合同号获取合同清单
* @param contractNumber
* @return
*/
public static List<HGCW003> queryByContractNumber(String contractNumber) {
AssertUtils.isNull(contractNumber, "合同号不能为空!");
List<HGCW003> results = DaoBase.getInstance().query(HGCW003.QUERY,new HashMap<String,Object>(){
{put("contractNumber",contractNumber);}
});
return results;
}
}
public static class HgCw999 {
public static void batchUpdate(List<Map> rows, Long id) {
AssertUtils.isNull(id, "业务ID不能为空!");
String[] docIds = rows.stream().map(row -> row.get("docId").toString()).toArray(String[]::new);
DaoUtils.update("HGCW999.batchUpdate", new HashMap<String,Object>(){
{put("docIds",docIds);}
{put("matId",id);}
});
}
public static List<HGCW999> queryByBiz(Long matId, String bizType) {
AssertUtils.isNull(matId, "业务ID不能为空!");
AssertUtils.isNull(bizType, "业务类型不能为空!");
List<HGCW999> results = new ArrayList<>();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
results = DaoBase.getInstance().query("HGCW999.queryRun",new HashMap<String,Object>(){
{put("matId",matId);}
{put("bizType",bizType);}
});
} else {
results = DaoBase.getInstance().query("HGCW999.queryDev",new HashMap<String,Object>(){
{put("matId",matId);}
{put("bizType",bizType);}
});
}
return results;
}
}
}
...@@ -25,4 +25,9 @@ ...@@ -25,4 +25,9 @@
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC001A.xml"/> <sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC001A.xml"/>
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC002.xml"/> <sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC002.xml"/>
<!-- 財務 -->
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW001.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW002.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW003.xml"/>
</sqlMapConfig> </sqlMapConfig>
...@@ -51,4 +51,4 @@ ...@@ -51,4 +51,4 @@
<script> <script>
var ctx = "${ctx}"; var ctx = "${ctx}";
</script> </script>
<script src="${ctx}/HP/PZ/HGCW001.js"></script> <script src="${ctx}/HG/CW/HGCW001.js"></script>
\ No newline at end of file \ No newline at end of file
$(function() { $(function() {
// 查询 // 查询
...@@ -11,7 +12,16 @@ $(function() { ...@@ -11,7 +12,16 @@ $(function() {
pageSize: 20, pageSize: 20,
pageSizes: [10,20,30,50,100,200], pageSizes: [10,20,30,50,100,200],
}, },
columns: [ columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + contractDetailFunc(item.id) + '" target="_blank">合同详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + fileDetailFunc(item.id) + '" target="_blank">附件详情</a>';
return template;
}
}
], ],
loadComplete: function (e) { loadComplete: function (e) {
$("#BTN_INSERT").on("click",addFunc); $("#BTN_INSERT").on("click",addFunc);
...@@ -69,7 +79,18 @@ function addFunc() { ...@@ -69,7 +79,18 @@ function addFunc() {
* 修改 * 修改
*/ */
function updateFunc() { function updateFunc() {
console.log("修改"); let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
JSColorbox.open({
href: "HGCW002B?methodName=initLoad&id=" + rows[0].id + "&efParentFormEname=HGCW002",
title: "<div style='text-align: center;'>修改合同</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
} }
/** /**
* 删除 * 删除
...@@ -105,4 +126,11 @@ function windowCallback() { ...@@ -105,4 +126,11 @@ function windowCallback() {
JSColorbox.close(); JSColorbox.close();
} }
function contractDetailFunc(id) {
return "";
}
function fileDetailFunc(id) {
return "";
}
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="200" align="center"/>
<EF:EFColumn ename="companyName" cname="所属公司" align="center" enable="false"/> <EF:EFColumn ename="companyName" cname="所属公司" align="center" enable="false"/>
<EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/> <EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/>
<EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/> <EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/>
...@@ -90,4 +90,4 @@ ...@@ -90,4 +90,4 @@
<script> <script>
var ctx = "${ctx}"; var ctx = "${ctx}";
</script> </script>
<script src="${ctx}/HP/PZ/HGCW002.js"></script> <script src="${ctx}/HG/CW/HGCW002.js"></script>
\ No newline at end of file \ No newline at end of file
...@@ -14,20 +14,20 @@ ...@@ -14,20 +14,20 @@
<EF:EFOptions <EF:EFOptions
blockId="projectCodeBox_block_id" valueField="valueField" textField="textField"/> blockId="projectCodeBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput ename="detail-0-projCode" cname="项目编号" type="hidden"/> <EF:EFInput ename="result-0-projCode" cname="项目编号" type="hidden"/>
<EF:EFInput ename="detail-0-projName" cname="项目简称" colWidth="4" readonly="true"/> <EF:EFInput ename="result-0-projName" cname="项目简称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-contractNumber" cname="合同号" colWidth="4" readonly="true" /> <EF:EFInput ename="result-0-contractNumber" cname="合同号" colWidth="4" readonly="true" />
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-contractName" cname="合同名称" colWidth="4" required="true"/> <EF:EFInput ename="result-0-contractName" cname="合同名称" colWidth="4" required="true"/>
<EF:EFSelect cname="合同类型" ename="detail-0-contractType" colWidth="4" filter="contains" required="true"> <EF:EFSelect cname="合同类型" ename="result-0-contractType" colWidth="4" filter="contains" required="true">
<EF:EFOption label="-- 请选择 --" value=""/> <EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.contractType"/> <EF:EFCodeOption codeName="hggp.cw.contractType"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput ename="detail-0-contractCategory" cname="合同类别" type="hidden"/> <EF:EFInput ename="result-0-contractCategory" cname="合同类别" type="hidden"/>
<EF:EFInput ename="contractCategoryName" cname="合同类别" colWidth="4" readonly="true"/> <EF:EFInput ename="contractCategoryName" cname="合同类别" colWidth="4" readonly="true"/>
<%-- <EF:EFSelect cname="合同类别" ename="detail-0-contractCategory" colWidth="4" filter="contains" readonly="true" required="true">--%> <%-- <EF:EFSelect cname="合同类别" ename="result-0-contractCategory" colWidth="4" filter="contains" readonly="true" required="true">--%>
<%-- <EF:EFOption label="-- 请选择 --" value=""/>--%> <%-- <EF:EFOption label="-- 请选择 --" value=""/>--%>
<%-- <EF:EFCodeOption codeName="hggp.cw.contractCategory"/>--%> <%-- <EF:EFCodeOption codeName="hggp.cw.contractCategory"/>--%>
<%-- </EF:EFSelect>--%> <%-- </EF:EFSelect>--%>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
readonly="true" readonly="true"
resizable="true" popupTitle="甲方名称" popupWidth="400"> resizable="true" popupTitle="甲方名称" popupWidth="400">
</EF:EFPopupInput> </EF:EFPopupInput>
<EF:EFInput ename="detail-0-partyA" cname="甲方名称" type="hidden" /> <EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" />
<EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="4" <EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="4"
serviceName="HGCW002A" methodName="partyBQuery" serviceName="HGCW002A" methodName="partyBQuery"
resultId="partyAResult" resultId="partyAResult"
...@@ -54,63 +54,63 @@ ...@@ -54,63 +54,63 @@
readonly="true" readonly="true"
resizable="true" popupTitle="乙方名称" popupWidth="400"> resizable="true" popupTitle="乙方名称" popupWidth="400">
</EF:EFPopupInput> </EF:EFPopupInput>
<EF:EFInput ename="detail-0-partyB" cname="乙方名称" type="hidden"/> <EF:EFInput ename="result-0-partyB" cname="乙方名称" type="hidden"/>
<EF:EFInput ename="detail-0-partyC" cname="丙方" colWidth="4" /> <EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="4" />
</div> </div>
<div class="row"> <div class="row">
<EF:EFDateSpan startCname="计划开工/竣工日期" endCname="至" required="true" colWidth="8" blockId="detail" <EF:EFDateSpan startCname="计划开工/竣工日期" endCname="至" required="true" colWidth="8" blockId="result"
startName="planStartDate" endName="planEndDate" row="0" role="date" startName="planStartDate" endName="planEndDate" row="0" role="date"
format="yyyy-MM-dd" ratio="4:4" satrtRatio="4:8" endRatio="4:8"> format="yyyy-MM-dd" ratio="4:4" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan> </EF:EFDateSpan>
<EF:EFSelect cname="合同状态" ename="detail-0-contractStatus" colWidth="4" filter="contains"> <EF:EFSelect cname="合同状态" ename="result-0-contractStatus" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/> <EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.contractStatus"/> <EF:EFCodeOption codeName="hggp.cw.contractStatus"/>
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-partyAName" cname="甲方联系人姓名" colWidth="4" /> <EF:EFInput ename="result-0-partyAName" cname="甲方联系人姓名" colWidth="4" />
<EF:EFInput ename="detail-0-partyAPhoneNumber" cname="甲方联系人电话" colWidth="4" /> <EF:EFInput ename="result-0-partyAPhoneNumber" cname="甲方联系人电话" colWidth="4" />
<EF:EFInput ename="detail-0-alreadyName" cname="已方联系人姓名" colWidth="4" /> <EF:EFInput ename="result-0-alreadyName" cname="已方联系人姓名" colWidth="4" />
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-alreadyPhoneNumber" cname="已方联系人电话" colWidth="4" /> <EF:EFInput ename="result-0-alreadyPhoneNumber" cname="已方联系人电话" colWidth="4" />
<EF:EFInput ename="detail-0-engineeringAddress" cname="工程地址" colWidth="8" ratio="2:10" required="true"/> <EF:EFInput ename="result-0-engineeringAddress" cname="工程地址" colWidth="8" ratio="2:10" required="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFDatePicker cname="会计期" ename="detail-0-signingDate" row="0" colWidth="4" <EF:EFDatePicker cname="签约日期" ename="result-0-signingDate" colWidth="4"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFInput ename="detail-0-mainContractNumber" cname="主合同号" colWidth="8" ratio="2:10"/> <EF:EFInput ename="result-0-mainContractNumber" cname="主合同号" colWidth="8" ratio="2:10"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput type="textarea" row="6" ename="detail-0-contractContent" cname="合同内容" colWidth="8" ratio="2:10" required="true"/> <EF:EFInput type="textarea" ename="result-0-contractContent" cname="合同内容" colWidth="8" ratio="2:10" required="true"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="inqu2" title="承包方式及合同价款"> <EF:EFRegion id="inqu2" title="承包方式及合同价款">
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-contractingMethod" cname="承包方式" colWidth="4" /> <EF:EFInput ename="result-0-contractingMethod" cname="承包方式" colWidth="4" />
<EF:EFSelect cname="付款方式" ename="detail-0-paymentMethod" colWidth="4" filter="contains"> <EF:EFSelect cname="付款方式" ename="result-0-paymentMethod" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/> <EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.paymentMethod"/> <EF:EFCodeOption codeName="hggp.cw.paymentMethod"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="计价方式" ename="detail-0-pricingMethod" colWidth="4" filter="contains"> <EF:EFSelect cname="计价方式" ename="result-0-pricingMethod" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/> <EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.pricingMethod"/> <EF:EFCodeOption codeName="hggp.cw.pricingMethod"/>
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFSelect cname="税点" ename="detail-0-taxPoints" colWidth="4" filter="contains"> <EF:EFSelect cname="税点" ename="result-0-taxPoints" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/> <EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.taxPoints"/> <EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput ename="detail-0-totalContractPriceExcluding" cname="合同总价(不含税)" colWidth="4" readonly="true"/> <EF:EFInput ename="result-0-totalContractPriceExcluding" cname="合同总价(不含税)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-valueAddedTax" cname="增值税" colWidth="4" readonly="true"/> <EF:EFInput ename="result-0-valueAddedTax" cname="增值税" colWidth="4" readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-totalContractPriceIncluding" cname="合同总价(含税)" colWidth="4" readonly="true"/> <EF:EFInput ename="result-0-totalContractPriceIncluding" cname="合同总价(含税)" colWidth="4" readonly="true"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result1" title="合同清单"> <EF:EFRegion id="detail1" title="合同清单">
<EF:EFGrid blockId="result1" autoDraw="override" checkMode="row" isFloat="true"> <EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/> <EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="inventory" cname="清单" align="center" /> <EF:EFColumn ename="inventory" cname="清单" align="center" />
...@@ -124,8 +124,9 @@ ...@@ -124,8 +124,9 @@
<EF:EFColumn ename="laborCosts" cname="其中人工费、元" format="{0:N3}" align="center"/> <EF:EFColumn ename="laborCosts" cname="其中人工费、元" format="{0:N3}" align="center"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result2" title="附件信息"> <EF:EFRegion id="detail2" title="附件信息">
<EF:EFGrid blockId="result2" autoDraw="override" checkMode="row" isFloat="true"> <EF:EFGrid blockId="detail2" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="id" cname="ID" hidden="true"/> <EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/> <EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/> <EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
...@@ -143,4 +144,4 @@ ...@@ -143,4 +144,4 @@
<script> <script>
var ctx = "${ctx}"; var ctx = "${ctx}";
</script> </script>
<script src="${ctx}/HP/PZ/HGCW002A.js"></script> <script src="${ctx}/HG/CW/HGCW002A.js"></script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="修改合同">
<EF:EFRegion id="inqu1" title="基本信息">
<div class="row">
<EF:EFSelect cname="项目编号" ename="projCodeBox" colWidth="4" required="true" filter="contains">
<EF:EFOption label="-- 请选择 --" value="" />
<EF:EFOptions
blockId="projectCodeBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-projCode" cname="项目编号" type="hidden"/>
<EF:EFInput ename="result-0-projName" cname="项目简称" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-contractNumber" cname="合同号" colWidth="4" readonly="true" />
</div>
<div class="row">
<EF:EFInput ename="result-0-contractName" cname="合同名称" colWidth="4" required="true"/>
<EF:EFSelect cname="合同类型" ename="result-0-contractType" colWidth="4" filter="contains" required="true">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.contractType"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-contractCategory" cname="合同类别" type="hidden"/>
<EF:EFInput ename="contractCategoryName" cname="合同类别" colWidth="4" readonly="true"/>
<%-- <EF:EFSelect cname="合同类别" ename="result-0-contractCategory" colWidth="4" filter="contains" readonly="true" required="true">--%>
<%-- <EF:EFOption label="-- 请选择 --" value=""/>--%>
<%-- <EF:EFCodeOption codeName="hggp.cw.contractCategory"/>--%>
<%-- </EF:EFSelect>--%>
</div>
<div class="row">
<EF:EFPopupInput ename="popupInputPartyA" cname="甲方名称" colWidth="4"
serviceName="HGCW002A" methodName="partyAQuery"
resultId="partyAResult"
required="true" save="false" popupType="ServiceGrid"
valueField="username" textField="username"
columnEnames="username,usercode"
columnCnames="名称,编码"
readonly="true"
resizable="true" popupTitle="甲方名称" popupWidth="400">
</EF:EFPopupInput>
<EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" />
<EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="4"
serviceName="HGCW002A" methodName="partyBQuery"
resultId="partyAResult"
save="false" popupType="ServiceGrid"
valueField="username" textField="username"
columnEnames="username,usercode"
columnCnames="名称,编码"
readonly="true"
resizable="true" popupTitle="乙方名称" popupWidth="400">
</EF:EFPopupInput>
<EF:EFInput ename="result-0-partyB" cname="乙方名称" type="hidden"/>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="4" />
</div>
<div class="row">
<EF:EFDateSpan startCname="计划开工/竣工日期" endCname="至" required="true" colWidth="8" blockId="result"
startName="planStartDate" endName="planEndDate" row="0" role="date"
format="yyyy-MM-dd" ratio="4:4" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
<EF:EFSelect cname="合同状态" ename="result-0-contractStatus" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.contractStatus"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput ename="result-0-partyAName" cname="甲方联系人姓名" colWidth="4" />
<EF:EFInput ename="result-0-partyAPhoneNumber" cname="甲方联系人电话" colWidth="4" />
<EF:EFInput ename="result-0-alreadyName" cname="已方联系人姓名" colWidth="4" />
</div>
<div class="row">
<EF:EFInput ename="result-0-alreadyPhoneNumber" cname="已方联系人电话" colWidth="4" />
<EF:EFInput ename="result-0-engineeringAddress" cname="工程地址" colWidth="8" ratio="2:10" required="true"/>
</div>
<div class="row">
<EF:EFDatePicker cname="签约日期" ename="result-0-signingDate" colWidth="4"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFInput ename="result-0-mainContractNumber" cname="主合同号" colWidth="8" ratio="2:10"/>
</div>
<div class="row">
<EF:EFInput type="textarea" ename="result-0-contractContent" cname="合同内容" colWidth="8" ratio="2:10" required="true"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="inqu2" title="承包方式及合同价款">
<div class="row">
<EF:EFInput ename="result-0-contractingMethod" cname="承包方式" colWidth="4" />
<EF:EFSelect cname="付款方式" ename="result-0-paymentMethod" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.paymentMethod"/>
</EF:EFSelect>
<EF:EFSelect cname="计价方式" ename="result-0-pricingMethod" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.pricingMethod"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect cname="税点" ename="result-0-taxPoints" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-totalContractPriceExcluding" cname="合同总价(不含税)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-valueAddedTax" cname="增值税" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-totalContractPriceIncluding" cname="合同总价(含税)" colWidth="4" readonly="true"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="detail1" title="合同清单">
<EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="inventory" cname="清单" align="center" />
<EF:EFColumn ename="unit" cname="单位" align="center" />
<EF:EFColumn ename="provisionalQuantity" cname="暂定工程量" format="{0:N3}" align="center"/>
<EF:EFColumn ename="measurementMethod" cname="计量方式" align="center" />
<EF:EFColumn ename="supplyMethod" cname="材料供应方式" align="center"/>
<EF:EFColumn ename="unitPriceExcludingTax" cname="除税单价/元" format="{0:N3}" align="center"/>
<EF:EFColumn ename="totalPriceExcluding" cname="不含税总价" enable="false" format="{0:N3}" align="center"/>
<EF:EFColumn ename="totalPriceIncluding" cname="含税总价" enable="false" format="{0:N3}" align="center"/>
<EF:EFColumn ename="laborCosts" cname="其中人工费、元" format="{0:N3}" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="detail2" title="附件信息">
<EF:EFGrid blockId="detail2" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW002B.js"></script>
\ No newline at end of file
...@@ -34,7 +34,7 @@ $(function () { ...@@ -34,7 +34,7 @@ $(function () {
result.set("result-0-realPath",docUrl); result.set("result-0-realPath",docUrl);
result.set("result-0-bizType",$("#inqu_status-0-bizType").val()); result.set("result-0-bizType",$("#inqu_status-0-bizType").val());
result.set("result-0-matId",$("#inqu_status-0-matId").val()); result.set("result-0-matId",$("#inqu_status-0-matId").val());
EiCommunicator.send("HPDS002", "insert", result, { EiCommunicator.send("HGDS002", "insert", result, {
onSuccess: function (ei) { onSuccess: function (ei) {
if (ei.getStatus() >= 0) { if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) { if (ei.getStatus() == 0) {
......
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