Commit 5c20f17c by 宋祥

Merge branch 'dev' of http://129.211.46.84:8800/platform/hg-smart into master-dc

parents 6020ff04 8f6dbc4e
......@@ -2,14 +2,19 @@ package com.baosight.hggp.core.tools;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.common.ed.domain.TEDFA00;
import com.baosight.iplat4j.common.eu.domain.Teudm05;
import com.baosight.iplat4j.core.exception.PlatException;
import org.apache.commons.collections.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* ED工具类
......@@ -77,6 +82,41 @@ public class Iplat4jTools {
}
return results;
}
public static Map<String, List<Map<String, Object>>> map(String condition) {
if (StringUtils.isEmpty(condition)){
return null;
}
List<Map<String, Object>> results = getByCodesetMap(condition);
if (CollectionUtils.isEmpty(results)){
return null;
}
return results.stream().collect(Collectors.groupingBy(map -> map.get("codesetCode").toString()));
}
/**
* 初始化结果集
* @param results 要初始化数据
* @param hashMap 映射关系
* @param codeSetCode 小代码分类编码
* @return
*/
public static List initResultRows(List<Map> results, Map<String,Object> hashMap, String codeSetCode){
List<Map> data = new ArrayList<>();
Map<String, List<Map<String, Object>>> codesetMaps = map(codeSetCode);
for (Map row: results) {
for (String key: hashMap.keySet()) {
if (codesetMaps != null && codesetMaps.containsKey(hashMap.get(key))){
Map<String,Object> statusMap = codesetMaps.get(hashMap.get(key))
.stream().filter(map -> map.get("itemCode").equals(row.get(key)))
.collect(Collectors.toMap(map -> "itemCode", map -> map.get("itemCname")));
String value = MapUtils.getString(statusMap, "itemCode");
row.put(key, value);
}
}
data.add(row);
}
return data;
}
}
......
......@@ -2,9 +2,11 @@ package com.baosight.hggp.hg.cg.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.cg.domain.HGCG001;
import com.baosight.hggp.hg.cg.domain.HGCG001A;
import com.baosight.hggp.hg.cg.domain.HGCG003;
......@@ -17,8 +19,12 @@ import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.sc.domain.HGSC009;
import com.baosight.hggp.hg.sc.domain.HGSC009A;
import com.baosight.hggp.hg.sc.domain.HGSC010;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -305,4 +311,24 @@ public class ServiceHGCG001 extends ServiceBase {
// db数据
return HGCGTools.HgCg001.map(planNos);
}
@OperationLogAnnotation(operModul = "采购计划",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGCG001."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("source", "companyCode", "companyName", "projCode", "projName", "planDate", "planNo"
, "status","purQty", "purWeight", "planQty","planWeight","createdName","createdTime"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGCG001());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("source", "hggp.hpcg.receiveSource");
put("status", "hggp.hgcg.planStatus");
}};
String codeSetCode = "CODESET_CODE in ('hggp.hpcg.receiveSource','hggp.hgcg.planStatus')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......@@ -2,9 +2,11 @@ package com.baosight.hggp.hg.cg.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.cg.domain.*;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.cg.utils.HGCGUtils;
......@@ -17,7 +19,10 @@ import com.baosight.hggp.hg.sc.domain.HGSC009;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -312,4 +317,24 @@ public class ServiceHGCG002 extends ServiceBase {
});
}
@OperationLogAnnotation(operModul = "采购计划",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGCG002."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("source","companyCode", "companyName", "projCode", "projName", "contractDate", "contractNo"
, "status","supCode", "supName", "purUserId", "purUserName", "purQty", "purWeight", "receiveQty"
, "amount", "taxAmount", "taxIncludeAmount", "createdName", "createdTime"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGCG002());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("source", "hggp.hpcg.receiveSource");
}};
String codeSetCode = "CODESET_CODE in ('hggp.hpcg.receiveSource')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......@@ -2,9 +2,11 @@ package com.baosight.hggp.hg.cg.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.cg.constant.HgCgSqlConst;
import com.baosight.hggp.hg.cg.domain.*;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
......@@ -19,7 +21,10 @@ import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -328,4 +333,25 @@ public class ServiceHGCG003 extends ServiceBase {
});
}
@OperationLogAnnotation(operModul = "采购收货",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGCG003."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("source", "companyCode", "companyName", "projCode", "projName", "contractNo", "receiveDate"
, "receiveNo", "status", "supCode", "supName", "purUserId", "purUserName", "receiveQty"
, "deliverQty", "depositQty", "receiveWeight", "amount", "taxAmount", "taxIncludeAmount"
, "createdName", "createdTime"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGCG003());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("source", "hggp.hpcg.receiveSource");
put("status", "hggp.hgcg.receiveStatus");
}};
String codeSetCode = "CODESET_CODE in ('hggp.hpcg.receiveSource','hggp.hgcg.receiveStatus')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......@@ -4,12 +4,14 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.cg.domain.HGCG002;
import com.baosight.hggp.hg.cg.domain.HGCG004;
import com.baosight.hggp.hg.cg.domain.HGCG005;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -19,10 +21,7 @@ import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
*
......@@ -162,4 +161,22 @@ public class ServiceHGCG005 extends ServiceEPBase {
return inInfo;
}
@OperationLogAnnotation(operModul = "询价管理",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGCG005."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("inquiryDate","inquiryNumber", "supplierName", "inquiryPerson", "inquiryType", "proApplyStatus"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGCG005());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("inquiryType", "hggp.hgcg.inquiryType");
put("proApplyStatus", "hggp.hgxt.proApplyStatus");
}};
String codeSetCode = "CODESET_CODE in ('hggp.hgcg.inquiryType','hggp.hgxt.proApplyStatus')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......@@ -55,7 +55,7 @@
INQUIRY_DATE = #inquiryDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inquiryNumber">
INQUIRY_NUMBER = #inquiryNumber#
INQUIRY_NUMBER like concat('%',#inquiryNumber#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supplierName">
SUPPLIER_NAME = #supplierName#
......@@ -100,7 +100,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
INQUIRY_DATE desc, ID desc
</isEmpty>
</dynamic>
......
......@@ -8,20 +8,25 @@ import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW006;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
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.ExcelUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -32,7 +37,13 @@ import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
/**
......@@ -54,7 +65,6 @@ public class ServiceHGCW002 extends ServiceBase {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW002().eiMetadata);
outInfo = super.query(inInfo, HGCW002.QUERY, new HGCW002());
Map<String, Object> qarma = new HashMap<>();
EiInfoUtils.addBlock(outInfo, "roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID, DdynamicEnum.CONTRACT_BLOCK_ID));
......@@ -88,6 +98,7 @@ public class ServiceHGCW002 extends ServiceBase {
@OperationLogAnnotation(operModul = "账期维护", operType = "查询", operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
if (!roleCompanyCode.isEmpty()) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCW002.FIELD_COMPANY_CODES, roleCompanyCode);
......
......@@ -4,6 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.CodeValueTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW004;
......@@ -16,10 +17,8 @@ import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -29,10 +28,8 @@ import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author yukang
......@@ -47,7 +44,7 @@ public class ServiceHGCW004 extends ServiceBase {
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
@OperationLogAnnotation(operModul = "签证单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo,new HGCW004());
try {
......@@ -73,7 +70,7 @@ public class ServiceHGCW004 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "查询")
@OperationLogAnnotation(operModul = "签证单",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
......@@ -94,7 +91,7 @@ public class ServiceHGCW004 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "保存",operDesc = "保存")
@OperationLogAnnotation(operModul = "签证单",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......@@ -153,7 +150,7 @@ public class ServiceHGCW004 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "新增",operDesc = "新增")
@OperationLogAnnotation(operModul = "签证单",operType = "新增",operDesc = "新增")
@Override
public EiInfo insert(EiInfo inInfo) {
try {
......@@ -179,7 +176,7 @@ public class ServiceHGCW004 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "修改",operDesc = "修改")
@OperationLogAnnotation(operModul = "签证单",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......@@ -203,7 +200,7 @@ public class ServiceHGCW004 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "删除",operDesc = "删除")
@OperationLogAnnotation(operModul = "签证单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......@@ -218,40 +215,35 @@ public class ServiceHGCW004 extends ServiceBase {
}
return inInfo;
}
// /**
// * 上传附件
// * @param inInfo
// * @return
// *
// }
@OperationLogAnnotation(operModul = "账期维护",operType = "上传附件",operDesc = "上传附件操作")
public EiInfo updateDocId(EiInfo inInfo){
int i = 0;
try {
HGCW004 hgcw004 = new HGCW004();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgcw004.fromMap(map);
DaoUtils.update(HGCW004.UPDATE_DOC_ID, hgcw004);
@OperationLogAnnotation(operModul = "签证单",operType = "上传附件",operDesc = "上传附件操作")
public EiInfo updateDocId(EiInfo inInfo){
int i = 0;
try {
HGCW004 hgcw004 = new HGCW004();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgcw004.fromMap(map);
DaoUtils.update(HGCW004.UPDATE_DOC_ID, hgcw004);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleUpdateException(inInfo,i,e);
logError("修改失败", e.getMessage());
return inInfo;
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleUpdateException(inInfo,i,e);
logError("修改失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 提交操作
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "签证单",operType = "提交",operDesc = "提价操作")
public EiInfo submit(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......@@ -269,6 +261,28 @@ public EiInfo updateDocId(EiInfo inInfo){
}
return inInfo;
}
@OperationLogAnnotation(operModul = "签证单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
List<Map> codesetMaps = CodeValueTools.getCodeValues("hggp.cw.reviewStatus");
Map params = HGXSUtils.setAuthParam("HGCW004."+ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName","projCode","projName","contractNumber","contractName", "partyA"
,"partyB","projactDetail","contractContent","totalContractPriceIncluding","signingDate", "reviewStatus"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGCW004());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map> data = new ArrayList<>();
for (Map row: rows) {
Map codesetMap = codesetMaps.stream().filter(map -> map.get("value").equals(row.get("reviewStatus")))
.collect(Collectors.toMap(map -> "value", map -> map.get("label")));
String label = MapUtils.getString(codesetMap, "value");
row.put("reviewStatus", label);
data.add(row);
}
inEiInfo.getBlock(EiConstant.resultBlock).setRows(data);
return inEiInfo;
}
}
......
......@@ -4,6 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.CodeValueTools;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW004;
import com.baosight.hggp.hg.cw.domain.HGCW005;
......@@ -14,10 +15,8 @@ import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -27,10 +26,8 @@ import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author yukang
......@@ -45,7 +42,7 @@ public class ServiceHGCW005 extends ServiceBase {
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
@OperationLogAnnotation(operModul = "扣款单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo,new HGCW005());
try {
......@@ -71,7 +68,7 @@ public class ServiceHGCW005 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "查询")
@OperationLogAnnotation(operModul = "扣款单",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
......@@ -93,7 +90,7 @@ public class ServiceHGCW005 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "保存",operDesc = "保存")
@OperationLogAnnotation(operModul = "扣款单",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......@@ -152,7 +149,7 @@ public class ServiceHGCW005 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "新增",operDesc = "新增")
@OperationLogAnnotation(operModul = "扣款单",operType = "新增",operDesc = "新增")
@Override
public EiInfo insert(EiInfo inInfo) {
try {
......@@ -202,7 +199,7 @@ public class ServiceHGCW005 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "删除",operDesc = "删除")
@OperationLogAnnotation(operModul = "扣款单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......@@ -222,11 +219,11 @@ public class ServiceHGCW005 extends ServiceBase {
// * @param inInfo
// * @return
// */
// @OperationLogAnnotation(operModul = "账期维护",operType = "上传附件",operDesc = "上传附件")
// @OperationLogAnnotation(operModul = "扣款单",operType = "上传附件",operDesc = "上传附件")
// public EiInfo form(EiInfo inInfo) {
// return inInfo;
// }
@OperationLogAnnotation(operModul = "账期维护",operType = "上传附件",operDesc = "上传附件操作")
@OperationLogAnnotation(operModul = "扣款单",operType = "上传附件",operDesc = "上传附件操作")
public EiInfo updateDocId(EiInfo inInfo){
int i = 0;
try {
......@@ -272,7 +269,27 @@ public EiInfo updateDocId(EiInfo inInfo){
return inInfo;
}
@OperationLogAnnotation(operModul = "签证单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
List<Map> codesetMaps = CodeValueTools.getCodeValues("hggp.cw.reviewStatus");
Map params = HGXSUtils.setAuthParam("HGCW005."+ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName","projCode","projName","contractNumber","contractName", "partyA"
,"partyB","contractContent","totalContractPriceIncluding","signingDate","deliveryCode", "reviewStatus"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGCW005());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map> data = new ArrayList<>();
for (Map row: rows) {
Map codesetMap = codesetMaps.stream().filter(map -> map.get("value").equals(row.get("reviewStatus")))
.collect(Collectors.toMap(map -> "value", map -> map.get("label")));
String label = MapUtils.getString(codesetMap, "value");
row.put("reviewStatus", label);
data.add(row);
}
inEiInfo.getBlock(EiConstant.resultBlock).setRows(data);
return inEiInfo;
}
}
......
......@@ -5,11 +5,13 @@ import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.CodeValueTools;
import com.baosight.hggp.hg.cw.domain.HGCW005;
import com.baosight.hggp.hg.cw.domain.HGCW005A;
import com.baosight.hggp.hg.sb.domain.HGSB001;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -123,4 +125,26 @@ public class ServiceHGCW005A extends ServiceEPBase {
public void modify(HGCW005A hgcw005A) {
DaoUtils.update(HGCW005A.UPDATE, hgcw005A);
}
@OperationLogAnnotation(operModul = "扣款单明细",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
List<Map> codesetMaps = CodeValueTools.getCodeValues("hggp.cw.reviewStatus");
Map params = HGXSUtils.setAuthParam("HGCW005A."+ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName","projCode","projName","deliveryCode","receName","totalContractPriceIncluding"
,"inventCode","inventName","spec","quantity","weight"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGCW005A());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map> data = new ArrayList<>();
for (Map row: rows) {
Map codesetMap = codesetMaps.stream().filter(map -> map.get("value").equals(row.get("reviewStatus")))
.collect(Collectors.toMap(map -> "value", map -> map.get("label")));
String label = MapUtils.getString(codesetMap, "value");
row.put("reviewStatus", label);
data.add(row);
}
inEiInfo.getBlock(EiConstant.resultBlock).setRows(data);
return inEiInfo;
}
}
......@@ -3,7 +3,11 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.CodeValueTools;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW005;
import com.baosight.hggp.hg.cw.domain.HGCW006;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW007;
......@@ -11,9 +15,10 @@ import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -24,10 +29,8 @@ import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author yukang
......@@ -45,8 +48,9 @@ public class ServiceHGCW006 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID), null, false);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW006().eiMetadata);
} catch (PlatException e) {
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
......@@ -190,4 +194,30 @@ public class ServiceHGCW006 extends ServiceBase {
return inInfo;
}
@OperationLogAnnotation(operModul = "租赁合同",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
List<Map<String, Object>> codesetList = Iplat4jTools.EdCm01.getByCodesetMap("CODESET_CODE in ('hggp.cw.reviewStatus','hggp.cw.contractStatus')");
Map<String, List<Map<String, Object>>> codesetMaps =codesetList.stream().collect(Collectors.groupingBy(map -> map.get("codesetCode").toString()));
Map params = HGXSUtils.setAuthParam("HGCW006."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName","projCode","projName","signingDate","contractNumber", "contractName"
,"partyA","partyB","contractStatus", "reviewStatus"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGCW006());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map> data = new ArrayList<>();
for (Map row: rows) {
Map reviewStatusMap = codesetMaps.get("hggp.cw.reviewStatus").stream().filter(map -> map.get("itemCode").equals(row.get("reviewStatus")))
.collect(Collectors.toMap(map -> "itemCode", map -> map.get("itemCname")));
String reviewStatus = MapUtils.getString(reviewStatusMap, "itemCode");
row.put("reviewStatus", reviewStatus);
Map contractStatusMap = codesetMaps.get("hggp.cw.contractStatus").stream().filter(map -> map.get("itemCode").equals(row.get("contractStatus")))
.collect(Collectors.toMap(map -> "itemCode", map -> map.get("itemCname")));
String contractStatus = MapUtils.getString(contractStatusMap, "itemCode");
row.put("contractStatus", contractStatus);
data.add(row);
}
inEiInfo.getBlock(EiConstant.resultBlock).setRows(data);
return inEiInfo;
}
}
......@@ -5,6 +5,7 @@ import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
......@@ -14,6 +15,7 @@ import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -25,10 +27,8 @@ import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author yukang
......@@ -260,4 +260,31 @@ public class ServiceHGCW008 extends ServiceBase {
return inInfo;
}
@OperationLogAnnotation(operModul = "结算单管理",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
List<Map<String, Object>> codesetList = Iplat4jTools.EdCm01.getByCodesetMap("CODESET_CODE in ('hggp.cw.reviewStatus','hggp.cw.settlementType')");
Map<String, List<Map<String, Object>>> codesetMaps =codesetList.stream().collect(Collectors.groupingBy(map -> map.get("codesetCode").toString()));
Map params = HGXSUtils.setAuthParam("HGCW008."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList("reviewStatus", "companyCode", "companyName","projCode","projName","contractNumber", "contractName"
,"settlementNumber","settlementType", "thisSettlementAmount", "thisSettlementTax","thisPriceTax"
,"contractDate"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGCW008());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map> data = new ArrayList<>();
for (Map row: rows) {
Map reviewStatusMap = codesetMaps.get("hggp.cw.reviewStatus").stream().filter(map -> map.get("itemCode").equals(row.get("reviewStatus")))
.collect(Collectors.toMap(map -> "itemCode", map -> map.get("itemCname")));
String reviewStatus = MapUtils.getString(reviewStatusMap, "itemCode");
row.put("reviewStatus", reviewStatus);
Map settlementTypeMap = codesetMaps.get("hggp.cw.settlementType").stream().filter(map -> map.get("itemCode").equals(row.get("settlementType")))
.collect(Collectors.toMap(map -> "itemCode", map -> map.get("itemCname")));
String settlementType = MapUtils.getString(settlementTypeMap, "itemCode");
row.put("settlementType", settlementType);
data.add(row);
}
inEiInfo.getBlock(EiConstant.resultBlock).setRows(data);
return inEiInfo;
}
}
......@@ -8,6 +8,7 @@ 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.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.domain.HGCW010;
......@@ -19,7 +20,10 @@ import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -363,6 +367,28 @@ public class ServiceHGCW010 extends ServiceBase {
}
return inInfo;
}
@OperationLogAnnotation(operModul = "销售开票",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGCW010."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName", "projCode", "projName", "partyA", "branchUnit", "settlementNumber",
"invoiceCode","billTybe","signingDate","billNumber","billNumber","taxPoints"
,"totalContractPriceIncluding","thisSettlementAmount","thisSettlementTax","billState","reviewStatus"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGCW010());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("billTybe", "hggp.cw.billTybe");
put("billState", "hggp.cw.billState");
put("reviewStatus", "hggp.cw.reviewStatus");
}};
String codeSetCode = "CODESET_CODE in ('hggp.cw.billTybe','hggp.cw.billState','hggp.cw.reviewStatus')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......
......@@ -5,9 +5,11 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.ContractTypeEnum;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.ReviewStatusEnum;
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.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.cg.constant.HgCgConst;
import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.cg.domain.HGCG003B;
......@@ -20,7 +22,11 @@ import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX002;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -659,6 +665,27 @@ public class ServiceHGCW012 extends ServiceBase {
}
return contractType1;
}
@OperationLogAnnotation(operModul = "采购收票",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGCW012."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName", "projCode", "projName", "contractNo", "partyA", "invoiceCode",
"settlementNumber","billTybe","receiveDate","signingDate","billNumber","taxPoints"
,"totalContractPriceIncluding","thisSettlementAmount","thisSettlementTax","reviewStatus"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGCW012());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("billTybe", "hggp.cw.billTybe");
put("reviewStatus", "hggp.cw.reviewStatus");
}};
String codeSetCode = "CODESET_CODE in ('hggp.cw.billTybe','hggp.cw.reviewStatus')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......
......@@ -4,8 +4,10 @@ import com.baosight.eplat.utils.StringUtils;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.ReviewStatusEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
......@@ -13,10 +15,10 @@ import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
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.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -27,10 +29,7 @@ import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -284,6 +283,26 @@ public class ServiceHGCW014 extends ServiceBase {
}
return inInfo;
}
@OperationLogAnnotation(operModul = "收款单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGCW014."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName", "projCode", "projName", "partyA", "signingDate", "contractNumber",
"incomeNumber","totalContractPriceIncluding","cancelStatus","reviewStatus"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGCW014());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("cancelStatus", "hggp.cw.cancelStatus");
put("reviewStatus", "hggp.cw.reviewStatus");
}};
String codeSetCode = "CODESET_CODE in ('hggp.cw.cancelStatus','hggp.cw.reviewStatus')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......
......@@ -3,17 +3,19 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.eplat.utils.StringUtils;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW012;
import com.baosight.hggp.hg.cw.domain.HGCW016;
import com.baosight.hggp.hg.cw.domain.HGCW015;
import com.baosight.hggp.hg.cw.domain.HGCW017;
import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -24,10 +26,7 @@ import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -285,6 +284,26 @@ public class ServiceHGCW016 extends ServiceBase {
}
return inInfo;
}
@OperationLogAnnotation(operModul = "付款单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGCW016."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName", "projCode", "projName", "partyA", "signingDate", "contractNumber",
"incomeNumber","totalContractPriceIncluding","cancelStatus","reviewStatus"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGCW016());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("cancelStatus", "hggp.cw.cancelStatus");
put("reviewStatus", "hggp.cw.reviewStatus");
}};
String codeSetCode = "CODESET_CODE in ('hggp.cw.cancelStatus','hggp.cw.reviewStatus')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......
......@@ -84,13 +84,13 @@
RECE_NAME like concat('%',#receName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
SPEC like concat('%',#spec#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
INVENT_NAME like concat('%',#inventName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
......
......@@ -51,7 +51,7 @@
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
SETTLEMENT_NUMBER like CONCAT('%',#settlementNumber#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billTybe">
BILL_TYBE = #billTybe#
......
......@@ -76,6 +76,8 @@
INVOICE_CODE as "invoiceCode"
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
......@@ -95,7 +97,7 @@
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
SETTLEMENT_NUMBER LIKE CONCAT('%',#settlementNumber#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billTybe">
BILL_TYBE = #billTybe#
......@@ -185,6 +187,20 @@
INVOICE_CODE like concat('%' , #invoiceCode# , '%')
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="signingDateFrom">
SIGNING_DATE &gt;= REPLACE(#signingDateFrom#,'-','')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateTo">
SIGNING_DATE &lt;= REPLACE(#signingDateTo#,'-','')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveDateFrom">
RECEIVE_DATE &gt;= REPLACE(#receiveDateFrom#,'-','')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveDateTo">
RECEIVE_DATE &lt;= REPLACE(#receiveDateTo#,'-','')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW012">
......@@ -192,6 +208,7 @@
<include refid="column" />
FROM ${hggpSchema}.HGCW012 WHERE 1=1
<include refid="condition" />
<include refid="customCondition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
......
......@@ -48,10 +48,10 @@
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
CONTRACT_NUMBER like concat('%',#contractNumber#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="incomeNumber">
INCOME_NUMBER = #incomeNumber#
INCOME_NUMBER like concat('%',#incomeNumber#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
......
......@@ -40,10 +40,10 @@
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
CONTRACT_NUMBER like concat('%',#contractNumber#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="incomeNumber">
INCOME_NUMBER = #incomeNumber#
INCOME_NUMBER like concat('%',#incomeNumber#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateFrom">
SIGNING_DATE &gt;= REPLACE(#signingDateFrom#, '-', '')
......
......@@ -2,9 +2,12 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.cg.domain.HGCG001;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
......@@ -15,7 +18,10 @@ import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ007;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -25,10 +31,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.google.common.collect.Lists;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -247,4 +250,23 @@ public class ServiceHGKC001 extends ServiceBase {
AssertUtils.isEmpty(hgkc001.getWhName(),"仓库名称不能为空!");
}
@OperationLogAnnotation(operModul = "采购入库",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGKC001."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName", "depositDate", "depositNo", "receiveNo", "whCode", "whName"
, "inventCode","inventName", "inventType", "spec","depositQty","depositWeight","material"
, "unit", "length", "width", "thick", "price", "amount", "createdName", "createdTime", "submitStatus"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGKC001());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("submitStatus", "hggp.hgcg.receiveStatus");
}};
String codeSetCode = "CODESET_CODE in ('hggp.hgcg.receiveStatus')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......@@ -5,24 +5,23 @@ import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.cg.domain.HGCG002;
import com.baosight.hggp.hg.cg.domain.HGCG005;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.kc.domain.HGKC002;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.BeanUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @author:songx
......@@ -139,4 +138,23 @@ public class ServiceHGKC002 extends ServiceBase {
}
}
@OperationLogAnnotation(operModul = "生产领料单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGKC002."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("receiptDate","reqNo", "whCode", "whName", "inventType", "inventCode", "inventName"
, "spec", "applyQty", "unitWeight", "applyWeight", "remark", "oldReqNo", "createdName", "createdTime"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGKC002());
/*List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("inquiryType", "hggp.hgcg.inquiryType");
put("proApplyStatus", "hggp.hgxt.proApplyStatus");
}};
String codeSetCode = "CODESET_CODE in ('hggp.hgcg.inquiryType','hggp.hgxt.proApplyStatus')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));*/
return inEiInfo;
}
}
......@@ -5,6 +5,9 @@ import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.cg.domain.HGCG002;
import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.kc.domain.HGKC003;
......@@ -13,7 +16,10 @@ import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ005A;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -22,10 +28,7 @@ import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -256,4 +259,26 @@ public class ServiceHGKC003 extends ServiceBase {
DaoUtils.update(HGKC003.UPDATE, fKc003);
}
@OperationLogAnnotation(operModul = "生产入库单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGKC003."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("storageType","companyCode", "companyName", "projCode", "projName", "whCode", "whName"
, "depositDate", "depositNo", "depositNoOld", "prdtType", "processName", "prdtCode", "prdtName"
, "prdtSpec", "prdtLength", "prdtWidth", "prdtThick", "prdtCoefficient", "invQty", "invUnitWeight"
, "invWeight", "price", "amount", "submitStatus"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGKC003());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("storageType", "hggp.kc.storageType");
put("submitStatus", "hggp.sc.productStatus");
}};
String codeSetCode = "CODESET_CODE in ('hggp.kc.storageType','hggp.sc.productStatus')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......@@ -5,6 +5,9 @@ import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.cg.domain.HGCG004;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
......@@ -16,6 +19,8 @@ import com.baosight.hggp.hg.sb.domain.HGSB001;
import com.baosight.hggp.hg.sb.domain.HGSB002;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001A;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
......@@ -222,4 +227,21 @@ public class ServiceHGKC004 extends ServiceEPBase {
return inInfo;
}
@OperationLogAnnotation(operModul = "销售出库单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGKC004."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName", "receiptDate", "saleOutCode", "whCode", "whName", "status"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGKC004());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("status", "hggp.hgkc.status");
}};
String codeSetCode = "CODESET_CODE in ('hggp.hgkc.status')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......@@ -6,6 +6,7 @@ import com.baosight.hggp.common.InventTypeEnum;
import com.baosight.hggp.common.InventorySource;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
......@@ -17,6 +18,7 @@ import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.domain.HGSC004A;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
......@@ -386,4 +388,24 @@ public class ServiceHGKC005 extends ServiceEPBase {
}
}
@OperationLogAnnotation(operModul = "库存盘点单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGKC005."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("checkNo", "receiptDate", "inventType", "whCode", "whName", "inventCode", "inventName"
, "spec", "bookAmount", "bookWeight", "bookUnitWeight", "entityAmount", "entityWeight"
, "diffAmount", "diffWeight", "remark", "oldCheckNo", "submitStatus"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGKC005());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("submitStatus", "hggp.sc.productStatus");
}};
String codeSetCode = "CODESET_CODE in ('hggp.sc.productStatus')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......@@ -3,8 +3,10 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventorySource;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
......@@ -14,7 +16,10 @@ import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -231,4 +236,23 @@ public class ServiceHGKC006 extends ServiceBase {
return inInfo;
}
@OperationLogAnnotation(operModul = "其他入库单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGKC006."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName", "otherEnterDate", "otherEnterNo", "whCode", "whName", "submitStatus"
, "source"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGKC006());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("submitStatus", "hggp.hpkc.submitStatus");
put("source", "hggp.hpkc.source");
}};
String codeSetCode = "CODESET_CODE in ('hggp.hpkc.submitStatus','hggp.hpkc.source')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......@@ -3,8 +3,10 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventorySource;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
......@@ -15,7 +17,10 @@ import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -25,10 +30,7 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* 其他出库单
......@@ -283,4 +285,23 @@ public class ServiceHGKC007 extends ServiceBase {
return inInfo;
}
@OperationLogAnnotation(operModul = "其他出库单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGKC007."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName", "otherOutDate", "otherOutNo", "whCode", "whName", "submitStatus"
, "source"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGKC007());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("submitStatus", "hggp.hpkc.submitStatus");
put("source", "hggp.hpkc.source");
}};
String codeSetCode = "CODESET_CODE in ('hggp.hpkc.submitStatus','hggp.hpkc.source')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.kc.constant.HgKcConst;
import com.baosight.hggp.hg.kc.domain.HGKC005;
import com.baosight.hggp.hg.kc.domain.HGKC008;
import com.baosight.hggp.hg.kc.domain.HGKC008A;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ004;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -31,11 +31,7 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
/**
* @Author jhs
......@@ -211,5 +207,25 @@ public class ServiceHGKC008 extends ServiceBase {
return inInfo;
}
@OperationLogAnnotation(operModul = "库存盘点单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGKC008."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("receiveType", "dataSource", "companyCode", "companyName", "projCode", "projName", "applyCode"
, "receiptDate", "whCode", "whName", "receiveUserId", "receiveUserName", "status"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGKC008());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("dataSource", "hggp.receiveDataSource");
put("receiveType", "hggp.receiveType");
put("status", "hggp.hgkc.ScllStatus");
}};
String codeSetCode = "CODESET_CODE in ('hggp.receiveDataSource','hggp.receiveType','hggp.hgkc.ScllStatus')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......@@ -8,12 +8,15 @@ 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.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.kc.constant.HgKcConst;
import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
......@@ -265,4 +268,25 @@ public class ServiceHGKC017 extends ServiceEPBase {
DaoUtils.insert(HGKC007A.INSERT, hgkc007a);
}
}
@OperationLogAnnotation(operModul = "打包单",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGKC017."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName", "projCode", "projName", "whCode", "whName", "packDate"
, "packCode","packType","inventCode","inventName","spec","length","width","thick","unit","invQty"
,"invUnitWeight","invWeight","packUserId","packUserName","status"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGKC017());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("status", "hggp.sc.productStatus");
put("packType", "hggp.kc.packType");
}};
String codeSetCode = "CODESET_CODE in ('hggp.sc.productStatus','hggp.kc.packType')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......@@ -89,11 +89,14 @@
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
INVENT_NAME like concat('%',#inventName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="specId">
SPEC_ID = #specId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC like concat('%',#spec#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
</isNotEmpty>
......
......@@ -50,7 +50,7 @@
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
WH_NAME LIKE CONCAT('%',#whName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invQty">
INV_QTY = #invQty#
......@@ -86,10 +86,10 @@
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
PRDT_CODE LIKE CONCAT('%',#prdtCode#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
PRDT_NAME LIKE CONCAT('%',#prdtName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtLength">
PRDT_LENGTH = #prdtLength#
......@@ -101,7 +101,7 @@
PRDT_THICK = #prdtThick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtSpec">
PRDT_SPEC = #prdtSpec#
PRDT_SPEC LIKE CONCAT('%',#prdtSpec#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
......
......@@ -127,7 +127,7 @@
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
WH_NAME like concat('%',#whName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="packDate">
PACK_DATE = #packDate#
......@@ -145,13 +145,13 @@
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
INVENT_NAME like concat('%',#inventName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="specId">
SPEC_ID = #specId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
SPEC like concat('%',#spec#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
......
package com.baosight.hggp.hg.pz.utils;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ020;
import com.baosight.hggp.hg.pz.domain.HGPZ020A;
import com.baosight.hggp.hg.pz.domain.HGPZ021;
import com.baosight.hggp.hg.pz.enums.DynamicTableEnum;
......@@ -69,7 +70,7 @@ public class HGPZUtils {
List<HGPZ020A> dbPz020as = HGPZTools.HgPz020A.listByTable(dynamicTableEnum.getCode());
if (CollectionUtils.isNotEmpty(dbPz020as)) {
return dbPz020as.stream().map(item -> {
if (StringUtils.isEmpty(item.getViewSql())) {
if (StringUtils.isBlank(item.getViewSql())) {
return item.getFieldCode() + " as \"" + item.getAliasName() + "\"";
} else {
return item.getViewSql() + " as \"" + item.getAliasName() + "\"";
......@@ -90,6 +91,24 @@ public class HGPZUtils {
}
/**
* 设置动态列
*
* @param dynamicTableEnum 动态表
*/
public static List<String> listDynamicColumnAlias(DynamicTableEnum dynamicTableEnum) {
// 查询企业配置的字段,如果未配置使用默认字段
List<HGPZ020A> dbPz020as = HGPZTools.HgPz020A.listByTable(dynamicTableEnum.getCode());
if (CollectionUtils.isNotEmpty(dbPz020as)) {
return dbPz020as.stream().map(HGPZ020::getAliasName).collect(Collectors.toList());
}
List<HGPZ021> dbPz021s = HGPZTools.HgPz021.listDefaultByTable(dynamicTableEnum.getCode());
if (CollectionUtils.isNotEmpty(dbPz021s)) {
return dbPz021s.stream().map(HGPZ021::getAliasName).collect(Collectors.toList());
}
return new ArrayList<>();
}
/**
* 填充EiMetadata
*
* @param inInfo
......
......@@ -7,7 +7,7 @@ package com.baosight.hggp.hg.sc.enums;
public enum ProjectSourceEnum {
ENGINEERING("engineering", "工程设计图"),
FOREIGN("foreign", "生产制造图"),
FOREIGN("foreign", "工程制造图"),
SPARE("spare", "备件制造图"),
OTHER("other", "其他"),
;
......
......@@ -7,8 +7,6 @@ import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.pz.enums.DynamicTableEnum;
import com.baosight.hggp.hg.pz.utils.HGPZUtils;
import com.baosight.hggp.hg.sc.constant.HgScSqlConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC001A;
......@@ -68,11 +66,7 @@ public class ServiceHGSC001 extends ServiceBase {
@OperationLogAnnotation(operModul = "项目立项", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
// 设置动态列
HGPZUtils.HgPz020.buildDynamicColumn(inInfo, DynamicTableEnum.HGSC001);
inInfo = super.query(inInfo, HGSC001.QUERY, new HGSC001());
// 根据结果集填充eiMetadata
HGPZUtils.HgPz020.buildEiMetaData(inInfo, HGSC001.class);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
......
......@@ -5,13 +5,18 @@ import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW016;
import com.baosight.hggp.hg.sc.domain.HGSC010;
import com.baosight.hggp.hg.sc.domain.HGSC010A;
import com.baosight.hggp.hg.sc.domain.HGSC010B;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -144,4 +149,25 @@ public class ServiceHGSC010 extends ServiceEPBase {
}
return inInfo;
}
@OperationLogAnnotation(operModul = "委外加工",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGSC010."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName", "contractDate", "contractCode", "supCode", "supName"
,"userId", "userName", "subStatus","depositStatus","outStatus"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGSC010());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("subStatus", "hggp.hpkc.submitStatus");
put("depositStatus", "hggp.hgsc.depositStatus");
put("outStatus", "hggp.hgsc.outStatus");
}};
String codeSetCode = "CODESET_CODE in ('hggp.hpkc.submitStatus','hggp.hgsc.depositStatus','hggp.hgsc.outStatus')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......@@ -238,8 +238,7 @@
<select id="query" resultClass="com.baosight.hggp.hg.sc.domain.HGSC001">
SELECT
<isEmpty property="dynamicColumn"><include refid="column"/></isEmpty>
<isNotEmpty property="dynamicColumn">$dynamicColumn$</isNotEmpty>
<include refid="column"/>
FROM ${hggpSchema}.HGSC001 WHERE 1=1
<include refid="customCondition"/>
<include refid="orderBy"/>
......
......@@ -26,6 +26,10 @@ public class HgWdSqlConstant {
public static final String QUERY_ALL = "HGWD001.queryAll";
// 查询子节点
public static final String QUERY_FILE_CHILD = "HGWD001.queryFileChild";
// 查询子节点
public static final String QUERY_CHILDREN = "HGWD001.queryChildren";
// 查询项目来源
public static final String QUERY_PROJECT_SOURCE = "HGWD001.queryProjectSource";
public static final String UPDATE_FILE_PATH = "HGWD001.updateFilePath";
}
......
......@@ -9,6 +9,7 @@ import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.enums.ProjectSourceEnum;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.wd.constant.HgWdConstant;
import com.baosight.hggp.hg.wd.constant.HgWdSqlConstant;
import com.baosight.hggp.hg.wd.domain.HGWD001;
import com.baosight.hggp.hg.wd.domain.HGWD003;
import com.baosight.hggp.hg.wd.domain.HGWD099;
......@@ -30,7 +31,12 @@ import com.baosight.xservices.xs.util.LoginUserDetails;
import org.apache.commons.lang.StringUtils;
import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
/**
......@@ -237,25 +243,46 @@ public class ServiceHGWD001D extends TreeService {
*/
public List queryTopNode(String parentId) {
List<Map> results = new ArrayList();
// 管理员不做限制
boolean isManager = HgWdUtils.HgWd009.isManager();
List<String> projectSources = isManager ? null : listTopNode();
// 项目来源小代码
List<Map> codesetMaps = CodeValueTools.getCodeValues("app.sc.projectSource");
if (CollectionUtils.isEmpty(codesetMaps)) {
return results;
}
for (Map codesetMap : codesetMaps) {
String label = MapUtils.getString(codesetMap, "value");
String id = MapUtils.getString(codesetMap, "value");
String text = MapUtils.getString(codesetMap, "label");
Map leafMap = buildLeaf(parentId, label, text, HgWdConstant.LeafType.P);
// 不是管理员,且不存在,且不是备件制造图就不显示
if (!isManager && !projectSources.contains(id) && !ProjectSourceEnum.SPARE.getCode().equals(id)) {
continue;
}
Map leafMap = buildLeaf(parentId, id, text, HgWdConstant.LeafType.P);
leafMap.put("type", "-1");
leafMap.put("leafLevel", "-1");
leafMap.put("filePath", text);
leafMap.put("leaf", 0);
results.add(leafMap);
}
// 设置叶子节点
setTreeNodeLeaf(results, true);
return results;
}
/**
* 查询顶级节点
*
* @return
*/
private List<String> listTopNode() {
// 查询有权限的顶级目录,管理员不做要求,并且项目是审核通过
Map queryMap = new HashMap();
queryMap.put("userId", UserSessionUtils.getUserId());
queryMap.put("projectStatusYs", HGConstant.ApprovalStatus.YS);
List<HGWD001> dbWd001s = dao.query(HgWdSqlConstant.HgWd001.QUERY_PROJECT_SOURCE, queryMap);
if (CollectionUtils.isEmpty(dbWd001s)) {
return new ArrayList<>();
}
return dbWd001s.stream().map(HGWD001::getProjectSource).collect(Collectors.toList());
}
/**
* 查询一级节点
*
* @param parentId
......@@ -263,15 +290,16 @@ public class ServiceHGWD001D extends TreeService {
* @return
*/
public List queryFirstNode(String parentId, String ename) {
boolean isAuth = !ProjectSourceEnum.SPARE.getCode().equals(parentId);
// SPARE:备件制造图不限制;非管理员仅查询自己有权限的项目
String userId = UserSessionUtils.getLoginName();
boolean isManager = HgWdUtils.HgWd009.isManager(userId);
boolean isSourceAuth = !ProjectSourceEnum.SPARE.getCode().equals(parentId);
List<Map> results = new ArrayList();
Map queryMap = new HashMap<>();
queryMap.put("ename", ename);
queryMap.put(HGSC001.FIELD_project_source, parentId);
queryMap.put(HGSC001.FIELD_approval_status, HGConstant.ApprovalStatus.YS);
// 非管理员仅查询自己有权限的项目
String userId = UserSessionUtils.getLoginName();
if (isAuth && !HgWdUtils.HgWd009.isManager(userId)) {
if (isSourceAuth && !isManager) {
queryMap.put("userId", userId);
}
List<HGSC001> dbSc001s = dao.query("HGSC101.query", queryMap);
......@@ -284,7 +312,7 @@ public class ServiceHGWD001D extends TreeService {
String text = dbSc001.getProjName() + "(" + dbSc001.getProjCode() + ")";
Map leafMap = buildLeaf(parentId, dbSc001.getProjCode(), text, HgWdConstant.LeafType.P);
int count = getChildCount(dbSc001.getProjCode());
int count = getChildCount(dbSc001.getProjCode(), isManager, isSourceAuth);
//Long count = hgwd003s.stream().filter(hgwd003 -> hgwd003.getFileId().equals(dbSc001.getProjCode())).count();
leafMap.put("projCode", dbSc001.getProjCode());
......@@ -293,7 +321,7 @@ public class ServiceHGWD001D extends TreeService {
leafMap.put("type", "1");
leafMap.put("leafLevel", "0");
leafMap.put("count", count);
leafMap.put("isAuth", isAuth ? "1" : "0");
leafMap.put("isAuth", isSourceAuth ? "1" : "0");
leafMap.put("filePath", ProjectSourceEnum.getByCode(parentId).getName()+"/"+text);
results.add(leafMap);
}
......@@ -315,24 +343,28 @@ public class ServiceHGWD001D extends TreeService {
String userId = UserSessionUtils.getLoginName();
// 查询项目来源
HGSC001 dbSc001 = HGSCTools.Hgsc001.getByCode(projCode);
// true:需要权限
// 备件制造图不需要授权,true:需要权限
boolean isSourceAuth = !ProjectSourceEnum.SPARE.getCode().equals(dbSc001.getProjectSource());
// 是否文档管理员
boolean isManager = HgWdUtils.HgWd009.isManager();
Map queryMap = new HashMap();
queryMap.put("parentId", parentId);
queryMap.put("ename", ename);
// 递归查询有权限的文件夹,管理员和备件制造图不限制
if (!isManager && isSourceAuth) {
queryMap.put("treeUserId", userId);
}
List<HGWD001> dbWd001s = dao.query(HGWD001.QUERY, queryMap);
if (CollectionUtils.isEmpty(dbWd001s)) {
return results;
}
// 是否文档管理员
boolean isManager = HgWdUtils.HgWd009.isManager();
List<String> fileIds = dbWd001s.stream().map(HGWD001::getFileId).distinct().collect(Collectors.toList());
// 查询目录授权人数
List<HGWD003> dbWd003s = HGWDTools.HgWd003.list(fileIds);
for (HGWD001 dbWd001 : dbWd001s) {
Map leafMap = buildLeaf(parentId, dbWd001.getFileId(), dbWd001.getFileName(), HgWdConstant.LeafType.C);
int count = getChildCount(dbWd001.getFileId());
int count = getChildCount(dbWd001.getFileId(), isManager, isSourceAuth);
leafMap.put("projCode", dbWd001.getProjCode());
leafMap.put("projName", dbWd001.getProjName());
leafMap.put("ename", dbWd001.getProjCode());
......@@ -401,9 +433,10 @@ public class ServiceHGWD001D extends TreeService {
* @param fileId 目录ID
* @return 节点数量
*/
public int getChildCount(String fileId){
List<Map> hgwd001List = HGWDTools.HgWd001.queryFileChild(fileId); //查询子级目录
List<String> childIds = Optional.ofNullable(hgwd001List).orElse(new ArrayList<>()).stream().map(o -> o.get("fileId").toString()).collect(Collectors.toList());
public int getChildCount(String fileId, boolean isManager, boolean isSourceAuth) {
List<HGWD001> hgwd001List = HgWdUtils.HgWd001.queryChildren(fileId, isManager, isSourceAuth); //查询子级目录
List<String> childIds = Optional.ofNullable(hgwd001List).orElse(new ArrayList<>()).stream()
.map(HGWD001::getFileId).collect(Collectors.toList());
// 已授权人员信息
List<HGWD003> dbWd003List = HGWDTools.HgWd003.list(childIds);
List<HGWD099> fWd099s = HGWDTools.HgWd099.queryByBiz("WD",childIds);
......
......@@ -17,6 +17,7 @@ import com.baosight.hggp.hg.wd.domain.HGWD001A;
import com.baosight.hggp.hg.wd.domain.HGWD099;
import com.baosight.hggp.hg.wd.tools.HGWDTools;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
......@@ -78,6 +79,7 @@ public class ServiceHGWD001F extends ServiceEPBase {
hgwd001.fromMap(resultRow);
hgwd001.setStatus(HgWdConstant.FileStatus.S_0);
if (wd001 == null){
AssertUtils.isEmpty(Collections.singleton(hgwd001), "项目编号不能为空");
String filePath = setFilePath(hgsc001,edcm01Map.get("app.sc.projectSource"));
hgwd001.setFilePath(filePath+"/"+hgwd001.getFileName());
}else {
......@@ -157,8 +159,8 @@ public class ServiceHGWD001F extends ServiceEPBase {
.filter(map -> !hgwd001.getFileId().equals(map.get(HGWD001.FIELD_FILE_ID)))
.map(map -> map.get(HGWD001.FIELD_FILE_ID).toString()).collect(Collectors.toList());
List<HGWD099> hgwd099List = HGWDTools.HgWd099.queryByBiz("WD",childFileIdList);
Map<String, List<HGWD099>> listMap = hgwd099List.stream().collect(Collectors.groupingBy(HGWD099::getBizId,Collectors.toList()));
int end = wd001out.getFilePath().length()+1;
Map<String, List<HGWD099>> listMap = Optional.ofNullable(hgwd099List).orElse(new ArrayList<>()).stream().collect(Collectors.groupingBy(HGWD099::getBizId,Collectors.toList()));
int end =wd001out ==null ? 0: wd001out.getFilePath().length()+1;
if (childList != null && childList.size() > 0) {
for (Map child : childList) {
HGWD001 childOut = new HGWD001();
......
......@@ -60,7 +60,7 @@ public class ServiceHGWD003B extends ServiceEPBase {
// 仅查询自己是项目经理的目录
String userId = UserSessionUtils.getLoginName();
if (!HgWdUtils.HgWd009.isManager(userId)) {
queryMap.put("managerUserId", userId);
queryMap.put("projectManagerUserId", userId);
}
inInfo = super.query(inInfo, HGWD001.QUERY, new HGWD001());
} catch (Exception e) {
......
......@@ -11,10 +11,12 @@ import com.baosight.hggp.hg.wd.domain.HGWD001A;
import com.baosight.hggp.hg.wd.domain.HGWD003;
import com.baosight.hggp.hg.wd.domain.HGWD099;
import com.baosight.hggp.hg.wd.tools.HGWDTools;
import com.baosight.hggp.hg.wd.utils.HgWdUtils;
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.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -22,10 +24,8 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import org.apache.commons.collections.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
/**
......@@ -62,22 +62,26 @@ public class ServiceHGWD099 extends ServiceEPBase {
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow =EiInfoUtils.getFirstRow(inInfo);
if (ObjectUtils.isNotBlank(queryRow.get(HGWD001.FIELD_PARENT_ID))){
List<Map> childList = HGWDTools.HgWd001.queryFileChild(queryRow.get(HGWD001.FIELD_PARENT_ID).toString());
if(childList == null){
return inInfo;
}
List<String> childFileIdList = Optional.of(childList).orElse(new ArrayList<>()).stream().map(map -> map.get(HGWD001.FIELD_FILE_ID).toString()).collect(Collectors.toList());
queryRow.put("bizIds",childFileIdList);
queryRow.remove(HGWD099.FIELD_BIZ_ID);
inInfo.getBlock(EiConstant.queryBlock).getRow(ACConstants.ROW_CODE_0).remove(HGWD001.FIELD_PARENT_ID);
inInfo = super.query(inInfo, HGWD099.QUERY, new HGWD099());
}
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String parentId = MapUtils.getString(queryRow, HGWD001.FIELD_PARENT_ID);
String projCode = MapUtils.getString(queryRow, HGWD001.FIELD_PROJ_CODE);
if (StringUtils.isBlank(parentId)) {
return inInfo;
}
// 查询子节点
List<HGWD001> children = HgWdUtils.HgWd001.queryChildren(parentId, projCode);
if (CollectionUtils.isEmpty(children)) {
return inInfo;
}
// 需要包含自身
queryRow.put("bizIds", children.stream().map(HGWD001::getFileId).collect(Collectors.toList()));
queryRow.remove(HGWD099.FIELD_BIZ_ID);
inInfo.getBlock(EiConstant.queryBlock).getRow(ACConstants.ROW_CODE_0).remove(HGWD001.FIELD_PARENT_ID);
inInfo = super.query(inInfo, HGWD099.QUERY, new HGWD099());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
return inInfo;
}
/**
......
......@@ -32,29 +32,12 @@
<sql id="condition">
AND DELETE_FLAG = 0
<!-- 仅查询审批通过的项目 -->
<include refid="HGXSDataAuth.authCondition"/>
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</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="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -82,18 +65,9 @@
<isNotEmpty prepend=" AND " property="fileName">
FILE_NAME LIKE CONCAT('%', #fileName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docVersion">
DOC_VERSION = #docVersion#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="releaseDate">
RELEASE_DATE = #releaseDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath">
FILE_PATH = #filePath#
</isNotEmpty>
......@@ -106,17 +80,27 @@
<isNotEmpty prepend=" AND " property="parentIds">
PARENT_ID IN <iterate close=")" open="(" conjunction="," property="parentIds">#parentIds[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="managerUserId">
EXISTS (SELECT FILE_ID FROM ${hggpSchema}.HGWD003 M WHERE T.FILE_ID = M.FILE_ID
AND M.USER_ID = #managerUserId#
<isNotEmpty prepend=" AND " property="projectManagerUserId">
EXISTS (SELECT FILE_ID FROM ${hggpSchema}.HGWD003 M WHERE M.DELETE_FLAG = 0
AND T.FILE_ID = M.FILE_ID AND M.USER_ID = #projectManagerUserId#
AND M.IS_PROJECT_MANAGER = 1
)
)
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userId" open="(" close=")">
EXISTS (SELECT FILE_ID FROM ${hggpSchema}.HGWD003 M WHERE T.FILE_ID = M.FILE_ID
AND M.USER_ID = #userId#
EXISTS (SELECT FILE_ID FROM ${hggpSchema}.HGWD003 M WHERE M.DELETE_FLAG = 0
AND T.FILE_ID = M.FILE_ID AND M.USER_ID = #userId#
) OR PROJECT_SOURCE = 'spare'
</isNotEmpty>
<isNotEmpty prepend=" AND " property="treeUserId" >
EXISTS (SELECT FILE_ID FROM ${hggpSchema}.HGWD003 M WHERE M.DELETE_FLAG = 0
AND M.USER_ID = #treeUserId#
AND FIND_IN_SET(M.FILE_ID, (SELECT ${hggpSchema}.queryWdTreeInfo(T.FILE_ID)))
)
</isNotEmpty>
<!-- 项目状态,2-审核通过 -->
<isNotEmpty prepend=" AND " property="projectStatusYs">
EXISTS (SELECT * FROM ${hggpSchema}.HGSC001 M WHERE T.PROJ_CODE = M.PROJ_CODE AND M.APPROVAL_STATUS = 2)
</isNotEmpty>
</sql>
<sql id="orderBy">
......@@ -145,6 +129,14 @@
<include refid="condition"/>
</select>
<select id="queryProjectSource" resultClass="com.baosight.hggp.hg.wd.domain.HGWD001">
SELECT
DISTINCT PROJECT_SOURCE as "projectSource"
FROM ${hggpSchema}.HGWD001 T
WHERE 1=1
<include refid="condition"/>
</select>
<!-- 更具父级节点统计 -->
<select id="countByParent" resultClass="java.util.HashMap">
SELECT PARENT_ID, COUNT(1) AS CNT
......@@ -344,6 +336,18 @@
order by CREATED_TIME asc
</select>
<!-- 查询字节点,包含自身 -->
<select id="queryChildren" resultClass="com.baosight.hggp.hg.wd.domain.HGWD001">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGWD001 T WHERE DELETE_FLAG = 0
AND FIND_IN_SET(FILE_ID, (SELECT ${hggpSchema}.queryWdTreeInfo(#parentId#)))
<isNotEmpty prepend=" AND " property="userId">
EXISTS (SELECT FILE_ID FROM ${hggpSchema}.HGWD003 M WHERE M.DELETE_FLAG = 0
AND M.FILE_ID = T.FILE_ID AND M.USER_ID = #userId#
)
</isNotEmpty>
</select>
<!--档库所有子节点树查询-->
<select id="queryFileChild" resultClass="java.util.HashMap">
SELECT
......
......@@ -229,6 +229,34 @@ public class HGWDTools {
List<Map> results = DaoBase.getInstance().query(HgWdSqlConstant.HgWd001.QUERY_FILE_CHILD, queryMap);
return CollectionUtils.isEmpty(results) ? null : results;
}
/**
* 查询有权限的子节点
*
* @param parentId
* @return
*/
public static List<HGWD001> queryChildrenByUser(String parentId) {
AssertUtils.isEmpty(parentId, "文件ID不能为空");
Map queryMap = new HashMap();
queryMap.put("parentId", parentId);
queryMap.put("userId", UserSessionUtils.getUserId());
return DaoBase.getInstance().query(HgWdSqlConstant.HgWd001.QUERY_CHILDREN, queryMap);
}
/**
* 查询所有的子节点
*
* @param parentId
* @return
*/
public static List<HGWD001> queryChildren(String parentId) {
AssertUtils.isEmpty(parentId, "文件ID不能为空");
Map queryMap = new HashMap();
queryMap.put("parentId", parentId);
return DaoBase.getInstance().query(HgWdSqlConstant.HgWd001.QUERY_CHILDREN, queryMap);
}
}
......
......@@ -9,6 +9,8 @@ import com.baosight.hggp.hg.wd.domain.HGWD003;
import com.baosight.hggp.hg.wd.tools.HGWDTools;
import com.baosight.hggp.util.StringUtils;
import java.util.List;
/**
* @author:songx
* @date:2024/9/23,14:57
......@@ -27,14 +29,21 @@ public class HgWdUtils {
/**
* 是否备件制造图
*
* @param fileId
* @param treeId
* @return
*/
public static boolean isSpare(String fileId) {
if (StringUtils.isBlank(fileId)) {
return false;
public static boolean isSpare(String treeId) {
if (ProjectSourceEnum.SPARE.getCode().equals(treeId)) {
return true;
}
HGWD001 dbWd001 = HGWDTools.HgWd001.get(fileId);
HGSC001 dbSc001 = HGSCTools.Hgsc001.getByCode(treeId);
if (dbSc001 != null) {
if (StringUtils.isBlank(dbSc001.getProjectSource())) {
return false;
}
return ProjectSourceEnum.SPARE.getCode().equals(dbSc001.getProjectSource());
}
HGWD001 dbWd001 = HGWDTools.HgWd001.get(treeId);
if (dbWd001 == null || StringUtils.isBlank(dbWd001.getProjectSource())) {
return false;
}
......@@ -61,6 +70,41 @@ public class HgWdUtils {
}
return ProjectSourceEnum.SPARE.getCode().equals(dbSc001.getProjectSource());
}
/**
* 查询子节点
*
* @param parentId
* @param projCode
* @return
*/
public static List<HGWD001> queryChildren(String parentId, String projCode) {
// 管理员或者备件制造图查询所有子节点;其余查询当前节点有权限的子节点
boolean isManager = HgWdUtils.HgWd009.isManager();
boolean isSpare = HgWdUtils.HgWd001.isSpare(parentId, projCode);
if (isManager || isSpare) {
return HGWDTools.HgWd001.queryChildren(parentId);
} else {
return HGWDTools.HgWd001.queryChildrenByUser(parentId);
}
}
/**
* 查询子节点
*
* @param parentId
* @param isManager
* @param isSpare
* @return
*/
public static List<HGWD001> queryChildren(String parentId, boolean isManager, boolean isSpare) {
// 管理员或者备件制造图查询所有子节点;其余查询当前节点有权限的子节点
if (isManager || isSpare) {
return HGWDTools.HgWd001.queryChildren(parentId);
} else {
return HGWDTools.HgWd001.queryChildrenByUser(parentId);
}
}
}
......
......@@ -5,7 +5,9 @@ import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW008;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC004;
......@@ -19,6 +21,7 @@ import com.baosight.hggp.hg.sb.domain.HGSB001;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001A;
import com.baosight.hggp.hg.yx.domain.HGYX002;
......@@ -398,4 +401,26 @@ public class ServiceHGYX001 extends ServiceEPBase {
}
return inInfo;
}
@OperationLogAnnotation(operModul = "销售发货",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGYX001."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName","projCode","projName","deliveryCode", "outboundCode"
,"consCode","consName","receCode","receName","receAddr","receUserPhone", "tranType", "numPlate"
,"consWhCode","consWhName","consAddr","consQuantity","consWeight","isContract","contractName","status"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGYX001());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("status", "hggp.hgyx.status");
put("isContract", "hggp.common.yesNo");
put("tranType", "hggp.hgyx.tranType");
}};
String codeSetCode = "CODESET_CODE in ('hggp.hgyx.status','hggp.common.yesNo','hggp.hgyx.tranType')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......@@ -5,6 +5,7 @@ import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
......@@ -13,6 +14,8 @@ import com.baosight.hggp.hg.kc.domain.HGKC004A;
import com.baosight.hggp.hg.sb.domain.HGSB001;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX002;
import com.baosight.hggp.hg.yx.domain.HGYX002A;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
......@@ -27,10 +30,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @author LiuYang
......@@ -296,4 +296,23 @@ public class ServiceHGYX002 extends ServiceEPBase {
return inInfo;
}
@OperationLogAnnotation(operModul = "销售退货",operType = "导出",operDesc = "导出操作")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGYX001."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final List<String> list = new ArrayList<>(
Arrays.asList("projCode","projName","returnCode", "deliveryCode","consCode","consName",
"receCode","receName","receUserPhone","receUserPhone", "companyCode","companyName"
,"returnQuantity","returnWeight","status"
));
inEiInfo = ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGYX002());
List<Map> rows = inEiInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> hashMap = new HashMap<String, Object>(){{
put("status", "hggp.hgyx.status");
}};
String codeSetCode = "CODESET_CODE in ('hggp.hgyx.status')";
inEiInfo.getBlock(EiConstant.resultBlock).setRows(Iplat4jTools.EdCm01.initResultRows(rows, hashMap, codeSetCode));
return inEiInfo;
}
}
......@@ -71,7 +71,7 @@
CONS_WEIGHT as "consWeight", <!-- 发货重量 -->
STATUS as "status", <!-- 审批状态 0-未审核,1-已审核 -->
IS_CONTRACT as "isContract", <!-- 是否完成 -->
CONTRACT_NAME as "contractName"
CONTRACT_NAME as "contractName" <!-- 扣款方名 -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
......@@ -171,6 +171,9 @@
<isNotEmpty prepend=" AND " property="isContract">
IS_CONTRACT = #isContract#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME like concat('%',#contractName#,'%')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HGYX001">
......
......@@ -135,7 +135,7 @@
RECE_NAME LIKE CONCAT('%',#receName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receUserPhone">
RECE_USER_PHONE = #receUserPhone#
RECE_USER_PHONE LIKE CONCAT('%',#receUserPhone#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnQuantity">
RETURN_QUANTITY = #returnQuantity#
......
......@@ -3,7 +3,6 @@ $(function () {
var projCodeBox = __eiInfo.getBlock("projRecordByRole_block_id").getMappedRows();
IPLATUI.EFGrid = {
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
pageable: {
pageSize: 20,
pageSizes: [20, 50, 70, 100],
......@@ -72,6 +71,20 @@ $(function () {
}
}
],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "采购计划_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGCG001",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
beforeEdit: function (e) {
let item = e.model;
//只有生成的不能编辑
......
......@@ -8,14 +8,14 @@
<EF:EFPage title="采购计划">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker cname="计划日期" blockId="inqu_status" ename="planDate" row="0" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="计划单号" blockId="inqu_status" ename="planNo" row="0" colWidth="3"/>
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect>
<EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3" placeholder="模糊查询项目名称"/>
<EF:EFDatePicker cname="计划日期" blockId="inqu_status" ename="planDate" row="0" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="计划单号" blockId="inqu_status" ename="planNo" row="0" colWidth="3"/>
<EF:EFSelect cname="状态" blockId="inqu_status" ename="status" row="0" colWidth="3" optionLabel="全部"
defultValue="">
<EF:EFCodeOption codeName="hggp.hgcg.planStatus" condition="ITEM_CODE IN ('0', '2', '4')"/>
......@@ -32,9 +32,9 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center" sort="false"/>
<EF:EFComboColumn ename="source" cname="数据来源" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="hggp.hpcg.receiveSource"/>
</EF:EFComboColumn>
......
......@@ -5,7 +5,6 @@ $(function () {
IPLATUI.EFGrid = {
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
pageable: {
pageSize: 20,
pageSizes: [20, 50, 70, 100],
......@@ -114,6 +113,20 @@ $(function () {
}
}
],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "采购合同_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGCG002",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
beforeEdit: function (e) {
let item = e.model;
if(item.status != '0'){
......
......@@ -8,6 +8,11 @@
<EF:EFPage title="采购合同">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect>
<EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3" placeholder="模糊查询项目名称"/>
<EF:EFDatePicker cname="合同日期" blockId="inqu_status" ename="contractDate" row="0" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="合同号" blockId="inqu_status" ename="contractNo" row="0" colWidth="3"/>
......@@ -16,30 +21,29 @@
defultValue="">
<EF:EFCodeOption codeName="hggp.hgcg.contractStatus" condition="ITEM_CODE IN ('0','2','4','5')"/>
</EF:EFSelect>
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect>
<EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3" placeholder="模糊查询项目名称"/>
<EF:EFSelect cname="供应商名称" blockId="inqu_status" ename="supCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="sup_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="创建时间(从)" endCname="至" blockId="inqu_status"
startName="createdTimeFrom" endName="createdTimeTo" row="0" role="datetime"
format="yyyy-MM-dd HH:mm:ss" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFSelect cname="采购员" blockId="inqu_status" ename="purUserId" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="user_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFSelect cname="数据来源" blockId="inqu_status" ename="source" row="0" colWidth="3" optionLabel="全部"
defultValue="">
<EF:EFCodeOption codeName="hggp.hpcg.receiveSource"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="创建时间(从)" endCname="至" blockId="inqu_status"
startName="createdTimeFrom" endName="createdTimeTo" row="0" role="datetime"
format="yyyy-MM-dd HH:mm:ss" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" height="65vh">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" height="65vh" sort="all">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="110" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="110" align="center" sort="false"/>
<EF:EFComboColumn ename="source" cname="数据来源" enable="false" width="80" align="center" defaultValue="1">
<EF:EFCodeOption codeName="hggp.hpcg.receiveSource"/>
</EF:EFComboColumn>
......
......@@ -4,7 +4,6 @@ $(function () {
var projCodeBox = __eiInfo.getBlock("projRecordByRole_block_id").getMappedRows();
IPLATUI.EFGrid = {
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
pageable: {
pageSize: 20,
pageSizes: [20, 50, 70, 100],
......@@ -108,6 +107,20 @@ $(function () {
}
}
],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "采购收货_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGCG003",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
beforeEdit: function (e) {
let item = e.model;
//只有合同生成的不能编辑
......
......@@ -37,9 +37,9 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" copyToAdd="false" height="63vh">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" copyToAdd="false" height="63vh" sort="all">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center" sort="false"/>
<EF:EFComboColumn ename="source" cname="数据来源" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="hggp.hpcg.receiveSource"/>
</EF:EFComboColumn>
......
......@@ -39,6 +39,20 @@ $(function () {
return currShortDate();
}
}],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "询价管理_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGCG005",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
......
......@@ -21,8 +21,15 @@
startName="inquiryDateFrom" endName="inquiryDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
<EF:EFInput cname="询价单号" ename="inqu_status-0-inquiryNumber" colWidth="3"/>
<EF:EFInput cname="询价人" ename="inqu_status-0-inquiryPerson" colWidth="3"/>
<EF:EFInput cname="供应商名称" ename="inqu_status-0-supplierName" colWidth="3"/>
<EF:EFSelect cname="提交状态" blockId="inqu_status" ename="inquiryType" row="0" colWidth="3" optionLabel="全部" defultValue="">
<EF:EFCodeOption codeName="hggp.hgcg.inquiryType"/>
</EF:EFSelect>
<EF:EFSelect cname="提交状态" blockId="inqu_status" ename="proApplyStatus" row="0" colWidth="3" optionLabel="全部" defultValue="">
<EF:EFCodeOption codeName="hggp.hgxt.proApplyStatus"/>
</EF:EFSelect>
</div>
<%-- <div class="row">--%>
<%-- <EF:EFInput cname="产品名称" ename="inqu_status-0-inquiryPerson" colWidth="3"/>--%>
......@@ -32,9 +39,9 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<EF:EFColumn ename="id" primaryKey="true" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="130" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="130" align="center" sort="false"/>
<EF:EFColumn ename="inquiryDate" cname="询价日期" align="center" width="150" readonly="true" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="inquiryNumber" cname="询价单号" enable="false" width="130" align="center" />
......
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
$("#QUERY").on("click", query);
$("#QUERY_MORE").on("click",function (){
grush.queryMore(68)
})
......@@ -14,17 +13,20 @@ $(function() {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">合同详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template;
}
}
],
columns: [{
field: "operator",
title: "操作",
template: function (item) {
if (CommonUtils.isBlank(item.id) || item.id === "0") {
return "";
}
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">合同详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template;
}
}],
exportGrid: {
beforeExport: function (gridInstance) {
var validator1 = IPLAT.Validator({
......
......@@ -41,10 +41,23 @@ $(function() {
return queryInfo;
},
init: function (e, options) {
console.log(e);
console.log("项目编号:"+e);
},
}],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "签证单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGCW004",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
],
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
......@@ -199,9 +212,7 @@ function deleteFunc() {
});
}
}
columns:[
]
function switchRow() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
......
......@@ -23,6 +23,7 @@
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="主合同名称" ename="contractName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="项目部位" ename="projactDetail" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="审批状态" ename="inqu_status-0-reviewStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
......@@ -31,9 +32,9 @@
</EF:EFRegion>
<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" sort="all">
<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="100" align="center" sort="false"/>
<EF:EFColumn ename="companyCode" cname="所属公司" hidden="true"/>
<EF:EFColumn ename="companyName" cname="所属公司" width="120" enable="false" readonly="true" align="center"/>
<EF:EFPopupColumn ename="projCode" cname="项目编号" width="200"
......
......@@ -54,9 +54,21 @@ $(function() {
defaultValue: function (e, options) {
return currDate()
},
}
],
}],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "扣款单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGCW005",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
......
......@@ -32,9 +32,9 @@
</EF:EFRegion>
<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" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center" sort="false"/>
<EF:EFColumn ename="companyName" cname="所属公司" width="120" enable="false" readonly="true" align="center"/>
<EF:EFPopupColumn ename="projCode" cname="项目编号" width="200"
serviceName="HGCW002" methodName="projectComboBox"
......
......@@ -62,6 +62,20 @@ $(function() {
return row["inventCode"];
}
}],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "扣款单明细_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGCW005A",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
......
......@@ -14,7 +14,7 @@
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="扣款单明细s">
<EF:EFPage title="扣款单明细">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
......@@ -24,12 +24,14 @@
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" readonly="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" cname="收货方" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="inventName" cname="存货名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="spec" cname="规格" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="parentId" cname="上级ID" type="hidden" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" autoBind="true" queryMethod="query">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" autoBind="true" queryMethod="query" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="companyCode" enable="true" cname="公司名称" width="200" align="center"
filter="contains" readonly="true" required="true">
......
......@@ -21,8 +21,21 @@ $(function() {
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template;
}
}
],
}],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "租赁合同_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGCW006",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (e) {
$("#BTN_INSERT").on("click",addFunc);
$("#BTN_UPDATE").on("click",updateFunc);
......
......@@ -23,6 +23,10 @@
</EF:EFDateSpan>
<EF:EFInput cname="甲方名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="乙方名称" ename="partyB" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="合同状态" ename="inqu_status-0-contractStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.contractStatus"/>
</EF:EFSelect>
<EF:EFSelect cname="审批状态" ename="inqu_status-0-reviewStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
......@@ -31,9 +35,9 @@
</EF:EFRegion>
<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" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="200" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="center" sort="false"/>
<EF:EFColumn ename="companyName" cname="所属公司" align="center" enable="false"/>
<EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/>
<EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/>
......
......@@ -17,8 +17,21 @@ $(function() {
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template;
}
}
],
}],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "结算单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGCW008",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (e) {
$("#BTN_INSERT").on("click",addFunc);
$("#BTN_UPDATE").on("click",updateFunc);
......
......@@ -34,9 +34,9 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="single row">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="single row" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="170" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="170" align="center" sort="false"/>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="80" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false">
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
......
......@@ -46,6 +46,20 @@ $(function() {
}
}
],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "销售开票_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGCW010",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (grid) {
//此grid对象
$("#SELECT_BILL").on("click",addFunc); //结算单
......
......@@ -27,6 +27,7 @@
<EF:EFSelect cname="分支单位" ename="inqu_status-0-branchUnit" colWidth="3" filter="contains">
<EF:EFOptions blockId="customer1_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput cname="来源单号" ename="settlementNumber" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊来源单号"/>
<EF:EFSelect cname="票据类型" ename="inqu_status-0-billTybe" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.billTybe"/>
......@@ -45,9 +46,9 @@
</EF:EFRegion>
<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" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center" sort="false"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......
......@@ -73,6 +73,20 @@ $(function() {
return kendo.format("{0:C2}",parseFloat(item.thisSettlementTax));
}
}],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "采购收票_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGCW012",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (grid) {
$("#SELECT_BILL").on("click",addFunc);
//$("#BTN_UPDATE").on("click",updateFunc);
......
......@@ -14,18 +14,22 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="收票日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="供应商名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊供应商名称"/>
<%--<EF:EFInput cname="票据类型" ename="billTybe" blockId="inqu_status" row="0" colWidth="3" />--%>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" colWidth="3" placeholder="模糊项目名称"/>
<EF:EFInput blockId="inqu_status" row="0" ename="contractNo" cname="合同号" colWidth="3" placeholder="模糊合同号"/>
<EF:EFInput blockId="inqu_status" row="0" ename="partyA" cname="供应商名称" colWidth="3" placeholder="模糊供应商名称"/>
<EF:EFDateSpan blockId="inqu_status" row="0" startCname="收票日期(从)" endCname="至"
startName="receiveDateFrom" endName="receiveDateTo" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true"/>
<EF:EFDateSpan blockId="inqu_status" row="0" startCname="开票日期(从)" endCname="至"
startName="signingDateFrom" endName="signingDateTo" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true"/>
<EF:EFInput cname="来源单号" ename="settlementNumber" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊来源单号"/>
<EF:EFInput cname="收票单号" ename="invoiceCode" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊收票单号"/>
<EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊发票号"/>
<EF:EFSelect cname="票据类型" ename="inqu_status-0-billTybe" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.billTybe"/>
</EF:EFSelect>
<EF:EFInput cname="收票单号" ename="invoiceCode" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊查询收票单号"/>
<EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊发票号"/>
<EF:EFSelect cname="审核状态" ename="inqu_status-0-billState" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
......@@ -34,9 +38,9 @@
</EF:EFRegion>
<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" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center" sort="false"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......@@ -60,7 +64,6 @@
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="invoiceCode" cname="收票单号" enable="false" width="120" align="center"/>
<%--<EF:EFColumn ename="partyA" cname="供应商名称" width="220" enable="false" readonly="true" align="center"/>--%>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="200" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center" required="true" defaultValue="1"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" >
......
......@@ -21,8 +21,21 @@ $(function() {
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template;
}
}
],
}],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "收款单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGCW014",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (grid) {
$("#BTN_CHOICE").on("click",choiceFunc);
$("#BTN_UPDATE").on("click",updateFunc);
......
......@@ -20,17 +20,23 @@
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="客户名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊查询客户"/>
<EF:EFInput cname="来源单号" ename="contractNumber" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊来源单号"/>
<EF:EFInput cname="收款单号" ename="incomeNumber" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊收款单号"/>
<EF:EFSelect cname="核销状态" ename="inqu_status-0-cancelStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.cancelStatus"/>
</EF:EFSelect>
<EF:EFSelect cname="审批状态" ename="inqu_status-0-reviewStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<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" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center" sort="false"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......@@ -40,8 +46,7 @@
</EF:EFComboColumn>
<EF:EFComboColumn ename="partyA" cname="客户名称" width="120" align="left" defaultValue=""
filter="contains" readonly="true">
<EF:EFOptions blockId="customer_record_block_id"
valueField="textField" textField="textField"/>
<EF:EFOptions blockId="customer_record_block_id" valueField="textField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="projCode" cname="项目名称" width="120" align="left" defaultValue=""
filter="contains" readonly="true">
......
......@@ -56,6 +56,20 @@ $(function() {
}
}
],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "付款单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGCW016",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (grid) {
$("#BTN_CHOICE").on("click",choiceFunc);
$("#BTN_UPDATE").on("click",updateFunc);
......
......@@ -20,17 +20,23 @@
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="供应商名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊查询供应商"/>
<EF:EFInput cname="来源单号" ename="contractNumber" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊来源单号"/>
<EF:EFInput cname="付款单号" ename="incomeNumber" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊付款单号"/>
<EF:EFSelect cname="核销状态" ename="inqu_status-0-cancelStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.cancelStatus"/>
</EF:EFSelect>
<EF:EFSelect cname="审核状态" ename="inqu_status-0-reviewStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<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" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center" sort="false"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......
......@@ -2,7 +2,6 @@ $(function () {
IPLATUI.EFGrid = {
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
pageable: {
pageSize: 20,
pageSizes: [20, 50, 70, 100],
......@@ -29,6 +28,20 @@ $(function () {
}
}
],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "采购入库_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGKC001",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
beforeEdit: function (e) {
let item = e.model;
if(item.submitStatus != '0'){
......
......@@ -8,34 +8,34 @@
<EF:EFPage title="采购入库">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect>
<EF:EFDatePicker cname="入库日期" blockId="inqu_status" ename="receiveDate" row="0" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="入库单号" blockId="inqu_status" ename="depositNo" row="0" colWidth="3"/>
<EF:EFInput cname="收货单号" blockId="inqu_status" ename="receiveNo" row="0" colWidth="3"/>
<EF:EFSelect cname="状态" blockId="inqu_status" ename="status" row="0" colWidth="3" optionLabel="全部"
defultValue="">
<EF:EFCodeOption codeName="hggp.hgcg.receiveStatus"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
<EF:EFSelect cname="仓库名称" ename="inqu_status-0-whCode" colWidth="3" filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="存货编号" blockId="inqu_status" ename="inventCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="" template="[#=valueField#]#=textField#">
<EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput cname="存货名称" blockId="inqu_status" ename="inventName" row="0" colWidth="3"/>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains" template="[#=valueField#]#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_type_box_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<%-- <EF:EFSelect cname="规格" ename="inqu_status-0-spec" colWidth="3" filter="contains" optionLabel="全部"--%>
<%-- defultValue="">--%>
<%-- <EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>--%>
<%-- </EF:EFSelect>--%>
</div>
<div class="row">
<EF:EFInput cname="规格" blockId="inqu_status" ename="spec" row="0" colWidth="3"/>
<EF:EFSelect cname="状态" blockId="inqu_status" ename="status" row="0" colWidth="3" optionLabel="全部" defultValue="">
<EF:EFCodeOption codeName="hggp.hgcg.receiveStatus"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="创建时间(从)" endCname="至" blockId="inqu_status"
startName="createdTimeFrom" endName="createdTimeTo" row="0" role="datetime"
format="yyyy-MM-dd HH:mm:ss" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
......@@ -44,9 +44,9 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" width="80" enable="false" align="center" readonly="false"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" width="80" enable="false" align="center" readonly="false" sort="false"/>
<EF:EFColumn ename="companyCode" cname="公司编码" enable="false" width="100" align="center" />
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="depositDate" cname="入库日期" enable="true" width="100" align="center" editType="date"
......
......@@ -8,6 +8,20 @@ $(function () {
return showUserName(options.createdBy, options.createdName);
}
}],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "生产领料_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGKC002",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (grid) {
},
onSuccess: function (e) {
......
......@@ -47,7 +47,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" autoFit="true" isFloat="true" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" autoFit="true" isFloat="true" checkMode="row" sort="all">
<EF:EFColumn ename="id" cname="主键id" hidden="true"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" enable="false" width="90" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
......
......@@ -55,6 +55,20 @@ $(function () {
}
}
],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "生产入库单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGKC003",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (grid) {
// 此grid对象
grid.dataSource.bind("change", function(e) {
......
......@@ -9,20 +9,34 @@
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-companyName" cname="公司名称" colWidth="3"/>
<EF:EFDatePicker cname="单据日期" blockId="inqu_status" ename="depositDate" row="0" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-whName" cname="仓库名称" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-depositNo" cname="生产入库单号" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput ename="inqu_status-0-whName" cname="仓库名称" colWidth="3"/>
<EF:EFDatePicker cname="单据日期" blockId="inqu_status" ename="depositDate" row="0" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect cname="存货类型" blockId="inqu_status" ename="prdtType" row="0" colWidth="3" optionLabel="全部"
filter="contains">
<EF:EFOptions blockId="invent_type_box_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-processName" cname="工序" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-prdtCode" cname="物料编码" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput ename="inqu_status-0-prdtName" cname="物料名称" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-prdtSpec" cname="物料规格" colWidth="3"/>
<EF:EFSelect cname="提交状态" blockId="inqu_status" ename="submitStatus" row="0" colWidth="3" optionLabel="全部"
filter="contains">
<EF:EFCodeOption codeName="hggp.sc.productStatus" />
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" height="69vh">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" height="69vh" sort="all">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" width="80" enable="false" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" width="80" enable="false" align="center" sort="false"/>
<EF:EFColumn ename="qualityId" cname="质检单id" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="rectificationId" cname="整改通知单ID" enable="false" width="90" align="center"
hidden="true"/>
......
......@@ -22,6 +22,20 @@ $(function () {
return template;
}
},],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "销售出库单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGKC004",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (grid) {
},
onSave: function (e) {
......
......@@ -30,9 +30,9 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="210" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="210" align="center" sort="false"/>
<%-- <EF:EFComboColumn ename="companyCode" enable="true" cname="公司名称" width="110" align="center"--%>
<%-- filter="contains" readonly="true">--%>
<%-- <EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>--%>
......
......@@ -37,6 +37,20 @@ $(function() {
return currShortDate();
}
}],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "库存盘点单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGKC005",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (grid) {
// 此grid对象
grid.dataSource.bind("change", function(e) {
......
......@@ -52,9 +52,9 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" width="100" enable="false" readonly="false"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" width="100" enable="false" readonly="false" sort="false"/>
<EF:EFColumn ename="checkNo" cname="盘点单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
......
......@@ -70,6 +70,20 @@ $(function () {
refreshSelect(container, inInfo);
}
},],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "其他入库单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGKC006",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (grid) {
},
onSave: function (e) {
......
......@@ -10,6 +10,10 @@
<EF:EFPage title="其他入库单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFDatePicker cname="单据日期" ename="otherEnterDate" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="其他入库单号" ename="otherEnterNo" blockId="inqu_status" row="0" colWidth="3"/>
......@@ -23,6 +27,10 @@
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
</EF:EFSelect>
<EF:EFSelect cname="数据来源" ename="source" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hpkc.source"/>
</EF:EFSelect>
</div>
<%-- <div class="row">
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
......@@ -35,9 +43,9 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<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="100" align="center" sort="false"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......
......@@ -70,6 +70,20 @@ $(function () {
refreshSelect(container, inInfo);
}
},],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "其他出库单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGKC007",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (grid) {
},
onSave: function (e) {
......
......@@ -10,6 +10,10 @@
<EF:EFPage title="其他出库单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFDatePicker cname="单据日期" ename="otherOutDate" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="其他出库单号" ename="otherOutNo" blockId="inqu_status" row="0" colWidth="3"/>
......@@ -24,6 +28,10 @@
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
</EF:EFSelect>
<EF:EFSelect cname="数据来源" ename="source" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hpkc.source"/>
</EF:EFSelect>
</div>
<%-- <div class="row">
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
......@@ -36,9 +44,9 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<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="100" align="center" sort="false"/>
<EF:EFColumn ename="companyCode" cname="公司编码" width="120" align="center" enable="false"/>
<EF:EFColumn ename="companyName" cname="公司名称" width="120" align="center" enable="false"/>
<EF:EFColumn ename="otherOutDate" cname="单据日期" width="100" align="center" editType="date"
......
......@@ -133,6 +133,20 @@ $(function (){
}
}
],
exportGrid: {
beforeExport: function (gridInstance) {
return grush.settingValidator();
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "生产领料单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGKC008",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
......
......@@ -41,9 +41,9 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="180" align="left"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="180" align="left" sort="false"/>
<EF:EFComboColumn cname="类型" ename="receiveType" width="80" align="center" required="false" enable="false">
<EF:EFCodeOption codeName="hggp.receiveType"/>
</EF:EFComboColumn>
......
......@@ -33,7 +33,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="dateProc" cname="日期" enable="false" width="90" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="120" align="center"
......
......@@ -34,7 +34,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="130" align="center"/>
......
......@@ -28,7 +28,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="130" align="center"/>
......
......@@ -23,9 +23,9 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center" sort="false"/>
<%--<EF:EFComboColumn ename="companyCode" enable="true" cname="公司名称" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
......
......@@ -44,9 +44,9 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" sort="all">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center" sort="false"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=companyName#" itemTemplate="#=companyName#"
textField="companyName" valueField="companyCode"
......
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