Commit 6873f453 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

 Conflicts:
	src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
	src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD099.java
parents e1bfde27 54e4fbac
...@@ -20,6 +20,8 @@ public class HgScSqlConstant { ...@@ -20,6 +20,8 @@ public class HgScSqlConstant {
public static final String UPDATE_FOR_DC = "HGSC001.updateForDc"; public static final String UPDATE_FOR_DC = "HGSC001.updateForDc";
// 修改项目名称 // 修改项目名称
public static final String UPDATE_PROJ_NAME = "HGSC001.updateProjName"; public static final String UPDATE_PROJ_NAME = "HGSC001.updateProjName";
// 修改审批状态
public static final String UPDATE_APPROVAL_STATUS = "HGSC001.updateApprovalStatus";
// 批量删除 // 批量删除
public static final String BATCH_DELETE = "HGSC001.batch_delete"; public static final String BATCH_DELETE = "HGSC001.batch_delete";
// 批量完成 // 批量完成
......
...@@ -8,6 +8,7 @@ import com.baosight.hggp.core.extapp.decheng.model.DcContractList; ...@@ -8,6 +8,7 @@ import com.baosight.hggp.core.extapp.decheng.model.DcContractList;
import com.baosight.hggp.core.model.Pager; import com.baosight.hggp.core.model.Pager;
import com.baosight.hggp.core.tools.CodeValueTools; import com.baosight.hggp.core.tools.CodeValueTools;
import com.baosight.hggp.core.utils.ThreadUtils; import com.baosight.hggp.core.utils.ThreadUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ009; import com.baosight.hggp.hg.pz.domain.HGPZ009;
import com.baosight.hggp.hg.pz.tools.HGPZTools; import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.constant.HgScSqlConstant; import com.baosight.hggp.hg.sc.constant.HgScSqlConstant;
...@@ -170,7 +171,7 @@ public class ServiceHGSC101 extends ServiceEPBase { ...@@ -170,7 +171,7 @@ public class ServiceHGSC101 extends ServiceEPBase {
private void syncDcContractSingle(HGPZ009 dbPz009, DcContractList dcContractList) throws IOException { private void syncDcContractSingle(HGPZ009 dbPz009, DcContractList dcContractList) throws IOException {
// 获取合同详情 // 获取合同详情
DcContract dcContract = DcOpenApi.contractDetail(dcContractList.getOrd()); DcContract dcContract = DcOpenApi.contractDetail(dcContractList.getOrd());
if (dcContract == null || !"审批通过".equals(dcContract.getSpStatus())) { if (dcContract == null) {
return; return;
} }
dcContract.setOrd(dcContractList.getOrd()); dcContract.setOrd(dcContractList.getOrd());
...@@ -178,9 +179,17 @@ public class ServiceHGSC101 extends ServiceEPBase { ...@@ -178,9 +179,17 @@ public class ServiceHGSC101 extends ServiceEPBase {
String projCode = dbPz009.getLoginPrefix() + dcContractList.getOrd(); String projCode = dbPz009.getLoginPrefix() + dcContractList.getOrd();
HGSC001 dbSc001 = HGSCTools.Hgsc001.getByCode(projCode); HGSC001 dbSc001 = HGSCTools.Hgsc001.getByCode(projCode);
if (dbSc001 == null) { if (dbSc001 == null) {
// 不存在,并且是"审批通过"就新增;否则不做任何操作
if ("审批通过".equals(dcContract.getSpStatus())) {
this.syncDcSingleContractAdd(projCode, dcContract, dbPz009); this.syncDcSingleContractAdd(projCode, dcContract, dbPz009);
}
} else { } else {
// 存在,并且是"审批通过"就修改,否则状态修改为删除
if ("审批通过".equals(dcContract.getSpStatus())) {
this.syncDcSingleContractModify(projCode, dcContract); this.syncDcSingleContractModify(projCode, dcContract);
} else {
this.syncDcSingleContractRemove(projCode);
}
} }
} }
...@@ -198,6 +207,7 @@ public class ServiceHGSC101 extends ServiceEPBase { ...@@ -198,6 +207,7 @@ public class ServiceHGSC101 extends ServiceEPBase {
dbSc001.setDepName(dbPz009.getAccountName()); dbSc001.setDepName(dbPz009.getAccountName());
dbSc001.setProjCode(projCode); dbSc001.setProjCode(projCode);
dbSc001.setProjName(dcContract.getTitle()); dbSc001.setProjName(dcContract.getTitle());
dbSc001.setApprovalStatus(HGConstant.ApprovalStatus.YS);
// 设计来源 // 设计来源
dbSc001.setProjectSource(getProjectSource(dcContract.getDesignSource())); dbSc001.setProjectSource(getProjectSource(dcContract.getDesignSource()));
dbSc001.setContractNo(dcContract.getHtid()); dbSc001.setContractNo(dcContract.getHtid());
...@@ -222,12 +232,25 @@ public class ServiceHGSC101 extends ServiceEPBase { ...@@ -222,12 +232,25 @@ public class ServiceHGSC101 extends ServiceEPBase {
updateMap.put(HGSC001.FIELD_contract_no, dcContract.getHtid()); updateMap.put(HGSC001.FIELD_contract_no, dcContract.getHtid());
updateMap.put(HGSC001.FIELD_proj_name, dcContract.getTitle()); updateMap.put(HGSC001.FIELD_proj_name, dcContract.getTitle());
updateMap.put(HGSC001.FIELD_project_source, getProjectSource(dcContract.getDesignSource())); updateMap.put(HGSC001.FIELD_project_source, getProjectSource(dcContract.getDesignSource()));
updateMap.put(HGSC001.FIELD_approval_status, HGConstant.ApprovalStatus.YS);
DaoUtils.update(HgScSqlConstant.HgSc001.UPDATE_PROJ_NAME, updateMap); DaoUtils.update(HgScSqlConstant.HgSc001.UPDATE_PROJ_NAME, updateMap);
// 同步更新文档库 // 同步更新文档库
DaoUtils.update(HgWdSqlConstant.HgWd001.UPDATE_PROJECT, updateMap); DaoUtils.update(HgWdSqlConstant.HgWd001.UPDATE_PROJECT, updateMap);
} }
/** /**
* 删除
*
* @param projCode
*/
private void syncDcSingleContractRemove(String projCode) {
Map updateMap = new HashMap();
updateMap.put(HGSC001.FIELD_proj_code, projCode);
updateMap.put(HGSC001.FIELD_approval_status, HGConstant.ApprovalStatus.DS);
DaoUtils.update(HgScSqlConstant.HgSc001.UPDATE_APPROVAL_STATUS, updateMap);
}
/**
* 设计来源 * 设计来源
* *
* @return * @return
......
...@@ -7,7 +7,6 @@ import com.baosight.hggp.hg.sc.constant.HgScSqlConstant; ...@@ -7,7 +7,6 @@ import com.baosight.hggp.hg.sc.constant.HgScSqlConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.wd.constant.HgWdSqlConstant; import com.baosight.hggp.hg.wd.constant.HgWdSqlConstant;
import com.baosight.hggp.hg.wd.tools.HGWDTools;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
...@@ -91,6 +90,7 @@ public class ServiceHGSC101A extends ServiceEPBase { ...@@ -91,6 +90,7 @@ public class ServiceHGSC101A extends ServiceEPBase {
private void addData(HGSC001 fSc001) { private void addData(HGSC001 fSc001) {
// 校验编号是否存在 // 校验编号是否存在
fSc001.setProjCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PROJ_NUMBER)); fSc001.setProjCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PROJ_NUMBER));
fSc001.setApprovalStatus(HGConstant.ApprovalStatus.YS);
DaoUtils.insert(HGSC001.INSERT, fSc001); DaoUtils.insert(HGSC001.INSERT, fSc001);
} }
......
...@@ -427,6 +427,16 @@ ...@@ -427,6 +427,16 @@
CONTRACT_NO = #contractNo#, CONTRACT_NO = #contractNo#,
PROJ_NAME = #projName#, PROJ_NAME = #projName#,
PROJECT_SOURCE = #projectSource#, PROJECT_SOURCE = #projectSource#,
APPROVAL_STATUS = #approvalStatus#,
<include refid="SqlBase.updateRevise"/>
WHERE PROJ_CODE = #projCode#
</update>
<!-- 修改审批状态 -->
<update id="updateApprovalStatus">
UPDATE ${hggpSchema}.HGSC001
SET
APPROVAL_STATUS = #approvalStatus#,
<include refid="SqlBase.updateRevise"/> <include refid="SqlBase.updateRevise"/>
WHERE PROJ_CODE = #projCode# WHERE PROJ_CODE = #projCode#
</update> </update>
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
<isNotEmpty prepend=" AND " property="projectSource"> <isNotEmpty prepend=" AND " property="projectSource">
project_source = #projectSource# project_source = #projectSource#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
APPROVAL_STATUS = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ename"> <isNotEmpty prepend=" AND " property="ename">
proj_name like concat('%', #ename#, '%') or proj_code like concat('%', #ename#, '%') proj_name like concat('%', #ename#, '%') or proj_code like concat('%', #ename#, '%')
</isNotEmpty> </isNotEmpty>
......
...@@ -5,26 +5,29 @@ import com.baosight.hggp.common.ChangeTypeEnum; ...@@ -5,26 +5,29 @@ import com.baosight.hggp.common.ChangeTypeEnum;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.enums.OrgTypeEnum; import com.baosight.hggp.core.enums.OrgTypeEnum;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.FileTools;
import com.baosight.hggp.core.tools.Iplat4jTools; import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.core.utils.Iplat4jUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.enums.ProjectSourceEnum; import com.baosight.hggp.hg.sc.enums.ProjectSourceEnum;
import com.baosight.hggp.hg.wd.constant.HgWdConstant; import com.baosight.hggp.hg.wd.constant.HgWdConstant;
import com.baosight.hggp.hg.wd.constant.HgWdSqlConstant; import com.baosight.hggp.hg.wd.constant.HgWdSqlConstant;
import com.baosight.hggp.hg.wd.domain.HGWD001; import com.baosight.hggp.hg.wd.domain.HGWD001;
import com.baosight.hggp.hg.wd.domain.HGWD001A; import com.baosight.hggp.hg.wd.domain.HGWD001A;
import com.baosight.hggp.hg.wd.domain.HGWD001C;
import com.baosight.hggp.hg.wd.domain.HGWD003; import com.baosight.hggp.hg.wd.domain.HGWD003;
import com.baosight.hggp.hg.wd.domain.HGWD099; import com.baosight.hggp.hg.wd.domain.HGWD099;
import com.baosight.hggp.hg.wd.tools.HGWDTools; import com.baosight.hggp.hg.wd.tools.HGWDTools;
import com.baosight.hggp.hg.wd.utils.HgWdUtils; import com.baosight.hggp.hg.wd.utils.HgWdUtils;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.domain.User; import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -34,7 +37,11 @@ import com.baosight.iplat4j.core.resource.I18nMessages; ...@@ -34,7 +37,11 @@ import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.*; import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -582,11 +589,25 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -582,11 +589,25 @@ public class ServiceHGWD001 extends ServiceEPBase {
HGWDTools.interaction(hgwd001, strFileName.substring(0, strFileName.length() - 1)); HGWDTools.interaction(hgwd001, strFileName.substring(0, strFileName.length() - 1));
} }
/**
* 查询管理员信息
*
* @param inInfo
* @return
*/
public EiInfo queryProjectManager(EiInfo inInfo) { public EiInfo queryProjectManager(EiInfo inInfo) {
try { try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
Integer isManager = HGWDTools.HgWd003.isProjectManager(queryRow.get(HGWD001.FIELD_FILE_ID).toString()); String fileId = MapUtils.getString(queryRow, HGWD001.FIELD_FILE_ID);
Integer isManager = HGWDTools.HgWd003.isProjectManager(fileId);
inInfo.set("isManager", isManager); inInfo.set("isManager", isManager);
// 是否可以下载
if (StringUtils.isNotNull(fileId)) {
HGWD003 dbWd003 = HGWDTools.HgWd003.getByUser(fileId);
inInfo.set("downloadFlag", dbWd003 == null ? CommonConstant.YesNo.NO_0 : dbWd003.getDownloadFlag());
} else {
inInfo.set("downloadFlag", CommonConstant.YesNo.NO_0);
}
} catch (Exception e) { } catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询失败"); LogUtils.setMsg(inInfo, e, "查询失败");
} }
......
...@@ -4,6 +4,7 @@ import com.baosight.hggp.core.constant.CommonConstant; ...@@ -4,6 +4,7 @@ import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.CodeValueTools; import com.baosight.hggp.core.tools.CodeValueTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.enums.ProjectSourceEnum; import com.baosight.hggp.hg.sc.enums.ProjectSourceEnum;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
...@@ -270,8 +271,8 @@ public class ServiceHGWD001D extends TreeService { ...@@ -270,8 +271,8 @@ public class ServiceHGWD001D extends TreeService {
List<Map> results = new ArrayList(); List<Map> results = new ArrayList();
Map queryMap = new HashMap<>(); Map queryMap = new HashMap<>();
queryMap.put("ename", ename); queryMap.put("ename", ename);
queryMap.put("projectSource", parentId); queryMap.put(HGSC001.FIELD_project_source, parentId);
queryMap.put(HGSC001.FIELD_approval_status, HGConstant.ApprovalStatus.YS);
// 非管理员仅查询自己有权限的项目 // 非管理员仅查询自己有权限的项目
String userId = UserSessionUtils.getLoginName(); String userId = UserSessionUtils.getLoginName();
if (isAuth && !HgWdUtils.HgWd009.isManager(userId)) { if (isAuth && !HgWdUtils.HgWd009.isManager(userId)) {
......
...@@ -3,21 +3,18 @@ package com.baosight.hggp.hg.wd.service; ...@@ -3,21 +3,18 @@ package com.baosight.hggp.hg.wd.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.ChangeTypeEnum; import com.baosight.hggp.common.ChangeTypeEnum;
import com.baosight.hggp.core.constant.CommonConstant; 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.core.dao.DaoUtils;
import com.baosight.hggp.core.extapp.decheng.api.DcOpenApi;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ009;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.wd.constant.HgWdConstant; import com.baosight.hggp.hg.wd.constant.HgWdConstant;
import com.baosight.hggp.hg.wd.domain.HGWD001; import com.baosight.hggp.hg.wd.domain.HGWD001;
import com.baosight.hggp.hg.wd.domain.HGWD001A; import com.baosight.hggp.hg.wd.domain.HGWD001A;
import com.baosight.hggp.hg.wd.domain.HGWD003; import com.baosight.hggp.hg.wd.domain.HGWD003;
import com.baosight.hggp.hg.wd.domain.HGWD099; import com.baosight.hggp.hg.wd.domain.HGWD099;
import com.baosight.hggp.hg.wd.tools.HGWDTools; import com.baosight.hggp.hg.wd.tools.HGWDTools;
import com.baosight.hggp.hg.xs.domain.User; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
...@@ -25,8 +22,8 @@ import com.baosight.iplat4j.core.exception.PlatException; ...@@ -25,8 +22,8 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import java.io.IOException; import java.util.List;
import java.util.*; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -64,7 +61,7 @@ public class ServiceHGWD099 extends ServiceEPBase { ...@@ -64,7 +61,7 @@ public class ServiceHGWD099 extends ServiceEPBase {
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
Map queryRow =EiInfoUtils.getFirstRow(inInfo); Map queryRow =EiInfoUtils.getFirstRow(inInfo);
if (StringUtils.isNotEmpty(queryRow.get(HGWD001.FIELD_PARENT_ID).toString())){ if (ObjectUtils.isNotBlank(queryRow.get(HGWD001.FIELD_PARENT_ID))){
List<Map> childList = HGWDTools.HgWd001.queryFileChild(queryRow.get(HGWD001.FIELD_PARENT_ID).toString()); List<Map> childList = HGWDTools.HgWd001.queryFileChild(queryRow.get(HGWD001.FIELD_PARENT_ID).toString());
List<String> childFileIdList = Optional.ofNullable(childList).orElse(new ArrayList<>()).stream().map(map -> map.get(HGWD001.FIELD_FILE_ID).toString()).collect(Collectors.toList()); List<String> childFileIdList = Optional.ofNullable(childList).orElse(new ArrayList<>()).stream().map(map -> map.get(HGWD001.FIELD_FILE_ID).toString()).collect(Collectors.toList());
queryRow.put("bizIds",childFileIdList); queryRow.put("bizIds",childFileIdList);
......
...@@ -77,14 +77,15 @@ ...@@ -77,14 +77,15 @@
t1.pwd_revise_date as "pwdReviseDate", t1.pwd_revise_date as "pwdReviseDate",
t1.pwd_revisor as "pwdRevisor", t1.pwd_revisor as "pwdRevisor",
t1.archive_flag as "archiveFlag", t1.archive_flag as "archiveFlag",
t1.USER_GROUP_ENAME as "userGroupEname" t1.USER_GROUP_ENAME as "userGroupEname",
C.ORG_CNAME as "deptName"
FROM ${platSchema}.XS_USER t1 FROM ${platSchema}.XS_USER t1
where t1.USER_ID not in LEFT JOIN iplat_hggp.TXSOG02 B ON t1.USER_ID = B.USER_ID
( LEFT JOIN iplat_hggp.TXSOG01 C ON B.ORG_ID = C.ORG_ID
SELECT WHERE t1.USER_ID NOT IN (
MEMBER_ID SELECT MEMBER_ID
FROM ${platSchema}.XS_USER_GROUP_MEMBER t2 FROM ${platSchema}.XS_USER_GROUP_MEMBER t2
where 1 = 1 WHERE 1 = 1
<isNotEmpty prepend=" AND " property="memberType"> <isNotEmpty prepend=" AND " property="memberType">
t2.MEMBER_TYPE = #memberType# t2.MEMBER_TYPE = #memberType#
</isNotEmpty> </isNotEmpty>
...@@ -101,6 +102,9 @@ ...@@ -101,6 +102,9 @@
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
t1.account_code = #accountCode# t1.account_code = #accountCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="deptName">
C.ORG_CNAME LIKE CONCAT('%', #deptName#, '%')
</isNotEmpty>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -109,7 +113,6 @@ ...@@ -109,7 +113,6 @@
<isNotEmpty prepend="AND" property="sql"> <isNotEmpty prepend="AND" property="sql">
$sql$ $sql$
</isNotEmpty> </isNotEmpty>
</select> </select>
</sqlMap> </sqlMap>
...@@ -116,15 +116,15 @@ function btnSaveFunc(btnNode, gridNode) { ...@@ -116,15 +116,15 @@ function btnSaveFunc(btnNode, gridNode) {
} }
let thisSettlementAmount = item['thisSettlementAmount']; let thisSettlementAmount = item['thisSettlementAmount'];
let amount = item['amount']; let taxIncludeAmount = item['taxIncludeAmount'];
let invoiceRemainingAmount = item['invoiceRemainingAmount']; let invoiceRemainingAmount = item['invoiceRemainingAmount'];
if (!isNumber(thisSettlementAmount) && !isPositiveNumber(thisSettlementAmount)) { if (!isNumber(thisSettlementAmount) && !isPositiveNumber(thisSettlementAmount)) {
message("勾选的第" + (index + 1) + "行发票总额必须是大于0的数字"); message("勾选的第" + (index + 1) + "行发票总额必须是大于0的数字");
flag = false; flag = false;
return false; return false;
} }
if (parseFloat(thisSettlementAmount) > parseFloat(amount)) { if (parseFloat(thisSettlementAmount) > parseFloat(taxIncludeAmount)) {
message("第" + (index + 1) + "行发票总额不能大于收货金额"); message("第" + (index + 1) + "行发票总额不能大于含税金额");
flag = false; flag = false;
return false; return false;
} }
......
...@@ -5,8 +5,7 @@ $(function () { ...@@ -5,8 +5,7 @@ $(function () {
columns: [{ columns: [{
field: "operator", field: "operator",
template: function (model) { template: function (model) {
let param = "'" + model.fileId + "', '" + model.docId + "', '" + model.docType + "', '" let param = "'" + model.fileId + "', '" + model.docId + "'";
+ model.docName + "'";
let template = ''; let template = '';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showPreview(' + param + ')" >预览</a>'; + 'onclick="showPreview(' + param + ')" >预览</a>';
...@@ -49,11 +48,9 @@ let query = function () { ...@@ -49,11 +48,9 @@ let query = function () {
* *
* @param fileId * @param fileId
* @param docId * @param docId
* @param docType
* @param docName
*/ */
let showPreview = function (fileId, docId, docType, docName) { let showPreview = function (fileId, docId) {
addRecordWindow(fileId, docId, docType, docName); addRecordWindow(fileId, docId);
} }
/** /**
......
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
<EF:EFComboColumn ename="projectSource" cname="项目来源" enable="false" width="100" align="center"> <EF:EFComboColumn ename="projectSource" cname="项目来源" enable="false" width="100" align="center">
<EF:EFCodeOption codeName="app.sc.projectSource"/> <EF:EFCodeOption codeName="app.sc.projectSource"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="approvalStatus" cname="状态" enable="false" width="100" align="center">
<EF:EFOption label="已删除" value="0"/>
<EF:EFOption label="正常" value="2"/>
</EF:EFComboColumn>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
......
...@@ -492,10 +492,9 @@ $(function () { ...@@ -492,10 +492,9 @@ $(function () {
field: "operator", field: "operator",
readonly: true, readonly: true,
template: function (model) { template: function (model) {
let param = "'" + model.docId + "', '" + model.docType + "', '" + model.docName + "'";
let template = ""; let template = "";
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showPreview(' + param + ')" >预览</a>'; + 'onclick="showPreview(\'' + model.docId + '\')" >预览</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="changeFile(\'' + model.docId + '\',\'' + model.bizId + 'onclick="changeFile(\'' + model.docId + '\',\'' + model.bizId
+ '\')" target="_blank">变更</a>'; + '\')" target="_blank">变更</a>';
...@@ -1066,12 +1065,10 @@ let preview = function () { ...@@ -1066,12 +1065,10 @@ let preview = function () {
* 预览 * 预览
* *
* @param docId * @param docId
* @param docType
* @param docName
*/ */
let showPreview = function (docId, docType, docName) { let showPreview = function (docId) {
let fileId = IPLATUI.EFTree.categoryTree.selectTreeNode.fileId; let fileId = IPLATUI.EFTree.categoryTree.selectTreeNode.fileId;
addRecordWindow(fileId, docId, docType, docName); addRecordWindow(fileId, docId);
} }
/** /**
...@@ -1080,6 +1077,12 @@ let showPreview = function (docId, docType, docName) { ...@@ -1080,6 +1077,12 @@ let showPreview = function (docId, docType, docName) {
* @param parentId * @param parentId
*/ */
let isProjectManager = function (parentId) { let isProjectManager = function (parentId) {
CommonUtils.hideButton("RELEASE");
CommonUtils.hideButton("COPY_PROT_FILE");
CommonUtils.hideButton("COPY_FILE");
CommonUtils.hideButton("UPLOAD_FILE");
CommonUtils.hideButton("PREVIEW");
CommonUtils.hideButton("BATCH_DOWNLOAD");
let inEiInfo = new EiInfo(); let inEiInfo = new EiInfo();
inEiInfo.set("inqu_status-0-fileId", parentId); inEiInfo.set("inqu_status-0-fileId", parentId);
EiCommunicator.send("HGWD001", "queryProjectManager", inEiInfo, { EiCommunicator.send("HGWD001", "queryProjectManager", inEiInfo, {
...@@ -1088,23 +1091,20 @@ let isProjectManager = function (parentId) { ...@@ -1088,23 +1091,20 @@ let isProjectManager = function (parentId) {
return; return;
} }
let isManager = ei.extAttr.isManager; let isManager = ei.extAttr.isManager;
let downloadFlag = ei.extAttr.downloadFlag;
// 1-管理员,2-项目经理,3-设计人
if (isManager === 1 || isManager === 2 || isManager === 3) { if (isManager === 1 || isManager === 2 || isManager === 3) {
if (isManager !== 1 && downloadFlag !== 1) {
$("#BATCH_DOWNLOAD").attr("disabled", true);
}
if (isManager === 1 || isManager === 2) { if (isManager === 1 || isManager === 2) {
CommonUtils.showButton("RELEASE"); CommonUtils.showButton("RELEASE");
} else {
CommonUtils.hideButton("RELEASE");
} }
CommonUtils.showButton("COPY_PROT_FILE"); CommonUtils.showButton("COPY_PROT_FILE");
CommonUtils.showButton("BATCH_DOWNLOAD");
CommonUtils.showButton("UPLOAD_FILE");
CommonUtils.showButton("COPY_FILE"); CommonUtils.showButton("COPY_FILE");
CommonUtils.showButton("PREVIEW");
} else {
CommonUtils.showButton("RELEASE");
CommonUtils.showButton("UPLOAD_FILE"); CommonUtils.showButton("UPLOAD_FILE");
CommonUtils.showButton("COPY_FILE");
CommonUtils.showButton("PREVIEW"); CommonUtils.showButton("PREVIEW");
CommonUtils.showButton("COPY_PROT_FILE"); CommonUtils.showButton("BATCH_DOWNLOAD");
} }
} }
}, {async: false}) }, {async: false})
......
...@@ -58,17 +58,14 @@ let save = function () { ...@@ -58,17 +58,14 @@ let save = function () {
message("请选择数据"); message("请选择数据");
return; return;
} }
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGWD003", "save", true, JSUtils.submitGridsData("result", "HGWD003", "save", true,
function (e) { function (e) {
var status = e.status; var status = e.status;
if (status !== -1) { if (status !== -1) {
parent.JSColorbox.setValueCallback(); parent.JSColorbox.setValueCallback();
} }
});
} }
}); );
} }
/** /**
...@@ -115,18 +112,14 @@ let removeUser = function () { ...@@ -115,18 +112,14 @@ let removeUser = function () {
message("请选择数据"); message("请选择数据");
return; return;
} }
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"取消授权用户\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGWD003", "removeUser", JSUtils.submitGridsData("result", "HGWD003", "removeUser",
true,function (e) { true, function (e) {
var status = e.status; var status = e.status;
if (status !== -1) { if (status !== -1) {
parent.JSColorbox.setValueCallback(); parent.JSColorbox.setValueCallback();
} }
} }
); );
}
});
} }
/** /**
......
...@@ -154,10 +154,9 @@ $(function () { ...@@ -154,10 +154,9 @@ $(function () {
field: "operator", field: "operator",
title: "操作", title: "操作",
template: function (model) { template: function (model) {
let param = "'" + model.docId + "', '" + model.docType + "', '" + model.docName + "'";
let template = ''; let template = '';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showPreview(' + param + ')" >预览</a>'; + 'onclick="showPreview(\'' + model.docId + '\')" >预览</a>';
return template; return template;
} }
}, { }, {
...@@ -320,16 +319,16 @@ let showAuthButton = function () { ...@@ -320,16 +319,16 @@ let showAuthButton = function () {
// C:目录 // C:目录
let leafType = IPLATUI.EFTree.docTree.selectTreeNode.leafLevel; let leafType = IPLATUI.EFTree.docTree.selectTreeNode.leafLevel;
if (leafType && leafType > 0) { if (leafType && leafType > 0) {
$("#PREVIEW").show(); CommonUtils.showButton("PREVIEW");
} else { } else {
$("#PREVIEW").hide(); CommonUtils.hideButton("PREVIEW");
} }
// 是否可以下载 // 是否可以下载
let downloadFlag = IPLATUI.EFTree.docTree.selectTreeNode.downloadFlag; let downloadFlag = IPLATUI.EFTree.docTree.selectTreeNode.downloadFlag;
if (downloadFlag === "1") { if (downloadFlag === "1") {
$("#DOWNLOAD").show(); $("#DOWNLOAD").attr("disabled", false);
} else { } else {
$("#DOWNLOAD").hide(); $("#DOWNLOAD").attr("disabled", true);
} }
} }
...@@ -345,10 +344,8 @@ let preview = function () { ...@@ -345,10 +344,8 @@ let preview = function () {
* 预览 * 预览
* *
* @param docId * @param docId
* @param docType
* @param docName
*/ */
let showPreview = function (docId, docType, docName) { let showPreview = function (docId) {
let fileId = IPLATUI.EFTree.docTree.selectTreeNode.fileId; let fileId = IPLATUI.EFTree.docTree.selectTreeNode.fileId;
addRecordWindow(fileId, docId, docType, docName); addRecordWindow(fileId, docId);
} }
...@@ -15,7 +15,7 @@ $(function () { ...@@ -15,7 +15,7 @@ $(function () {
IPLATUI.EFTree.docTree.selectNode.leaf = nodeData.leaf; IPLATUI.EFTree.docTree.selectNode.leaf = nodeData.leaf;
IPLATUI.EFTree.docTree.selectNode.leafType = leafType; IPLATUI.EFTree.docTree.selectNode.leafType = leafType;
// 添加预览记录 // 添加预览记录
add(label, leafType, nodeData.docType, nodeData.text); add(label, leafType);
}, },
template: function (node) { template: function (node) {
var item = node.item; var item = node.item;
...@@ -93,12 +93,10 @@ function expandTreeNode(tree, node) { ...@@ -93,12 +93,10 @@ function expandTreeNode(tree, node) {
/** /**
* 预览 * 预览
* *
* @param label docId * @param docId docId
* @param leafType 节点类型:C=目录,F=文件 * @param leafType 节点类型:C=目录,F=文件
* @param docType
* @param docName
*/ */
function add(docId, leafType, docType, docName) { function add(docId, leafType) {
if (isBlank(leafType) || isBlank(docId)) { if (isBlank(leafType) || isBlank(docId)) {
message("文件类型或ID不能为空"); message("文件类型或ID不能为空");
return; return;
...@@ -109,7 +107,7 @@ function add(docId, leafType, docType, docName) { ...@@ -109,7 +107,7 @@ function add(docId, leafType, docType, docName) {
return; return;
} }
let fileId = $("#inqu_status-0-fileId").val() let fileId = $("#inqu_status-0-fileId").val()
addRecord(fileId, docId, docType, docName); addRecord(fileId, docId);
} }
...@@ -3,13 +3,11 @@ ...@@ -3,13 +3,11 @@
* *
* @param fileId * @param fileId
* @param docId * @param docId
* @param docType
* @param docName
*/ */
function addRecordWindow(fileId, docId, docType, docName) { function addRecordWindow(fileId, docId) {
$("#previewFile").data("kendoWindow").center(); $("#previewFile").data("kendoWindow").center();
$("#previewFile").data("kendoWindow").open(); $("#previewFile").data("kendoWindow").open();
addRecord(fileId, docId, docType, docName); addRecord(fileId, docId);
} }
/** /**
...@@ -17,9 +15,8 @@ function addRecordWindow(fileId, docId, docType, docName) { ...@@ -17,9 +15,8 @@ function addRecordWindow(fileId, docId, docType, docName) {
* *
* @param fileId * @param fileId
* @param docId * @param docId
* @param docType
*/ */
function addRecord(fileId, docId, docType, docName) { function addRecord(fileId, docId) {
if (isBlank(docId)) { if (isBlank(docId)) {
message("附件类型或ID不能为空"); message("附件类型或ID不能为空");
return; return;
...@@ -34,9 +31,7 @@ function addRecord(fileId, docId, docType, docName) { ...@@ -34,9 +31,7 @@ function addRecord(fileId, docId, docType, docName) {
onSuccess: function (res) { onSuccess: function (res) {
if (res.getStatus() >= 0) { if (res.getStatus() >= 0) {
try { try {
let url = res.extAttr.url; previewFile(res.extAttr.url, res.extAttr.docType);
let docType = res.extAttr.docType;
previewFile(url, docType);
} catch (e) { } catch (e) {
} }
} else { } else {
...@@ -64,6 +59,8 @@ function previewFile(url, docType) { ...@@ -64,6 +59,8 @@ function previewFile(url, docType) {
previewXml(url); previewXml(url);
} else if (isWord(docType)) { } else if (isWord(docType)) {
previewDocx(url); previewDocx(url);
} else if (isPdf(docType)) {
previewFrame(url);
} else { } else {
previewOnline(url); previewOnline(url);
} }
......
...@@ -305,22 +305,22 @@ ...@@ -305,22 +305,22 @@
</EF:EFTab> </EF:EFTab>
</EF:EFWindow> </EF:EFWindow>
<EF:EFWindow id="userWindow" width="58%" height="75%" top="100px" left="280px"> <EF:EFWindow id="userWindow" width="78%" height="75%" top="100px" left="180px">
<EF:EFRegion id="inqu6" title="查询条件" type="query" efRegionShowClear="true" efRegionSave="true"> <EF:EFRegion id="inqu6" title="查询条件" type="query" efRegionShowClear="true" efRegionSave="true">
<div class="row"> <div class="row">
<EF:EFInput type="hidden" cname="父节点ID" ename="parentId" row="0" blockId="inqu_status" <EF:EFInput type="hidden" cname="父节点ID" ename="parentId" row="0" blockId="inqu_status"
name="inqu_status-0-parentId" value=""/> name="inqu_status-0-parentId" value=""/>
<EF:EFInput ename="inqu_status-0-loginName" cname="登录账号" placeholder="请输入登录账号"/> <EF:EFInput ename="inqu_status-0-loginName" cname="登录账号" placeholder="请输入登录账号"/>
<EF:EFInput ename="inqu_status-0-userName" cname="用户姓名" placeholder="请输入用户姓名"/> <EF:EFInput ename="inqu_status-0-userName" cname="用户姓名" placeholder="请输入用户姓名"/>
<EF:EFInput ename="inqu_status-0-deptName" cname="部门名称" placeholder="请输入部门名称"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result6Region" title="资源组信息"> <EF:EFRegion id="result6Region" title="资源组信息">
<EF:EFGrid blockId="result6" autoDraw="no" autoBind="false" <EF:EFGrid blockId="result6" autoDraw="no" autoBind="false" showCount="true"
queryMethod="queryUserOutOfUserGroup" queryMethod="queryUserOutOfUserGroup">
> <EF:EFColumn ename="deptName" cname="部门名称" enable="false" align="left"/>
<EF:EFColumn ename="loginName" cname="登录账号" readonly="true" style="text-align:left;"/> <EF:EFColumn ename="loginName" cname="登录账号" enable="false" align="left"/>
<EF:EFColumn ename="userName" cname="用户姓名" style="text-align:left;" readonly="true"/> <EF:EFColumn ename="userName" cname="用户姓名" enable="false" align="left"/>
<EF:EFComboColumn ename="gender" cname="性别" valueField="valueField" textField="textField" <EF:EFComboColumn ename="gender" cname="性别" valueField="valueField" textField="textField"
columnTemplate="#=textField#" align="center" readonly="true"> columnTemplate="#=textField#" align="center" readonly="true">
<EF:EFCodeOption codeName="xservices.xs.sex"/> <EF:EFCodeOption codeName="xservices.xs.sex"/>
...@@ -328,9 +328,7 @@ ...@@ -328,9 +328,7 @@
<EF:EFColumn ename="mobile" style="text-align:right;" cname="手机" data-rules="mobile_phone" <EF:EFColumn ename="mobile" style="text-align:right;" cname="手机" data-rules="mobile_phone"
readonly="true"/> readonly="true"/>
<EF:EFColumn ename="email" cname="邮箱" data-rules="email" style="text-align:left;" readonly="true"/> <EF:EFColumn ename="email" cname="邮箱" data-rules="email" style="text-align:left;" readonly="true"/>
<EF:EFColumn ename="userId" cname="用户ID" readonly="false" primaryKey="true" hidden="true"/> <EF:EFColumn ename="userId" cname="用户ID" readonly="false" primaryKey="true" hidden="true"/>
<EF:EFColumn ename="password" cname="用户密码" hidden="true" readonly="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -759,8 +759,7 @@ function loadChange(grid,e,field) { ...@@ -759,8 +759,7 @@ function loadChange(grid,e,field) {
let button = $("#" + name); let button = $("#" + name);
button.hide(); button.hide();
// 隐藏父级标签,防止按钮重叠 // 隐藏父级标签,防止按钮重叠
let parent = button.parent(); button.parent().css("display", "none");
parent.css("display", "none");
} }
/** /**
......
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