Commit 408b7c82 by 宋祥

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

# Conflicts:
#	src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC001.java
#	src/main/webapp/HG/SC/HGSC001.js
#	src/main/webapp/HG/SC/HGSC001.jsp
parents 534bf304 e16de89e
package com.baosight.hggp.core.extapp.decheng.api;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baosight.hggp.util.HttpUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.StringUtils;
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.ioc.spring.PlatApplicationContext;
import lombok.extern.slf4j.Slf4j;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/11/3
* @description
*/
@Slf4j
public class SbOpenApi {
/**
* 部门管理-列表
*
* @param eiInfo 当前页
*/
public static JSONArray list(EiInfo eiInfo) throws IOException, InstantiationException,
IllegalAccessException {
Map headerMap = new HashMap();
headerMap.put("x-token", SbTokenApi.getToken());
String url = PlatApplicationContext.getProperty("hpjx.url");
String result = HttpUtils.post(url+"/S_HP_SB_01", headerMap, JSON.toJSONString(eiInfo),
HttpUtils.JSON_MEDIA_TYPE);
if (StringUtils.isBlank(result)) {
throw new PlatException("【鸿鹏】获取设备日志列表失败");
}
JSONObject resultJson = JSONObject.parseObject(result);
return resultJson.getJSONArray(EiConstant.resultBlock);
}
}
package com.baosight.hggp.core.extapp.decheng.api;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baosight.hggp.util.HttpUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext;
import lombok.extern.slf4j.Slf4j;
/**
* @author LiuYang
* @version 1.0 2024/11/3
* @description
*/
@Slf4j
public class SbTokenApi {
/**
* 获取TOKEN
*
* @return
*/
public static String getToken() {
String token = SbTokenApi.SingletonHolder.getToken();
if (StringUtils.isBlank(token)) {
throw new PlatException("hong pong token is null!");
}
return token;
}
/**
* 获取TOKEN(缓存)
*
* @return
*/
public static String getTokenCache() {
String token = SbTokenApi.SingletonHolder.TOKEN;
if (StringUtils.isNotBlank(token)) {
return token;
}
if (refreshToken()) {
return SbTokenApi.SingletonHolder.TOKEN;
} else {
throw new PlatException("hong pong token is null!");
}
}
/**
* 刷新TOKEN
*
* @return
*/
public static boolean refreshToken() {
return SbTokenApi.SingletonHolder.refresh();
}
/**
* 静态内部类用于初始化
*
* @author:songx
* @date:2022/5/9,15:48
*/
private static class SingletonHolder {
/**
* TOKEN
*/
private static String TOKEN = getToken();
/**
* 刷新TOKEN
*
* @return
*/
public static boolean refresh() {
String token = getToken();
if (StringUtils.isBlank(token)) {
return false;
}
TOKEN = token;
return true;
}
/**
* 获取TOKEN
*
* @return
*/
public static String getToken() {
try {
String param = JSON.toJSONString(buildValueJson("Q24022802","a123456"));
String url = PlatApplicationContext.getProperty("hpjx.url");
String result = HttpUtils.post(url+"/S_XS_105", param, HttpUtils.JSON_MEDIA_TYPE);
if (StringUtils.isBlank(result)) {
log.error("获取鸿鹏API的TOKEN失败,接口返回null");
return null;
}
JSONObject headerJson = JSONObject.parseObject(result);
Integer status = headerJson.getJSONObject("__sys__").getInteger("status");
if (status == null || status < 0) {
log.error("获取鸿鹏API的TOKEN失败,api msg:{}", headerJson.getInteger("msg"));
return null;
}
return headerJson.getString("x-token");
} catch (Exception e) {
log.error("获取鸿鹏API的TOKEN失败:{}", e.getMessage(), e);
}
return null;
}
/**
* 组装值的json
*
* @param loginName 登录名
* @param password 密码
* @return
*/
private static JSONObject buildValueJson(String loginName, Object password) {
JSONObject valueJson = new JSONObject();
valueJson.put("loginName", loginName);
valueJson.put("password", password);
return valueJson;
}
}
}
...@@ -66,7 +66,17 @@ public class Iplat4jTools { ...@@ -66,7 +66,17 @@ public class Iplat4jTools {
} }
return results; return results;
} }
public static List<Map<String, Object>> getByCodesetMap(String condition) {
AssertUtils.isEmpty(condition, "代码分类编码不能为空!");
Map<String, String> paramMap = new HashMap();
paramMap.put("condition", condition);
List<Map<String, Object>> results = DaoBase.getInstance().query("EDCM01.queryByCodesetMap", paramMap);
if (CollectionUtils.isEmpty(results)) {
throw new PlatException("分类编码[" + condition + "]未配置代码明细!");
}
return results;
}
} }
......
...@@ -199,11 +199,11 @@ public class HGCW002 extends DaoEPBase { ...@@ -199,11 +199,11 @@ public class HGCW002 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_TYPE); eiColumn = new EiColumn(FIELD_CONTRACT_TYPE);
eiColumn.setDescName("合同类型;1销售合同2劳务合同3补充协议4合同外用工"); eiColumn.setDescName("合同类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_CATEGORY); eiColumn = new EiColumn(FIELD_CONTRACT_CATEGORY);
eiColumn.setDescName("合同类别;1支出2收入"); eiColumn.setDescName("合同类别");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_A); eiColumn = new EiColumn(FIELD_PARTY_A);
...@@ -227,7 +227,7 @@ public class HGCW002 extends DaoEPBase { ...@@ -227,7 +227,7 @@ public class HGCW002 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_STATUS); eiColumn = new EiColumn(FIELD_CONTRACT_STATUS);
eiColumn.setDescName("合同状态;1草签2签约"); eiColumn.setDescName("合同状态");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_A_NAME); eiColumn = new EiColumn(FIELD_PARTY_A_NAME);
...@@ -267,11 +267,11 @@ public class HGCW002 extends DaoEPBase { ...@@ -267,11 +267,11 @@ public class HGCW002 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PAYMENT_METHOD); eiColumn = new EiColumn(FIELD_PAYMENT_METHOD);
eiColumn.setDescName("付款方式;1一次性付款2分期付款"); eiColumn.setDescName("付款方式");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRICING_METHOD); eiColumn = new EiColumn(FIELD_PRICING_METHOD);
eiColumn.setDescName("计价方式;1固定单价合同2固定总价合同"); eiColumn.setDescName("计价方式");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_POINTS); eiColumn = new EiColumn(FIELD_TAX_POINTS);
...@@ -304,7 +304,7 @@ public class HGCW002 extends DaoEPBase { ...@@ -304,7 +304,7 @@ public class HGCW002 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BALANCE_STATUS); eiColumn = new EiColumn(FIELD_BALANCE_STATUS);
eiColumn.setDescName("结算状态;1未结算2部分结算3最终结算"); eiColumn.setDescName("结算状态");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY); eiColumn = new EiColumn(FIELD_CREATED_BY);
......
...@@ -18,6 +18,7 @@ import com.baosight.hggp.hg.sc.domain.HGSC001; ...@@ -18,6 +18,7 @@ import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org; 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.*;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
...@@ -535,4 +536,15 @@ public class ServiceHGCW002 extends ServiceBase { ...@@ -535,4 +536,15 @@ public class ServiceHGCW002 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGCW002."+ACConstants.SQL_EXPORT, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName","projCode","projName","signingDate","contractNumber", "contractName","partyA"
,"partyB","branchUnit","mainContractNumber","contractContent","contractType", "contractCategory"
,"contractStatus", "reviewStatus","balanceStatus","totalContractPriceIncluding"
));
return ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_EXPORT, params, list, new HGCW002());
}
} }
...@@ -182,6 +182,136 @@ ...@@ -182,6 +182,136 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="conditionExport">
<include refid="HGXSDataAuth.authConditionA"/>
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
A.COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
A.PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
A.PROJ_NAME like ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
A.CONTRACT_NUMBER like ('%$contractNumber$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
A.CONTRACT_NAME like ('%$contractName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractType">
A.CONTRACT_TYPE = #contractType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCategory">
A.CONTRACT_CATEGORY = #contractCategory#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
A.PARTY_A like ('%$partyA$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyB">
A.PARTY_B like ('%$partyB$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyC">
A.PARTY_C = #partyC#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planStartDate">
A.PLAN_START_DATE = #planStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planEndDate">
A.PLAN_END_DATE = #planEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractStatus">
A.CONTRACT_STATUS = #contractStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyAName">
A.PARTY_A_NAME = #partyAName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyAPhoneNumber">
A.PARTY_A_PHONE_NUMBER = #partyAPhoneNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="alreadyName">
A.ALREADY_NAME = #alreadyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="alreadyPhoneNumber">
A.ALREADY_PHONE_NUMBER = #alreadyPhoneNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="engineeringAddress">
A.ENGINEERING_ADDRESS = #engineeringAddress#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateFrom">
A.SIGNING_DATE &gt;= REPLACE(#signingDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateTo">
A.SIGNING_DATE &lt;= REPLACE(#signingDateTo#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="mainContractNumber">
A.MAIN_CONTRACT_NUMBER like ('%$mainContractNumber$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractContent">
A.CONTRACT_CONTENT = #contractContent#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractingMethod">
A.CONTRACTING_METHOD = #contractingMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="paymentMethod">
A.PAYMENT_METHOD = #paymentMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pricingMethod">
A.PRICING_METHOD = #pricingMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
A.TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceExcluding">
A.TOTAL_CONTRACT_PRICE_EXCLUDING = #totalContractPriceExcluding#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="valueAddedTax">
A.VALUE_ADDED_TAX = #valueAddedTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
A.TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
A.REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="balanceStatus">
A.BALANCE_STATUS = #balanceStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.CREATED_NAME like ('%$createdName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes">
A.COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="branchUnit">
A.BRANCH_UNIT = #branchUnit#
</isNotEmpty>
</sql>
<sql id="customCondition"> <sql id="customCondition">
<isNotEmpty prepend=" AND " property="contractNumbers"> <isNotEmpty prepend=" AND " property="contractNumbers">
CONTRACT_NUMBER IN <iterate close=")" open="(" conjunction="," property="contractNumbers">#contractNumbers[]#</iterate> CONTRACT_NUMBER IN <iterate close=")" open="(" conjunction="," property="contractNumbers">#contractNumbers[]#</iterate>
...@@ -573,4 +703,51 @@ ...@@ -573,4 +703,51 @@
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
<select id="export" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
A.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
A.COMPANY_NAME as "companyName", <!-- 公司名称 -->
A.PROJ_CODE as "projCode", <!-- 项目编码 -->
A.PROJ_NAME as "projName", <!-- 项目名称 -->
A.CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
A.CONTRACT_NAME as "contractName", <!-- 合同名称 -->
D.ITEM_CNAME as "contractType", <!-- 合同类型;1销售合同2劳务合同3补充协议4合同外用工 -->
F.ITEM_CNAME as "contractCategory", <!-- 合同类别;1支出2收入 -->
A.PARTY_A as "partyA", <!-- 甲方名称 -->
A.PARTY_B as "partyB", <!-- 乙方名称 -->
A.PARTY_C as "partyC", <!-- 丙方名称 -->
A.PLAN_START_DATE as "planStartDate", <!-- 计划开工日期 -->
A.PLAN_END_DATE as "planEndDate", <!-- 计划竣工日期 -->
C.ITEM_CNAME as "contractStatus", <!-- 合同状态;1草签2签约 -->
A.PARTY_A_NAME as "partyAName", <!-- 甲方联系人姓名 -->
A.PARTY_A_PHONE_NUMBER as "partyAPhoneNumber", <!-- 甲方联系人电话 -->
A.ALREADY_NAME as "alreadyName", <!-- 已方联系人姓名 -->
A.ALREADY_PHONE_NUMBER as "alreadyPhoneNumber", <!-- 已方联系人电话 -->
A.ENGINEERING_ADDRESS as "engineeringAddress", <!-- 工程地址 -->
A.SIGNING_DATE as "signingDate", <!-- 签约日期 -->
B.CONTRACT_NAME as "mainContractNumber", <!-- 主合同号 -->
A.CONTRACT_CONTENT as "contractContent", <!-- 合同内容 -->
A.CONTRACTING_METHOD as "contractingMethod", <!-- 承包方式 -->
A.PAYMENT_METHOD as "paymentMethod", <!-- 付款方式;1一次性付款2分期付款 -->
A.PRICING_METHOD as "pricingMethod", <!-- 计价方式;1固定单价合同2固定总价合同 -->
A.TAX_POINTS as "taxPoints", <!-- 税点 -->
A.TOTAL_CONTRACT_PRICE_EXCLUDING as "totalContractPriceExcluding", <!-- 合同总价(不含税) -->
A.VALUE_ADDED_TAX as "valueAddedTax", <!-- 税点 -->
A.TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 合同总价(含税) -->
G.ITEM_CNAME as "reviewStatus", <!-- 审核状态 -->
H.ITEM_CNAME as "balanceStatus", <!-- 结算状态;1未结算2部分结算3最终结算 -->
E.CUST_TYPE_NAME as "branchUnit"
FROM ${hggpSchema}.HGCW002 A
LEFT JOIN ${hggpSchema}.HGCW002 B ON A.CONTRACT_NUMBER = B.MAIN_CONTRACT_NUMBER
LEFT JOIN ${platSchema}.TEDCM01 C ON A.CONTRACT_STATUS = C.ITEM_CODE AND C.CODESET_CODE = 'hggp.cw.contractStatus'
LEFT JOIN ${platSchema}.TEDCM01 D ON A.CONTRACT_TYPE = D.ITEM_CODE AND D.CODESET_CODE = 'hggp.cw.contractType'
LEFT JOIN ${hggpSchema}.HGPZ001 E ON A.BRANCH_UNIT = E.CUST_TYPE
LEFT JOIN ${platSchema}.TEDCM01 F ON A.CONTRACT_CATEGORY = F.ITEM_CODE AND F.CODESET_CODE = 'hggp.cw.contractCategory'
LEFT JOIN ${platSchema}.TEDCM01 G ON A.REVIEW_STATUS = G.ITEM_CODE AND G.CODESET_CODE = 'hggp.cw.reviewStatus'
LEFT JOIN ${platSchema}.TEDCM01 H ON A.BALANCE_STATUS = H.ITEM_CODE AND H.CODESET_CODE = 'hggp.cw.balanceStatus'
WHERE 1=1
<include refid="conditionExport"/>
ORDER BY A.ID DESC
</select>
</sqlMap> </sqlMap>
...@@ -47,11 +47,11 @@ public class HGSB010 extends DaoEPBase { ...@@ -47,11 +47,11 @@ public class HGSB010 extends DaoEPBase {
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/ public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/ public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String QUERY = "HPSB002.query"; public static final String QUERY = "HGSB010.query";
public static final String COUNT = "HPSB002.count"; public static final String COUNT = "HGSB010.count";
public static final String INSERT = "HPSB002.insert"; public static final String INSERT = "HGSB010.insert";
public static final String UPDATE = "HPSB002.update"; public static final String UPDATE = "HGSB010.update";
public static final String DELETE = "HPSB002.delete"; public static final String DELETE = "HGSB010.delete";
private Long id = new Long(0); /* ID*/ private Long id = new Long(0); /* ID*/
private String companyCode = " "; private String companyCode = " ";
......
package com.baosight.hggp.hg.sb.service; package com.baosight.hggp.hg.sb.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.extapp.decheng.api.SbOpenApi;
import com.baosight.hggp.hg.pz.domain.HGPZ009;
import com.baosight.hggp.hg.sb.domain.HGSB010;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.DateUtils; import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.io.IOException;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -162,4 +173,29 @@ public class ServiceHGSB010 extends ServiceEPBase { ...@@ -162,4 +173,29 @@ public class ServiceHGSB010 extends ServiceEPBase {
//inInfo.set("errerDate", listMap2); //inInfo.set("errerDate", listMap2);
//inInfo.set("errerTime", result); //inInfo.set("errerTime", result);
} }
public EiInfo add(EiInfo inInfo){
try {
Map paramMap = EiInfoUtils.getFirstRow(inInfo);
String accountCode = MapUtils.getString(paramMap, HGPZ009.FIELD_ACCOUNT_CODE);
JSONArray jsonArray = SbOpenApi.list(inInfo);
User user = HGXSTools.XsUser.getByLogin(paramMap.get(User.FIELD_LOGIN_NAME).toString());
List<Map> list = jsonArray.stream().map(o -> (Map) o).collect(Collectors.toList());
for (Map map:list) {
HGSB010 hgsb010 = new HGSB010();
hgsb010.fromMap(map);
if (user!=null){
hgsb010.setCompanyCode(user.getAccountCode());
}else {
hgsb010.setCompanyCode(accountCode);
}
dao.insert(HGSB010.INSERT, hgsb010);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + jsonArray.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "设备数据同步失败");
}
return inInfo;
}
} }
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
--> -->
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGSB010 (ID, <!-- ID --> INSERT INTO ${hggpSchema}.HGSB010 (
ACCOUNT_CODE, ACCOUNT_CODE,
FILE_NAME, <!-- 文件名 --> FILE_NAME, <!-- 文件名 -->
EQUIPMENT_TYPE, <!-- 设备状态 --> EQUIPMENT_TYPE, <!-- 设备状态 -->
...@@ -138,12 +138,9 @@ ...@@ -138,12 +138,9 @@
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 --> CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG <!-- 是否删除0.否1.是 --> DELETE_FLAG <!-- 是否删除0.否1.是 -->
) )
VALUES (#id#, #accountCode#, #fileName#, #equipmentType#, #equipmentCode#, #logInivalue#, #logValue#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#) VALUES (#companyCode#, #fileName#, #equipmentType#, #equipmentCode#, #logInivalue#, #logValue#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -176,13 +173,17 @@ ...@@ -176,13 +173,17 @@
</delete> </delete>
<select id="queryBySbStatus" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryBySbStatus" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select select distinct
a.DEVICE_CODE as "deviceCode", a.DEVICE_CODE as "deviceCode",
a.DEVICE_NAME as "deviceName", a.DEVICE_NAME as "deviceName",
a.DEVICE_MODEL as "deviceModel", a.DEVICE_MODEL as "deviceModel",
ifnull(c.LOG_VALUE, 0) as "status" ifnull(c.LOG_VALUE, 0) as "status"
from ${hggpSchema}.HGSB001 a from ${hggpSchema}.HGSB001 a
left join ( inner join ${platSchema}.TXSOG01 B ON A.ACCOUNT_CODE = B.ACCOUNT_CODE and a.GROUP_CODE = B.ORG_ID
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
INNER join (
select EQUIPMENT_CODE, LOG_VALUE select EQUIPMENT_CODE, LOG_VALUE
from ${hggpSchema}.HGSB010 where EQUIPMENT_TYPE = 'STARUS_TYPE' from ${hggpSchema}.HGSB010 where EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
...@@ -205,9 +206,6 @@ ...@@ -205,9 +206,6 @@
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode# a.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
a.FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceCode"> <isNotEmpty prepend=" AND " property="deviceCode">
a.DEVICE_CODE = #deviceCode# a.DEVICE_CODE = #deviceCode#
</isNotEmpty> </isNotEmpty>
...@@ -215,7 +213,7 @@ ...@@ -215,7 +213,7 @@
</select> </select>
<select id="queryBySbYes" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryBySbYes" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select select distinct
a.DEVICE_CODE as "deviceCode", a.DEVICE_CODE as "deviceCode",
a.DEVICE_MODEL as "deviceModel", a.DEVICE_MODEL as "deviceModel",
a.DATE as "date", a.DATE as "date",
...@@ -227,10 +225,13 @@ ...@@ -227,10 +225,13 @@
concat(substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 6 day), '-', ''), 5, 2), '', substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 6 day), '-', ''), 7, 2)) as DATE, concat(substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 6 day), '-', ''), 5, 2), '', substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 6 day), '-', ''), 7, 2)) as DATE,
ifnull(c.NUM, 0) NUM ifnull(c.NUM, 0) NUM
from ${hggpSchema}.HGSB001 a from ${hggpSchema}.HGSB001 a
left join ( join ${platSchema}.TXSOG01 B ON A.ACCOUNT_CODE = B.ACCOUNT_CODE and a.GROUP_CODE = B.ORG_ID
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
join (
select select
EQUIPMENT_CODE, EQUIPMENT_CODE, count(1) as NUM
count(1) as NUM
from ${hggpSchema}.HGSB010 from ${hggpSchema}.HGSB010
where EQUIPMENT_TYPE = 'STARUS_TYPE' where EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
...@@ -252,9 +253,6 @@ ...@@ -252,9 +253,6 @@
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode# a.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
a.FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceCode"> <isNotEmpty prepend=" AND " property="deviceCode">
a.DEVICE_CODE = #deviceCode# a.DEVICE_CODE = #deviceCode#
</isNotEmpty> </isNotEmpty>
...@@ -265,10 +263,13 @@ ...@@ -265,10 +263,13 @@
concat(substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 5 day), '-', ''), 5, 2), '', substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 5 day), '-', ''), 7, 2)) as DATE, concat(substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 5 day), '-', ''), 5, 2), '', substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 5 day), '-', ''), 7, 2)) as DATE,
ifnull(c.NUM, 0) NUM ifnull(c.NUM, 0) NUM
from ${hggpSchema}.HGSB001 a from ${hggpSchema}.HGSB001 a
left join ( join ${platSchema}.TXSOG01 B ON A.ACCOUNT_CODE = B.ACCOUNT_CODE and a.GROUP_CODE = B.ORG_ID
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
join (
select select
EQUIPMENT_CODE, EQUIPMENT_CODE, count(1) as NUM
count(1) as NUM
from ${hggpSchema}.HGSB010 from ${hggpSchema}.HGSB010
where EQUIPMENT_TYPE = 'STARUS_TYPE' where EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
...@@ -289,9 +290,6 @@ ...@@ -289,9 +290,6 @@
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode# a.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
a.FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceCode"> <isNotEmpty prepend=" AND " property="deviceCode">
a.DEVICE_CODE = #deviceCode# a.DEVICE_CODE = #deviceCode#
</isNotEmpty> </isNotEmpty>
...@@ -302,10 +300,13 @@ ...@@ -302,10 +300,13 @@
concat(substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 4 day), '-', ''), 5, 2), '', substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 4 day), '-', ''), 7, 2)) as DATE, concat(substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 4 day), '-', ''), 5, 2), '', substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 4 day), '-', ''), 7, 2)) as DATE,
ifnull(c.NUM, 0) NUM ifnull(c.NUM, 0) NUM
from ${hggpSchema}.HGSB001 a from ${hggpSchema}.HGSB001 a
left join ( join ${platSchema}.TXSOG01 B ON A.ACCOUNT_CODE = B.ACCOUNT_CODE and a.GROUP_CODE = B.ORG_ID
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
join (
select select
EQUIPMENT_CODE, EQUIPMENT_CODE, count(1) as NUM
count(1) as NUM
from ${hggpSchema}.HGSB010 from ${hggpSchema}.HGSB010
where EQUIPMENT_TYPE = 'STARUS_TYPE' where EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
...@@ -327,9 +328,6 @@ ...@@ -327,9 +328,6 @@
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode# a.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
a.FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceCode"> <isNotEmpty prepend=" AND " property="deviceCode">
a.DEVICE_CODE = #deviceCode# a.DEVICE_CODE = #deviceCode#
</isNotEmpty> </isNotEmpty>
...@@ -340,10 +338,13 @@ ...@@ -340,10 +338,13 @@
concat(substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 3 day), '-', ''), 5, 2), '', substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 3 day), '-', ''), 7, 2)) as DATE, concat(substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 3 day), '-', ''), 5, 2), '', substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 3 day), '-', ''), 7, 2)) as DATE,
ifnull(c.NUM, 0) NUM ifnull(c.NUM, 0) NUM
from ${hggpSchema}.HGSB001 a from ${hggpSchema}.HGSB001 a
left join ( join ${platSchema}.TXSOG01 B ON A.ACCOUNT_CODE = B.ACCOUNT_CODE and a.GROUP_CODE = B.ORG_ID
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
join (
select select
EQUIPMENT_CODE, EQUIPMENT_CODE, count(1) as NUM
count(1) as NUM
from ${hggpSchema}.HGSB010 from ${hggpSchema}.HGSB010
where EQUIPMENT_TYPE = 'STARUS_TYPE' where EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
...@@ -364,9 +365,6 @@ ...@@ -364,9 +365,6 @@
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode# a.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
a.FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceCode"> <isNotEmpty prepend=" AND " property="deviceCode">
a.DEVICE_CODE = #deviceCode# a.DEVICE_CODE = #deviceCode#
</isNotEmpty> </isNotEmpty>
...@@ -377,10 +375,13 @@ ...@@ -377,10 +375,13 @@
concat(substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 2 day), '-', ''), 5, 2), '', substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 2 day), '-', ''), 7, 2)) as DATE, concat(substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 2 day), '-', ''), 5, 2), '', substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 2 day), '-', ''), 7, 2)) as DATE,
ifnull(c.NUM, 0) NUM ifnull(c.NUM, 0) NUM
from ${hggpSchema}.HGSB001 a from ${hggpSchema}.HGSB001 a
left join ( join ${platSchema}.TXSOG01 B ON A.ACCOUNT_CODE = B.ACCOUNT_CODE and a.GROUP_CODE = B.ORG_ID
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
join (
select select
EQUIPMENT_CODE, EQUIPMENT_CODE, count(1) as NUM
count(1) as NUM
from ${hggpSchema}.HGSB010 from ${hggpSchema}.HGSB010
where EQUIPMENT_TYPE = 'STARUS_TYPE' where EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
...@@ -401,9 +402,6 @@ ...@@ -401,9 +402,6 @@
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode# a.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
a.FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceCode"> <isNotEmpty prepend=" AND " property="deviceCode">
a.DEVICE_CODE = #deviceCode# a.DEVICE_CODE = #deviceCode#
</isNotEmpty> </isNotEmpty>
...@@ -414,10 +412,13 @@ ...@@ -414,10 +412,13 @@
concat(substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 1 day), '-', ''), 5, 2), '', substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 1 day), '-', ''), 7, 2)) as DATE, concat(substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 1 day), '-', ''), 5, 2), '', substring(replace(date_sub(str_to_date(#date#, '%Y%m%d'), interval 1 day), '-', ''), 7, 2)) as DATE,
ifnull(c.NUM, 0) NUM ifnull(c.NUM, 0) NUM
from ${hggpSchema}.HGSB001 a from ${hggpSchema}.HGSB001 a
left join ( join ${platSchema}.TXSOG01 B ON A.ACCOUNT_CODE = B.ACCOUNT_CODE and a.GROUP_CODE = B.ORG_ID
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
join (
select select
EQUIPMENT_CODE, EQUIPMENT_CODE, count(1) as NUM
count(1) as NUM
from ${hggpSchema}.HGSB010 from ${hggpSchema}.HGSB010
where EQUIPMENT_TYPE = 'STARUS_TYPE' where EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
...@@ -438,9 +439,6 @@ ...@@ -438,9 +439,6 @@
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode# a.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
a.FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceCode"> <isNotEmpty prepend=" AND " property="deviceCode">
a.DEVICE_CODE = #deviceCode# a.DEVICE_CODE = #deviceCode#
</isNotEmpty> </isNotEmpty>
...@@ -451,10 +449,13 @@ ...@@ -451,10 +449,13 @@
right(replace(#date#, '-', ''), 4) as DATE, right(replace(#date#, '-', ''), 4) as DATE,
ifnull(c.NUM, 0) NUM ifnull(c.NUM, 0) NUM
from ${hggpSchema}.HGSB001 a from ${hggpSchema}.HGSB001 a
left join ( join ${platSchema}.TXSOG01 B ON A.ACCOUNT_CODE = B.ACCOUNT_CODE and a.GROUP_CODE = B.ORG_ID
<isNotEmpty prepend=" AND " property="factoryCode">
B.FACTORY_CODE = #factoryCode#
</isNotEmpty>
join (
select select
EQUIPMENT_CODE, EQUIPMENT_CODE, count(1) as NUM
count(1) as NUM
from ${hggpSchema}.HGSB010 from ${hggpSchema}.HGSB010
where EQUIPMENT_TYPE = 'STARUS_TYPE' where EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
...@@ -475,9 +476,6 @@ ...@@ -475,9 +476,6 @@
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode# a.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
a.FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceCode"> <isNotEmpty prepend=" AND " property="deviceCode">
a.DEVICE_CODE = #deviceCode# a.DEVICE_CODE = #deviceCode#
</isNotEmpty> </isNotEmpty>
......
...@@ -140,7 +140,7 @@ public class HGSC003 extends DaoEPBase { ...@@ -140,7 +140,7 @@ public class HGSC003 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_blueprint_status); eiColumn = new EiColumn(FIELD_blueprint_status);
eiColumn.setType("N"); eiColumn.setType("C");
eiColumn.setDescName("蓝图状态 0:停用,1:启用"); eiColumn.setDescName("蓝图状态 0:停用,1:启用");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
......
...@@ -160,8 +160,8 @@ public class HGSC004 extends DaoEPBase { ...@@ -160,8 +160,8 @@ public class HGSC004 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_material_status); eiColumn = new EiColumn(FIELD_material_status);
eiColumn.setType("N"); eiColumn.setType("C");
eiColumn.setScaleLength(0); //eiColumn.setScaleLength(0);
eiColumn.setFieldLength(4); eiColumn.setFieldLength(4);
eiColumn.setDescName("物料状态 0:未提交,1:部分提交,2:全部提交"); eiColumn.setDescName("物料状态 0:未提交,1:部分提交,2:全部提交");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
......
...@@ -307,7 +307,7 @@ public class HGSC004A extends DaoEPBase { ...@@ -307,7 +307,7 @@ public class HGSC004A extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_status); eiColumn = new EiColumn(FIELD_product_status);
eiColumn.setType("N"); eiColumn.setType("C");
eiColumn.setScaleLength(0); eiColumn.setScaleLength(0);
eiColumn.setFieldLength(4); eiColumn.setFieldLength(4);
eiColumn.setDescName("产品状态 0:未提交,1:已提交"); eiColumn.setDescName("产品状态 0:未提交,1:已提交");
...@@ -342,7 +342,7 @@ public class HGSC004A extends DaoEPBase { ...@@ -342,7 +342,7 @@ public class HGSC004A extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_approval_status); eiColumn = new EiColumn(FIELD_approval_status);
eiColumn.setType("N"); eiColumn.setType("C");
eiColumn.setScaleLength(0); eiColumn.setScaleLength(0);
eiColumn.setFieldLength(4); eiColumn.setFieldLength(4);
eiColumn.setDescName("审批状态\t0:待审;1:审核中;2:已审"); eiColumn.setDescName("审批状态\t0:待审;1:审核中;2:已审");
......
...@@ -354,7 +354,7 @@ public class HGSC007 extends DaoEPBase { ...@@ -354,7 +354,7 @@ public class HGSC007 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_created_time); eiColumn = new EiColumn(FIELD_created_time);
eiColumn.setDescName("创建时间"); eiColumn.setDescName("生产任务日期");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_updated_by); eiColumn = new EiColumn(FIELD_updated_by);
...@@ -374,7 +374,7 @@ public class HGSC007 extends DaoEPBase { ...@@ -374,7 +374,7 @@ public class HGSC007 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_length); eiColumn = new EiColumn(FIELD_length);
eiColumn.setType("N"); //eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12); eiColumn.setFieldLength(12);
eiColumn.setDescName("长"); eiColumn.setDescName("长");
......
...@@ -414,7 +414,7 @@ public class HGSC008 extends DaoEPBase { ...@@ -414,7 +414,7 @@ public class HGSC008 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_length); eiColumn = new EiColumn(FIELD_length);
eiColumn.setType("N"); //eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12); eiColumn.setFieldLength(12);
eiColumn.setDescName("长"); eiColumn.setDescName("长");
......
...@@ -6,6 +6,7 @@ import com.baosight.hggp.core.constant.CommonConstant; ...@@ -6,6 +6,7 @@ import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.pz.domain.HGPZ001; import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.pz.enums.DynamicTableEnum; import com.baosight.hggp.hg.pz.enums.DynamicTableEnum;
import com.baosight.hggp.hg.pz.utils.HGPZUtils; import com.baosight.hggp.hg.pz.utils.HGPZUtils;
...@@ -271,5 +272,16 @@ public class ServiceHGSC001 extends ServiceBase { ...@@ -271,5 +272,16 @@ public class ServiceHGSC001 extends ServiceBase {
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "项目立项", operType = "导出", operDesc = "导出记录")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGSC001."+ACConstants.SQL_EXPORT, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList( "companyName","projCode","projName","subcontract_name","genral_contract_name","branchUnit",
"projType","permissStartDate","startDate","endDate","projStatus","approvalStatus"
));
return ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_EXPORT, params, list, new HGSC001());
}
} }
...@@ -10,7 +10,9 @@ import com.baosight.hggp.hg.sc.domain.HGSC002; ...@@ -10,7 +10,9 @@ import com.baosight.hggp.hg.sc.domain.HGSC002;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.sc.util.HGSCUtil; import com.baosight.hggp.hg.sc.util.HGSCUtil;
import com.baosight.hggp.hg.xs.domain.Company; 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.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -133,5 +135,16 @@ public class ServiceHGSC002 extends ServiceBase { ...@@ -133,5 +135,16 @@ public class ServiceHGSC002 extends ServiceBase {
} }
@OperationLogAnnotation(operModul = "项目立项", operType = "导出", operDesc = "导出记录")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGSC002."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList( "companyName","projCode","projName","personDepName","personName","personPhone",
"personIdCard","createdName","createdTime"
));
return ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGSC002());
}
} }
package com.baosight.hggp.hg.sc.service; package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC002;
import com.baosight.hggp.hg.sc.domain.HGSC003; import com.baosight.hggp.hg.sc.domain.HGSC003;
import com.baosight.hggp.hg.sc.domain.HGSC099; import com.baosight.hggp.hg.sc.domain.HGSC099;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company; 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.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
...@@ -203,5 +207,16 @@ public class ServiceHGSC003 extends ServiceBase { ...@@ -203,5 +207,16 @@ public class ServiceHGSC003 extends ServiceBase {
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "蓝图清单", operType = "导出", operDesc = "导出记录")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGSC003."+ ACConstants.SQL_EXPORT, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList( "companyCode","companyName","blueprintCode","blueprintName","projCode","projName"
,"blueprintStatus","createdName","createdTime"
));
return ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_EXPORT, params, list, new HGSC003());
}
} }
...@@ -13,7 +13,9 @@ import com.baosight.hggp.hg.sc.domain.HGSC004; ...@@ -13,7 +13,9 @@ import com.baosight.hggp.hg.sc.domain.HGSC004;
import com.baosight.hggp.hg.sc.domain.HGSC004A; import com.baosight.hggp.hg.sc.domain.HGSC004A;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company; 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.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -209,5 +211,16 @@ public class ServiceHGSC004 extends ServiceBase { ...@@ -209,5 +211,16 @@ public class ServiceHGSC004 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "物料清单", operType = "导出", operDesc = "导出记录")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGSC004."+ ACConstants.SQL_EXPORT, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList( "companyCode","companyName","projCode","projName","blueprintCode","blueprintName"
,"materialStatus","createdName","createdTime"
));
return ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_EXPORT, params, list, new HGSC004());
}
} }
...@@ -15,12 +15,8 @@ import com.baosight.hggp.hg.sc.domain.HGSC004A; ...@@ -15,12 +15,8 @@ import com.baosight.hggp.hg.sc.domain.HGSC004A;
import com.baosight.hggp.hg.sc.domain.HGSC005; import com.baosight.hggp.hg.sc.domain.HGSC005;
import com.baosight.hggp.hg.sc.domain.HGSC005A; import com.baosight.hggp.hg.sc.domain.HGSC005A;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.*;
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.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -702,5 +698,17 @@ public class ServiceHGSC004A extends ServiceBase { ...@@ -702,5 +698,17 @@ public class ServiceHGSC004A extends ServiceBase {
} }
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "物料清单详情", operType = "导出", operDesc = "导出记录")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGSC004A."+ ACConstants.SQL_EXPORT, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList( "companyCode","companyName","projCode","projName","parentProdCode","parentProdName"
,"productCode", "productName","inventSource","spec", "length", "width", "thick", "quantity","singleWeight"
,"totalWeight", "approvalStatus","productStatus"
));
return ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_EXPORT, params, list, new HGSC004A());
}
} }
...@@ -4,10 +4,13 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; ...@@ -4,10 +4,13 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.sc.domain.HGSC004;
import com.baosight.hggp.hg.sc.domain.HGSC005; import com.baosight.hggp.hg.sc.domain.HGSC005;
import com.baosight.hggp.hg.sc.domain.HGSC005A; import com.baosight.hggp.hg.sc.domain.HGSC005A;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.*; 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.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -86,6 +89,15 @@ public class ServiceHGSC005 extends ServiceBase { ...@@ -86,6 +89,15 @@ public class ServiceHGSC005 extends ServiceBase {
} }
@OperationLogAnnotation(operModul = "生产计划", operType = "导出", operDesc = "导出记录")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGSC005."+ ACConstants.SQL_EXPORT, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList( "companyCode","companyName","projCode","projName","createdTime","planCode"
,"finishDate","finishRate","commitStatus"
));
return ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_EXPORT, params, list, new HGSC005());
}
} }
...@@ -8,22 +8,15 @@ import com.baosight.hggp.hg.sc.constant.HgScSqlConstant; ...@@ -8,22 +8,15 @@ import com.baosight.hggp.hg.sc.constant.HgScSqlConstant;
import com.baosight.hggp.hg.sc.domain.HGSC005; import com.baosight.hggp.hg.sc.domain.HGSC005;
import com.baosight.hggp.hg.sc.domain.HGSC005A; import com.baosight.hggp.hg.sc.domain.HGSC005A;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.*;
import com.baosight.hggp.util.DateUtil; import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Arrays; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/** /**
* @Author wwl * @Author wwl
...@@ -180,5 +173,16 @@ public class ServiceHGSC005A extends ServiceBase { ...@@ -180,5 +173,16 @@ public class ServiceHGSC005A extends ServiceBase {
String.format("生产计划已提交,不允许操作")); String.format("生产计划已提交,不允许操作"));
// AssertUtils.isEquals(hgsc005.getIsSchedule(), CommonConstant.YesNo.YES_1, "当前计划已排产,请手动调整计划!"); // AssertUtils.isEquals(hgsc005.getIsSchedule(), CommonConstant.YesNo.YES_1, "当前计划已排产,请手动调整计划!");
} }
@OperationLogAnnotation(operModul = "生产计划", operType = "导出", operDesc = "导出记录")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGSC005A."+ ACConstants.SQL_QUERY, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList( "companyCode","companyName","projCode","projName","productCode","productName"
,"processName","finishDate","planStartDate", "planEndDate","singleWeight", "totalWeight"
,"finishWeight","unfinishWeight","quantity","finishQuantity","unfinishQuantity"
));
return ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_QUERY, params, list, new HGSC005A());
}
} }
package com.baosight.hggp.hg.sc.service; package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.sc.domain.HGSC005;
import com.baosight.hggp.hg.sc.domain.HGSC006; import com.baosight.hggp.hg.sc.domain.HGSC006;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.ExcelUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.HashMap; import java.util.*;
import java.util.List;
import java.util.Map;
/** /**
...@@ -41,6 +44,14 @@ public class ServiceHGSC006 extends ServiceBase { ...@@ -41,6 +44,14 @@ public class ServiceHGSC006 extends ServiceBase {
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "生产订单", operType = "导出", operDesc = "导出记录")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGSC006."+ ACConstants.SQL_EXPORT, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList( "companyCode","companyName","projCode","projName","createdTime","orderCode","assignStatus"
));
return ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_EXPORT, params, list, new HGSC006());
}
} }
...@@ -13,7 +13,9 @@ import com.baosight.hggp.hg.sc.domain.HGSC007; ...@@ -13,7 +13,9 @@ import com.baosight.hggp.hg.sc.domain.HGSC007;
import com.baosight.hggp.hg.sc.domain.HGSC008; import com.baosight.hggp.hg.sc.domain.HGSC008;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.sc.util.HgScUtils; import com.baosight.hggp.hg.sc.util.HgScUtils;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.*; 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.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -21,10 +23,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase; ...@@ -21,10 +23,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Arrays; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -312,5 +311,17 @@ public class ServiceHGSC006A extends ServiceBase { ...@@ -312,5 +311,17 @@ public class ServiceHGSC006A extends ServiceBase {
inInfo.set("assignStatus", assignStatus); inInfo.set("assignStatus", assignStatus);
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "生产订单", operType = "导出", operDesc = "导出记录")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGSC006A."+ ACConstants.SQL_EXPORT, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList( "companyCode","companyName","projCode","projName","createdTime","orderCode","productCode"
,"productName", "processName", "planStartDate", "planEndDate", "singleWeight", "totalWeight"
, "assignWeight", "unassignWeight", "quantity", "assignQuantity", "unassignQuantity", "assignStatus"
));
return ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_EXPORT, params, list, new HGSC006A());
}
} }
...@@ -2,18 +2,22 @@ package com.baosight.hggp.hg.sc.service; ...@@ -2,18 +2,22 @@ package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.enums.OrgTypeEnum; import com.baosight.hggp.core.enums.OrgTypeEnum;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGSqlConstant; import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.sb.tools.HGSBTools; import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.sc.constant.HgScSqlConstant; import com.baosight.hggp.hg.sc.constant.HgScSqlConstant;
import com.baosight.hggp.hg.sc.domain.HGSC006;
import com.baosight.hggp.hg.sc.domain.HGSC007; import com.baosight.hggp.hg.sc.domain.HGSC007;
import com.baosight.hggp.hg.sc.util.HgScUtils; import com.baosight.hggp.hg.sc.util.HgScUtils;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Factory; import com.baosight.hggp.hg.xs.domain.Factory;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
...@@ -21,6 +25,7 @@ import com.baosight.iplat4j.core.ei.EiConstant; ...@@ -21,6 +25,7 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.service.soa.XServiceManager;
import com.baosight.xservices.xs.util.LoginUserDetails; import com.baosight.xservices.xs.util.LoginUserDetails;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -69,6 +74,7 @@ public class ServiceHGSC007 extends ServiceEPBase { ...@@ -69,6 +74,7 @@ public class ServiceHGSC007 extends ServiceEPBase {
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产任务", operType = "查询", operDesc = "初始化页面") @OperationLogAnnotation(operModul = "生产任务", operType = "查询", operDesc = "初始化页面")
@Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROCESS_CODE_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROCESS_CODE_BLOCK_ID));
...@@ -412,5 +418,16 @@ public class ServiceHGSC007 extends ServiceEPBase { ...@@ -412,5 +418,16 @@ public class ServiceHGSC007 extends ServiceEPBase {
return inInfo; return inInfo;
} }
}
@OperationLogAnnotation(operModul = "生产任务", operType = "导出", operDesc = "导出记录")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGSC007."+ ACConstants.SQL_EXPORT, EiInfoUtils.getFirstRow(inEiInfo));
final List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName", "projCode", "projName", "createdTime"
, "taskCode", "productCode", "productName", "processName", "groupName", "spec", "length"
, "singleWeight", "totalWeight", "finishWeight", "unfinishWeight"
, "quantity", "finishQuantity", "unfinishQuantity", "registerNum", "status"
));
return ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_EXPORT, params, list, new HGSC007());
}
}
\ No newline at end of file
...@@ -2,16 +2,24 @@ package com.baosight.hggp.hg.sc.service; ...@@ -2,16 +2,24 @@ package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.core.utils.Iplat4jUtils;
import com.baosight.hggp.hg.sc.domain.HGSC002; import com.baosight.hggp.hg.sc.domain.HGSC002;
import com.baosight.hggp.hg.sc.domain.HGSC006;
import com.baosight.hggp.hg.sc.domain.HGSC007;
import com.baosight.hggp.hg.sc.domain.HGSC008; import com.baosight.hggp.hg.sc.domain.HGSC008;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.sc.util.HgScUtils; import com.baosight.hggp.hg.sc.util.HgScUtils;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.*; 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.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -88,7 +96,7 @@ public class ServiceHGSC008 extends ServiceEPBase { ...@@ -88,7 +96,7 @@ public class ServiceHGSC008 extends ServiceEPBase {
HGSC008 hgsc008 = new HGSC008(); HGSC008 hgsc008 = new HGSC008();
hgsc008.fromMap(resultRow); hgsc008.fromMap(resultRow);
AssertUtils.isNull(hgsc008.getId(), "报工单id不能为空"); AssertUtils.isNull(hgsc008.getId(), "报工单id不能为空");
DaoUtils.update(hgsc008.UPDATE, hgsc008); DaoUtils.update(HGSC008.UPDATE, hgsc008);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
...@@ -98,6 +106,17 @@ public class ServiceHGSC008 extends ServiceEPBase { ...@@ -98,6 +106,17 @@ public class ServiceHGSC008 extends ServiceEPBase {
} }
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "生产报工单", operType = "导出", operDesc = "导出记录")
public EiInfo export(EiInfo inEiInfo) {
Map params = HGXSUtils.setAuthParam("HGSC008."+ ACConstants.SQL_EXPORT, EiInfoUtils.getFirstRow(inEiInfo));
List<String> list = new ArrayList<>(
Arrays.asList("companyCode", "companyName", "projCode", "projName", "workCode", "registerDate"
, "planEndDate", "productCode", "productName", "processName", "groupName", "spec", "length"
, "quantity", "singleWeight", "totalWeight", "exceedReason"
));
return ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_EXPORT, params, list, new HGSC008());
}
} }
...@@ -128,6 +128,88 @@ ...@@ -128,6 +128,88 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="conditionExport">
<include refid="HGXSDataAuth.authConditionA"/>
<isNotEmpty prepend=" AND " property="id">
A.id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
A.company_name like ('%$companyName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subcontractCode">
A.subcontract_code = #subcontractCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subcontractName">
A.subcontract_name like ('%$subcontractName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="genralContractCode">
A.genral_contract_code = #genralContractCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="genralContractName">
A.genral_contract_name like ('%$genralContractName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyPmName">
A.party_pm_name = #partyPmName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyPmHpone">
A.party_pm_hpone = #partyPmHpone#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
A.contract_name like ('%$contractName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractWorkTxt">
A.contract_work_txt = #contractWorkTxt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
A.proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
A.proj_name like concat('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projectName">
A.proj_name like concat('%', #projectName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projType">
A.proj_type = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projStatus">
A.proj_status = #projStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
A.approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="permissStartDate">
A.permiss_start_date = #permissStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="startDate">
A.start_date = #startDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="endDate">
A.end_date = #endDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projectSource">
A.project_source = #projectSource#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="branchUnit">
A.branch_unit = #branchUnit#
</isNotEmpty>
</sql>
<sql id="customCondition"> <sql id="customCondition">
<include refid="condition"/> <include refid="condition"/>
<isNotEmpty prepend=" AND " property="projCodes"> <isNotEmpty prepend=" AND " property="projCodes">
...@@ -354,4 +436,36 @@ ...@@ -354,4 +436,36 @@
WHERE PROJ_CODE = #projCode# WHERE PROJ_CODE = #projCode#
</update> </update>
<select id="export" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
A.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
A.COMPANY_NAME as "companyName", <!-- 公司名称 -->
A.subcontract_code as "subcontractCode", <!-- 分包商编码 -->
A.subcontract_name as "subcontractName", <!-- 分包商名称 -->
A.genral_contract_code as "genralContractCode", <!-- 总包商编码 -->
A.genral_contract_name as "genralContractName", <!-- 总包商名称 -->
A.party_pm_name as "partyPmName", <!-- 甲方项目经理名称 -->
A.party_pm_hpone as "partyPmHpone", <!-- 甲方项目经理联系电话 -->
A.contract_no as "contractNo", <!-- 合同号 -->
A.contract_name as "contractName", <!-- 合同名称 -->
A.contract_work_txt as "contractWorkTxt", <!-- 合同工作量 -->
A.proj_code as "projCode", <!-- 项目编码 -->
A.proj_name as "projName", <!-- 项目名称 -->
B.NAT_NAME as "projType", <!-- 项目性质 -->
C.ITEM_CNAME as "projStatus", <!-- 项目状态 0:在建;1:完工 -->
H.ITEM_CNAME as "approvalStatus", <!-- 审批状态 0:待审;1:审核中;2:已审 -->
A.permiss_start_date as "permissStartDate", <!-- 准许开工日期 -->
A.start_date as "startDate", <!-- 开工日期 -->
A.end_date as "endDate", <!-- 完工日期 -->
E.CUST_TYPE_NAME as "branchUnit" <!-- 分公司 -->
FROM ${hggpSchema}.HGSC001 A
LEFT JOIN ${hggpSchema}.HGPZ001 E ON A.BRANCH_UNIT = E.CUST_TYPE
LEFT JOIN ${hggpSchema}.HGPZ008 B ON A.proj_type = B.NAT_CODE
LEFT JOIN ${platSchema}.TEDCM01 C ON A.proj_status = C.ITEM_CODE AND C.CODESET_CODE = 'hggp.projStatus'
LEFT JOIN ${platSchema}.TEDCM01 H ON A.approval_status = H.ITEM_CODE AND H.CODESET_CODE = 'hggp.commitStatus'
WHERE 1=1
<include refid="conditionExport"/>
ORDER BY A.ID DESC
</select>
</sqlMap> </sqlMap>
...@@ -54,6 +54,58 @@ ...@@ -54,6 +54,58 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="conditionExport">
<include refid="HGXSDataAuth.authConditionA"/>
<isNotEmpty prepend=" AND " property="id">
A.id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
A.company_name like ('%$companyName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintCode">
A.blueprint_code = #blueprintCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintName">
A.blueprint_name like ('%$blueprintName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
A.proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
A.proj_name like ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintStatus">
A.blueprint_status = #blueprintStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
A.approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
A.account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.created_time = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.updated_time = #updatedTime#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC003"> resultClass="com.baosight.hggp.hg.sc.domain.HGSC003">
SELECT SELECT
...@@ -199,4 +251,37 @@ ...@@ -199,4 +251,37 @@
</isNotEmpty> </isNotEmpty>
ORDER BY BLUEPRINT_CODE ORDER BY BLUEPRINT_CODE
</select> </select>
<select id="export" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
A.id as "id", <!-- 主键 -->
A.company_code as "companyCode", <!-- 公司编码 -->
A.company_name as "companyName", <!-- 公司名称 -->
A.dep_code as "depCode", <!-- 部门编码 -->
A.dep_name as "depName", <!-- 部门名称 -->
A.blueprint_code as "blueprintCode", <!-- 蓝图编号 -->
A.blueprint_name as "blueprintName", <!-- 蓝图名称 -->
A.proj_code as "projCode", <!-- 项目编码 -->
A.proj_name as "projName", <!-- 项目名称 -->
B.ITEM_CNAME as "blueprintStatus", <!-- 蓝图状态 0:停用,1:启用 -->
case A.approval_status
when 0 then '待审'
when 1 then '审核中'
when 2 then '已审'
else ''
end as "approvalStatus", <!-- 审批状态 0:待审;1:审核中;2:已审 -->
A.account_code as "accountCode", <!-- 帐套 -->
A.created_by as "createdBy", <!-- 创建人 -->
A.created_name as "createdName", <!-- 创建人名称 -->
A.created_time as "createdTime", <!-- 创建时间 -->
A.updated_by as "updatedBy", <!-- 更新人 -->
A.updated_name as "updatedName", <!-- 修改人名称 -->
A.updated_time as "updatedTime" <!-- 更新时间 -->
FROM ${hggpSchema}.HGSC003 A
LEFT JOIN ${platSchema}.TEDCM01 B ON A.blueprint_status = B.ITEM_CODE AND B.CODESET_CODE = 'hggp.hgsc.enablingStatus'
WHERE 1=1
<include refid="conditionExport" />
ORDER BY A.CREATED_TIME desc
</select>
</sqlMap> </sqlMap>
...@@ -69,6 +69,73 @@ ...@@ -69,6 +69,73 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="conditionExport">
<include refid="HGXSDataAuth.authConditionA"/>
<isNotEmpty prepend=" AND " property="id">
A.id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintId">
blueprint_id = #blueprintId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name like ('%$companyName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintCode">
blueprint_code = #blueprintCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="blueprintName">
blueprint_name like ('%$blueprintName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name like ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialStatus">
material_status = #materialStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</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="delStatus">
del_status = #delStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC004"> resultClass="com.baosight.hggp.hg.sc.domain.HGSC004">
SELECT SELECT
...@@ -235,4 +302,34 @@ ...@@ -235,4 +302,34 @@
<select id="maxId" resultClass="long"> <select id="maxId" resultClass="long">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGSC004 SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGSC004
</select> </select>
<select id="export" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
A.id as "id", <!-- 主键 -->
A.blueprint_id as "blueprintId", <!-- 蓝图id -->
A.company_code as "companyCode", <!-- 公司编码 -->
A.company_name as "companyName", <!-- 公司名称 -->
A.dep_code as "depCode", <!-- 部门编号 -->
A.dep_name as "depName", <!-- 部门名称 -->
A.blueprint_code as "blueprintCode", <!-- 蓝图编号 -->
A.blueprint_name as "blueprintName", <!-- 蓝图名称 -->
A.proj_code as "projCode", <!-- 项目编码 -->
A.proj_name as "projName", <!-- 项目名称 -->
C.ITEM_CNAME AS "materialStatus", <!-- 物料状态 0:未提交,1:部分提交,2:全部提交 -->
A.approval_status as "approvalStatus", <!-- 审批状态 0:待审;1:审核中;2:已审 -->
A.del_status as "delStatus", <!-- 数据状态 0:保存,1:删除 -->
A.account_code as "accountCode", <!-- 帐套 -->
A.created_by as "createdBy", <!-- 创建人 -->
A.created_name as "createdName", <!-- 创建人名称 -->
A.created_time as "createdTime", <!-- 创建时间 -->
A.updated_by as "updatedBy", <!-- 更新人 -->
A.updated_name as "updatedName", <!-- 修改人名称 -->
A.updated_time as "updatedTime" <!-- 更新时间 -->
FROM ${hggpSchema}.HGSC004 A
LEFT JOIN ${platSchema}.TEDCM01 C ON A.material_status = C.ITEM_CODE AND C.CODESET_CODE = 'hggp.sc.materialStatus'
WHERE 1=1 AND A.del_status = 0
<include refid="conditionExport" />
ORDER BY A.CREATED_TIME desc
</select>
</sqlMap> </sqlMap>
...@@ -151,6 +151,116 @@ ...@@ -151,6 +151,116 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="conditionExport">
<isNotEmpty prepend=" AND " property="id">
A.id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
A.company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
A.dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
A.proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
A.proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentProdCode">
A.parent_prod_code = #parentProdCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentProdName">
A.parent_prod_name LIKE CONCAT('%',#parentProdName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialId">
A.material_id = #materialId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
A.product_code = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
A.product_name LIKE CONCAT('%',#productName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productStatus">
A.product_status = #productStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="changeType">
A.change_type = #changeType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
A.invent_type = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
A.SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
A.quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
A.single_weight = #singleWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWeight">
A.total_weight = #totalWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
A.approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
A.account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.created_time = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.updated_time = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialIds">
A.material_Id IN <iterate close=")" open="(" conjunction="," property="materialIds">#materialIds[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productId">
A.product_id = #productId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
A.product_type = #productType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="notId">
A.id != #notId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
A.id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
A.length = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
A.width = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
A.thick = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventSource">
A.invent_source = #inventSource#
</isNotEmpty>
</sql>
<sql id="authCondition"> <sql id="authCondition">
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
...@@ -619,4 +729,52 @@ ...@@ -619,4 +729,52 @@
<include refid="idCondition"/> <include refid="idCondition"/>
</update> </update>
<select id="export" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
A.id as "id", <!-- 主键 -->
A.company_code as "companyCode", <!-- 公司编码(预留) -->
A.company_name as "companyName", <!-- 公司名称(预留) -->
A.dep_code as "depCode", <!-- 部门编号(预留) -->
A.dep_name as "depName", <!-- 部门名称(预留) -->
A.proj_code as "projCode", <!-- 项目编码(预留) -->
A.proj_name as "projName", <!-- 项目名称(预留) -->
A.parent_prod_code as "parentProdCode", <!-- 父节点-产品编码 -->
A.parent_prod_name as "parentProdName", <!-- 父节点-产品名称 -->
A.material_id as "materialId", <!-- 物料清单id -->
A.product_id as "productId", <!-- 产品id -->
A.product_type as "productType", <!-- 产品类别 -->
A.product_code as "productCode", <!-- 产品编号 -->
A.product_name as "productName", <!-- 产品名称 -->
A.invent_type as "inventType", <!-- 档案类型 -->
C.ITEM_CNAME as "inventSource", <!-- 物料来源 1加工 2外购 -->
A.spec as "spec", <!-- 规格 -->
A.length as "length", <!-- 长 -->
A.width as "width", <!-- 宽 -->
A.thick as "thick", <!-- 厚 -->
E.ITEM_CNAME as "productStatus", <!-- 产品状态 0:未提交,1:已提交 -->
B.ITEM_CNAME as "changeType", <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
A.quantity as "quantity", <!-- 数量 -->
A.single_weight as "singleWeight", <!-- 单重 -->
A.total_weight as "totalWeight", <!-- 总重 -->
D.ITEM_CNAME as "approvalStatus", <!-- 审批状态 0:待审;1:审核中;2:已审 -->
A.leaf as "leaf", <!-- 是否有叶子节点 -->
A.sort as "sort", <!-- 排序字段 -->
A.lv as "lv", <!-- 层级 -->
A.account_code as "accountCode", <!-- 帐套 -->
A.created_by as "createdBy", <!-- 创建人 -->
A.created_name as "createdName", <!-- 创建人名称 -->
A.created_time as "createdTime", <!-- 创建时间 -->
A.updated_by as "updatedBy", <!-- 更新人 -->
A.updated_name as "updatedName", <!-- 修改人名称 -->
A.updated_time as "updatedTime" <!-- 更新时间 -->
FROM ${hggpSchema}.HGSC004A A
LEFT JOIN ${platSchema}.TEDCM01 B ON A.change_type = B.ITEM_CODE AND B.CODESET_CODE = 'hggp.sc.changeType'
LEFT JOIN ${platSchema}.TEDCM01 C ON A.invent_source = C.ITEM_CODE AND C.CODESET_CODE = 'hggp.pz.inventSource'
LEFT JOIN ${platSchema}.TEDCM01 D ON A.approval_status = D.ITEM_CODE AND D.CODESET_CODE = 'hggp.hgyx.status'
LEFT JOIN ${platSchema}.TEDCM01 E ON A.product_status = E.ITEM_CODE AND E.CODESET_CODE = 'hggp.sc.productStatus'
WHERE 1=1 AND A.lv NOT IN (1,2)
<include refid="conditionExport" />
ORDER BY A.CREATED_TIME desc
</select>
</sqlMap> </sqlMap>
...@@ -24,6 +24,29 @@ ...@@ -24,6 +24,29 @@
updated_time as "updatedTime" <!-- 更新时间 --> updated_time as "updatedTime" <!-- 更新时间 -->
</sql> </sql>
<sql id="columnExport">
A.id as "id",
A.mat_id as "matId", <!-- 物料清单ID -->
A.company_code as "companyCode", <!-- 公司编码 -->
A.company_name as "companyName", <!-- 公司名称 -->
A.proj_code as "projCode", <!-- 项目编码 -->
A.proj_name as "projName", <!-- 项目名称 -->
A.plan_code as "planCode", <!-- 计划编码 -->
C.ITEM_CNAME as "commitStatus", <!-- 提交状态 0:未提交;2:已提交 -->
A.is_schedule as "isSchedule", <!-- 是否排产 0:否;1:是 -->
A.finish_date as "finishDate", <!-- 完工日期 -->
A.account_code as "accountCode", <!-- 帐套 -->
A.dep_code as "depCode", <!-- 部门编码 -->
A.dep_name as "depName", <!-- 部门名称 -->
A.created_by as "createdBy", <!-- 创建人 -->
A.created_name as "createdName", <!-- 创建人名称 -->
A.created_time as "createdTime", <!-- 创建时间 -->
A.updated_by as "updatedBy", <!-- 更新人 -->
A.updated_name as "updatedName", <!-- 修改人名称 -->
A.updated_time as "updatedTime" <!-- 更新时间 -->
</sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/> <include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
...@@ -89,6 +112,71 @@ ...@@ -89,6 +112,71 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="conditionExport">
<include refid="HGXSDataAuth.authConditionA"/>
<isNotEmpty prepend=" AND " property="id">
A.id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
A.mat_id = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
A.company_name like ('%$companyName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
A.proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
A.proj_name like ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCode">
A.plan_code like ('%$planCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="commitStatus">
A.commit_status = #commitStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="finishDate">
A.finish_date = #finishDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="isSchedule">
A.is_schedule = #isSchedule#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
A.account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
A.dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.date_format(created_time,'%Y-%m-%d') = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.updated_time = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matIds">
A.mat_id NOT IN
<iterate close=")" open="(" conjunction="," property="matIds">#matIds[]#</iterate>
</isNotEmpty>
</sql>
<sql id="orderBy"> <sql id="orderBy">
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
...@@ -188,4 +276,14 @@ ...@@ -188,4 +276,14 @@
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate> id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</update> </update>
<select id="export" resultClass="java.util.HashMap">
SELECT
<include refid="columnExport"/>
FROM ${hggpSchema}.HGSC005 A
LEFT JOIN ${platSchema}.TEDCM01 C ON A.material_status = C.ITEM_CODE AND C.CODESET_CODE = 'hggp.commitStatus'
WHERE 1=1
<include refid="conditionExport"/>
ORDER BY A.id desc
</select>
</sqlMap> </sqlMap>
...@@ -83,6 +83,64 @@ ...@@ -83,6 +83,64 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="conditionExport">
<include refid="HGXSDataAuth.authConditionA"/>
<isNotEmpty prepend=" AND " property="id">
A.id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
A.mat_id = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planId">
A.plan_id = #planId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
A.company_name like ('%$companyName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
A.proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
A.proj_name like ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orderCode">
A.order_code like ('%$orderCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="assignStatus">
A.assign_status = #assignStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
A.account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
A.dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.date_format(created_time,'%Y-%m-%d') = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.updated_time = #updatedTime#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC006"> resultClass="com.baosight.hggp.hg.sc.domain.HGSC006">
SELECT SELECT
...@@ -243,5 +301,31 @@ ...@@ -243,5 +301,31 @@
WHERE order_code = #orderCode# WHERE order_code = #orderCode#
</update> </update>
<select id="export" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
A.id as "id",
A.mat_id as "matId", <!-- 物料清单ID -->
A.plan_id as "planId", <!-- 生产计划ID -->
A.company_code as "companyCode", <!-- 公司编码 -->
A.company_name as "companyName", <!-- 公司名称 -->
A.proj_code as "projCode", <!-- 项目编码 -->
A.proj_name as "projName", <!-- 项目名称 -->
A.order_code as "orderCode", <!-- 订单编码 -->
C.ITEM_CNAME as "assignStatus", <!-- 派工状态 0:未派工;1:部分派工;2:已派工 -->
A.account_code as "accountCode", <!-- 帐套 -->
A.dep_code as "depCode", <!-- 部门编码 -->
A.dep_name as "depName", <!-- 部门名称 -->
A.created_by as "createdBy", <!-- 创建人 -->
A.created_name as "createdName", <!-- 创建人名称 -->
A.created_time as "createdTime", <!-- 创建时间 -->
A.updated_by as "updatedBy", <!-- 更新人 -->
A.updated_name as "updatedName", <!-- 修改人名称 -->
A.updated_time as "updatedTime" <!-- 更新时间 -->
FROM ${hggpSchema}.HGSC006 A
LEFT JOIN ${platSchema}.TEDCM01 C ON A.assign_status = C.ITEM_CODE AND C.CODESET_CODE = 'hggp.assignStatus'
WHERE 1=1
<include refid="conditionExport" />
ORDER BY A.id desc
</select>
</sqlMap> </sqlMap>
...@@ -158,6 +158,124 @@ ...@@ -158,6 +158,124 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="conditionExport">
<include refid="HGXSDataAuth.authConditionA"/>
<isNotEmpty prepend=" AND " property="id">
A.id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planId">
A.plan_id = #planId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planDetailId">
A.plan_detail_id = #planDetailId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowId">
A.tech_flow_id = #techFlowId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowName">
A.tech_flow_name = #techFlowName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventProcessId">
A.invent_process_id = #inventProcessId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processCode">
A.process_code = #processCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processName">
A.process_name = #processName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processOrder">
A.process_order = #processOrder#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
A.company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
A.dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
A.proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
A.proj_name like ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orderCode">
A.order_code = #orderCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
A.product_type = #productType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
A.product_code LIKE CONCAT('%', #productCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
A.product_name like ('%$productName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="assignDate">
A.assign_date = #assignDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planStartDate">
A.plan_start_date = #planStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planEndDate">
A.plan_end_date = #planEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
A.quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="assignQuantity">
A.assign_quantity = #assignQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unassignQuantity">
A.unassign_quantity = #unassignQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
A.single_weight = #singleWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWeight">
A.total_weight = #totalWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="assignWeight">
A.assign_weight = #assignWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unassignWeight">
A.unassign_weight = #unassignWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="assignStatus">
A.assign_status = #assignStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
A.account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.date_format(created_time,'%Y-%m-%d') = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.updated_time = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
A.id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql>
<select id="query_other" parameterClass="java.util.HashMap" <select id="query_other" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC006A"> resultClass="com.baosight.hggp.hg.sc.domain.HGSC006A">
SELECT SELECT
...@@ -505,4 +623,48 @@ ...@@ -505,4 +623,48 @@
ORDER BY process_name ORDER BY process_name
</select> </select>
<select id="export" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
A.id as "id",
A.plan_id as "planId", <!-- 生产计划ID -->
A.plan_detail_id as "planDetailId", <!-- 生产计划明细ID -->
A.tech_flow_id as "techFlowId", <!-- 工艺流程ID -->
A.tech_flow_name as "techFlowName", <!-- 工艺流程名称 -->
A.invent_process_id as "inventProcessId", <!-- 存货工序ID,对应HGPZ005A.id -->
A.process_code as "processCode", <!-- 工序编码 -->
A.process_name as "processName", <!-- 工序名称 -->
A.process_order as "processOrder", <!-- 加工顺序 -->
A.company_code as "companyCode", <!-- 公司编码 -->
A.company_name as "companyName", <!-- 公司名称 -->
A.dep_code as "depCode", <!-- 部门编码 -->
A.dep_name as "depName", <!-- 部门名称 -->
A.proj_code as "projCode", <!-- 项目编码 -->
A.proj_name as "projName", <!-- 项目名称 -->
A.order_code as "orderCode", <!-- 订单编码 -->
A.product_type as "productType", <!-- 产品类型 -->
A.product_code as "productCode", <!-- 产品编号 -->
A.product_name as "productName", <!-- 产品名称 -->
A.plan_start_date as "planStartDate", <!-- 计划开始日期 -->
A.plan_end_date as "planEndDate", <!-- 计划结束日期 -->
A.quantity as "quantity", <!-- 数量 -->
A.assign_quantity as "assignQuantity", <!-- 派工数量 -->
A.unassign_quantity as "unassignQuantity", <!-- 未派工数量 -->
A.single_weight as "singleWeight", <!-- 单重 -->
A.total_weight as "totalWeight", <!-- 总重 -->
A.assign_weight as "assignWeight", <!-- 派工重量 -->
A.unassign_weight as "unassignWeight", <!-- 未派工重量 -->
C.ITEM_CNAME as "assignStatus", <!-- 派工状态 0待派工;1部分派工;2已派工 -->
A.account_code as "accountCode", <!-- 帐套 -->
A.created_by as "createdBy", <!-- 创建人 -->
A.created_name as "createdName", <!-- 创建人名称 -->
A.created_time as "createdTime", <!-- 创建时间 -->
A.updated_by as "updatedBy", <!-- 更新人 -->
A.updated_name as "updatedName", <!-- 修改人名称 -->
A.updated_time as "updatedTime" <!-- 更新时间 -->
FROM ${hggpSchema}.HGSC006A A
LEFT JOIN ${platSchema}.TEDCM01 C ON A.assign_status = C.ITEM_CODE AND C.CODESET_CODE = 'hggp.assignStatus'
WHERE 1=1
<include refid="condition" />
ORDER BY A.product_type asc, A.product_name, A.process_order desc
</select>
</sqlMap> </sqlMap>
...@@ -50,6 +50,54 @@ ...@@ -50,6 +50,54 @@
REGISTER_NUM as "registerNum" REGISTER_NUM as "registerNum"
</sql> </sql>
<sql id="columnExport">
A.id as "id",
A.mat_id as "matId", <!-- 物料清单ID -->
A.order_id as "orderId", <!-- 生产计划ID -->
A.order_detail_id as "orderDetailId", <!-- 生产计划明细ID -->
A.tech_flow_id as "techFlowId", <!-- 工艺流程ID -->
A.tech_flow_name as "techFlowName", <!-- 工艺流程名称 -->
A.invent_process_id as "inventProcessId", <!-- 存货工序ID,对应HGPZ005A.id -->
A.process_code as "processCode", <!-- 工序编码 -->
A.process_name as "processName", <!-- 工序名称 -->
A.process_order as "processOrder", <!-- 加工顺序 -->
A.company_code as "companyCode", <!-- 公司编码 -->
A.company_name as "companyName", <!-- 公司名称 -->
A.dep_code as "depCode", <!-- 部门编码 -->
A.dep_name as "depName", <!-- 部门名称 -->
A.proj_code as "projCode", <!-- 项目编码 -->
A.proj_name as "projName", <!-- 项目名称 -->
A.task_code as "taskCode", <!-- 任务编码 -->
A.product_type as "productType", <!-- 产品类型 -->
A.product_code as "productCode", <!-- 产品编号 -->
A.product_name as "productName", <!-- 产品名称 -->
A.plan_start_date as "planStartDate", <!-- 计划开始日期 -->
A.plan_end_date as "planEndDate", <!-- 计划结束日期 -->
A.factory_code as "factoryCode", <!-- 工厂编号 -->
A.factory_name as "factoryName", <!-- 工厂名称 -->
A.group_code as "groupCode", <!-- 工作组编号 -->
A.group_name as "groupName", <!-- 工作组名称 -->
A.complete_date as "completeDate", <!-- 完工日期 -->
A.quantity as "quantity", <!-- 数量 -->
A.finish_quantity as "finishQuantity", <!-- 完工数量 -->
A.unfinish_quantity as "unfinishQuantity", <!-- 未完工数量 -->
A.single_weight as "singleWeight", <!-- 单重 -->
A.total_weight as "totalWeight", <!-- 总重 -->
A.finish_weight as "finishWeight", <!-- 完工重量 -->
A.unfinish_weight as "unfinishWeight", <!-- 未完工重量 -->
A.account_code as "accountCode", <!-- 帐套 -->
A.created_by as "createdBy", <!-- 创建人 -->
A.created_name as "createdName", <!-- 创建人名称 -->
left(A.created_time,8) as "createdTime", <!-- 创建时间 -->
A.updated_by as "updatedBy", <!-- 更新人 -->
A.updated_name as "updatedName", <!-- 修改人名称 -->
A.updated_time as "updatedTime", <!-- 更新时间 -->
A.LENGTH as "length", <!-- 长 -->
A.SPEC as "spec", <!-- 规格 -->
C.ITEM_CNAME as "status",
A.REGISTER_NUM as "registerNum"
</sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/> <include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
...@@ -180,6 +228,136 @@ ...@@ -180,6 +228,136 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="conditionExport">
<include refid="HGXSDataAuth.authConditionA"/>
<isNotEmpty prepend=" AND " property="id">
A.id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
A.mat_id = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orderId">
A.order_id = #orderId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orderDetailId">
A.order_detail_id = #orderDetailId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowId">
A.tech_flow_id = #techFlowId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowName">
A.tech_flow_name = #techFlowName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventProcessId">
A.invent_process_id = #inventProcessId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processCode">
A.process_code = #processCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processName">
A.process_name = #processName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processOrder">
A.process_order = #processOrder#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
A.company_name LIKE CONCAT('%', #companyName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
A.dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
A.proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
A.proj_name LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taskCode">
A.task_code LIKE CONCAT('%', #taskCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productType">
A.product_type = #productType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
A.product_code LIKE CONCAT('%', #productCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
A.product_name LIKE CONCAT('%', #productName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planStartDate">
A.plan_start_date = #planStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planEndDate">
A.plan_end_date = #planEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
A.factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
A.factory_name = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupCode">
A.group_code = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupName">
A.group_name LIKE CONCAT('%', #groupName# ,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="completeDate">
A.complete_date = #completeDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
A.quantity = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="finishQuantity">
A.finish_quantity = #finishQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unfinishQuantity">
A.unfinish_quantity = #unfinishQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="singleWeight">
A.single_weight = #singleWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWeight">
A.total_weight = #totalWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="finishWeight">
A.finish_weight = #finishWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unfinishWeight">
A.unfinish_weight = #unfinishWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.created_by = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.created_name = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.created_time LIKE CONCAT('%', #createdTime# ,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.updated_by = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.updated_name = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.updated_time = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
A.STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="registerNum">
A.REGISTER_NUM = #registerNum#
</isNotEmpty>
</sql>
<sql id="customCondition"> <sql id="customCondition">
<include refid="condition"/> <include refid="condition"/>
<isNotEmpty prepend=" AND " property="ids"> <isNotEmpty prepend=" AND " property="ids">
...@@ -825,6 +1003,16 @@ ...@@ -825,6 +1003,16 @@
</isNotEmpty> </isNotEmpty>
</update> </update>
<select id="export" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
<include refid="columnExport"/>
FROM ${hggpSchema}.HGSC007 A
LEFT JOIN ${platSchema}.TEDCM01 C ON A.STATUS = C.ITEM_CODE AND C.CODESET_CODE = 'hggp.hgsc.status'
WHERE 1=1
<include refid="conditionExport"/>
order by A.ID DESC, A.PRODUCT_TYPE ASC, A.PRODUCT_NAME, A.PROCESS_ORDER DESC
</select>
<!--查询累计完成重量--> <!--查询累计完成重量-->
<select id="querySumWt" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="querySumWt" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select select
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
process_code = #processCode# process_code = #processCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="processName"> <isNotEmpty prepend=" AND " property="processName">
process_name = #processName# process_name LIKE CONCAT('%',#processName#,'%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="processOrder"> <isNotEmpty prepend=" AND " property="processOrder">
process_order = #processOrder# process_order = #processOrder#
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
proj_code = #projCode# proj_code = #projCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
proj_name = #projName# proj_name LIKE CONCAT('%',#projName#,'%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="workCode"> <isNotEmpty prepend=" AND " property="workCode">
work_code like ('%$workCode$%') work_code like ('%$workCode$%')
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
product_code = #productCode# product_code = #productCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="productName"> <isNotEmpty prepend=" AND " property="productName">
product_name = #productName# product_name LIKE CONCAT('%',#productName#,'%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="planStartDate"> <isNotEmpty prepend=" AND " property="planStartDate">
plan_start_date = #planStartDate# plan_start_date = #planStartDate#
...@@ -157,6 +157,9 @@ ...@@ -157,6 +157,9 @@
<isNotEmpty prepend=" AND " property="updatedTime"> <isNotEmpty prepend=" AND " property="updatedTime">
updated_time = #updatedTime# updated_time = #updatedTime#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
spec LIKE CONCAT('%',#spec#,'%')
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -310,4 +313,13 @@ ...@@ -310,4 +313,13 @@
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate> id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</delete> </delete>
<select id="export" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGSC008
WHERE 1=1
<include refid="condition"/>
order by register_date desc, id desc
</select>
</sqlMap> </sqlMap>
package com.baosight.hggp.hg.xs.utils; package com.baosight.hggp.hg.xs.utils;
import com.baosight.hggp.common.DataAuthTypeEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.ThreadLocalTools;
import com.baosight.hggp.hg.pz.domain.HGPZ009;
import com.baosight.hggp.hg.xs.domain.HGXS006; import com.baosight.hggp.hg.xs.domain.HGXS006;
import com.baosight.hggp.hg.xs.domain.HGXS007; import com.baosight.hggp.hg.xs.domain.HGXS007;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.domain.User; import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.domain.UserGroup; import com.baosight.hggp.hg.xs.domain.UserGroup;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.MapUtils; import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.ObjectUtils; import com.baosight.hggp.util.ObjectUtils;
import com.baosight.hggp.util.StringUtils; import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* @author:songx * @author:songx
...@@ -231,5 +240,156 @@ public class HGXSUtils { ...@@ -231,5 +240,156 @@ public class HGXSUtils {
return HGXSTools.HgXs007.map(ids); return HGXSTools.HgXs007.map(ids);
} }
} }
/**
* 设置权限参数
*
* @param name
* @param parameters
*/
public static Map setAuthParam(String name, Map parameters) {
// 需要过滤部分sql name,否则会形成死循环
if (!name.startsWith("HG")) {
return parameters;
}
Map params = new HashMap<>();
if (parameters != null) {
params.putAll(parameters);
}
// 设置企业信息
setAccountCode(name, params);
// 设置数据查询权限
setDataAuth(name, params);
return params;
}
/**
* 设置企业编码
*
* @param name
* @param parameters
*/
public static void setAccountCode(String name, Map parameters) {
// 需要过滤部分sql name,否则会形成死循环
String[] serviceFilter = {"HGXSUser", "HGPZ009"};
if (StringUtils.startsWithAny(name, serviceFilter)) {
return;
}
// 本来是BUG,避免业务代码改动依然保持原逻辑ADMIN时依然置空
String accountCode = UserSessionUtils.getAccountCode();
if (CommonConstant.Field.ADMIN.equals(accountCode)) {
parameters.put("accountCode", null);
} else if (StringUtils.isBlank(accountCode)) {
parameters.put("accountCode", " ");
} else {
parameters.put("accountCode", accountCode);
}
}
/**
* 设置数据权限
*
* @param name
* @param parameters
*/
public static void setDataAuth(String name, Map parameters) {
// 本次操作不做权限
boolean notAuth = MapUtils.getBooleanValue(parameters, "notAuth");
if (notAuth) {
return;
}
// 需要过滤部分sql name,否则会形成死循环;admin账户不需要校验
String loginName = UserSessionUtils.getLoginName();
String[] serviceFilter = {"HGXSUser", "HGXSOrg", "HGXSUserGroup", "HGPZ009", "HGPZ010.query"};
if (StringUtils.startsWithAny(name, serviceFilter) || "admin".equalsIgnoreCase(loginName)) {
return;
}
// 是否启用数据权限
if (!ThreadLocalTools.DATA_AUTH.get()) {
return;
}
String authEnable = PlatApplicationContext.getProperty("iplat4j.page.auth.enable");
if (StringUtils.isNotBlank(authEnable) && CommonConstant.YesNo.NO_S0.equals(authEnable)) {
return;
}
// 租户是否开启数据权限
HGPZ009 dbPz009 = UserSessionUtils.getAccount();
if (dbPz009 != null && CommonConstant.YesNo.NO_0.equals(dbPz009.getDataAuthFlag())) {
return;
}
// 当前用户所有角色
List<UserGroup> userGroups = UserSessionUtils.getRole();
AssertUtils.isEmpty(userGroups, "当前用户未绑定角色,无法操作数据,请联系管理员!");
// 构建数据权限
buildDataAuth(userGroups, parameters);
}
/**
* 构建部门权限
*
* @param userGroups
* @param parameters
*/
public static void buildDataAuth(List<UserGroup> userGroups, Map parameters) {
List<String> depCodes = new ArrayList<>();
boolean onlyPeople = false;
for (UserGroup userGroup : userGroups) {
String dataAuthType = userGroup.getDataAuthType();
if (DataAuthTypeEnum.ONLY_PEOPLE.getCode().equals(dataAuthType)) {
onlyPeople = true;
} else {
List<String> depAuths = buildDepCondition(userGroup);
if (CollectionUtils.isNotEmpty(depAuths)) {
depCodes.addAll(depAuths);
}
}
}
// 无权限
if (!onlyPeople && CollectionUtils.isEmpty(depCodes)) {
parameters.put("authDepCode", DataAuthTypeEnum.NO_AUTH.getCode());
return;
}
// 组合权限
if (onlyPeople && CollectionUtils.isNotEmpty(depCodes)) {
parameters.put("authCombination", CommonConstant.YesNo.YES_1);
}
// 仅本人
if (onlyPeople) {
parameters.put("authOnlyPeople", UserSessionUtils.getLoginName());
}
// 去除重复数据
if (CollectionUtils.isNotEmpty(depCodes)) {
parameters.put("authDepCodes", depCodes.stream().distinct().collect(Collectors.toList()));
}
}
/**
* 组装 Custom Data Auth Condition
*
* @param userGroup
*/
public static List<String> buildDepCondition(UserGroup userGroup) {
String dataAuthType = userGroup.getDataAuthType();
if (StringUtils.isBlank(dataAuthType)) {
return null;
}
if (DataAuthTypeEnum.ONLY_COMPANY.getCode().equals(dataAuthType)) {
if (StringUtils.isBlank(userGroup.getCompanyCode())) {
return null;
}
return HGXSTools.XsOrg.queryChildren(userGroup.getCompanyCode());
} else if (DataAuthTypeEnum.ONLY_FACTORY.getCode().equals(dataAuthType)) {
if (StringUtils.isBlank(userGroup.getFactoryCode())) {
return null;
}
return HGXSTools.XsOrg.queryChildren(userGroup.getFactoryCode());
} else if (DataAuthTypeEnum.ONLY_DEPT.getCode().equals(dataAuthType)) {
if (StringUtils.isBlank(userGroup.getDepCode())) {
return null;
}
return HGXSTools.XsOrg.queryChildren(userGroup.getDepCode());
}
return null;
}
} }
...@@ -34,6 +34,11 @@ public class ACConstants { ...@@ -34,6 +34,11 @@ public class ACConstants {
/** /**
* sql 条件导出方法 * sql 条件导出方法
*/ */
public static final String SQL_QUERY = "query";
/**
* sql 条件导出方法
*/
public static final String SQL_EXPORT = "export"; public static final String SQL_EXPORT = "export";
/** 导入文件暂存路径 dzg */ /** 导入文件暂存路径 dzg */
......
...@@ -106,8 +106,8 @@ ...@@ -106,8 +106,8 @@
<script src="${iPlatStaticURL}/iplatui/assets/js/iplat.ui.bootstrap.min.js"></script> <script src="${iPlatStaticURL}/iplatui/assets/js/iplat.ui.bootstrap.min.js"></script>
<script src="${iPlatStaticURL}/iplatui/js/iplat.ui.min.js"></script> <script src="${iPlatStaticURL}/iplatui/js/iplat.ui.min.js"></script>
<script src="${ctx}/common/js/public.js"></script>
<script src="${ctx}/common/js/dayjs.min.js"></script>
<script src="${ctx}/common/js/vue-2.6.10.js"></script> <script src="${ctx}/common/js/vue-2.6.10.js"></script>
<script src="${ctx}/common/js/httpVueLoader.js"></script> <script src="${ctx}/common/js/httpVueLoader.js"></script>
<link rel="stylesheet" href="${ctx}/common/css/element-ui.css"> <link rel="stylesheet" href="${ctx}/common/css/element-ui.css">
...@@ -206,24 +206,29 @@ ...@@ -206,24 +206,29 @@
getByProcessWtDate:[], getByProcessWtDate:[],
getByProcessDayWtList:[], getByProcessDayWtList:[],
getByProcessDayWtDate:[], getByProcessDayWtDate:[],
timer: ''
}; };
}, },
mounted() { mounted() {
this.getYesterdayDateFormatted();
setInterval(() => { setInterval(() => {
this.date = new Date(); // 更新日期时间 this.date = new Date(); // 更新日期时间
}, 1000); }, 1000);
this.getYesterdayDateFormatted();
this.getRoleFactory(); this.getRoleFactory();
this.getByProcessWt(); this.initPage();
this.setOption(); this.onSetInterval()
this.getByProcessDayWt();
this.setOption2();
setInterval(()=> {
this.initPage();
}, 60000);
}, },
methods: { methods: {
onSetInterval(){
if(this.timer){
clearInterval(this.timer)
this.timer = ''
}
this.timer = setInterval(()=>{
this.getYesterdayDateFormatted();
this.initPage();
},60000)
},
initPage(){ initPage(){
this.getByProcessWt(); this.getByProcessWt();
this.setOption(); this.setOption();
...@@ -232,19 +237,11 @@ ...@@ -232,19 +237,11 @@
}, },
handledataPicker(){ handledataPicker(){
this.getByProcessWt(); this.initPage();
this.setOption(); this.onSetInterval()
this.getByProcessDayWt();
this.setOption2();
}, },
getYesterdayDateFormatted() { getYesterdayDateFormatted() {
const today = new Date(); this.dataPicker = dayjs().subtract(1, 'day').format("YYYYMMDD");
today.setDate(today.getDate() - 1);
const year = today.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以要加1
const day = String(today.getDate()).padStart(2, '0');
const formattedDate = year+month+day;
this.dataPicker = formattedDate;
}, },
getRoleFactory(){ getRoleFactory(){
let _this = this; let _this = this;
...@@ -253,11 +250,9 @@ ...@@ -253,11 +250,9 @@
onSuccess: function (res) { onSuccess: function (res) {
_this.factoryList = res.extAttr.result _this.factoryList = res.extAttr.result
_this.factory = res.extAttr.result[0].factoryCode _this.factory = res.extAttr.result[0].factoryCode
console.log('_this.factoryList',_this.factoryList)
console.log('factory',_this.factory)
}, },
onFail: function (err) { onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
} }
}, },
{async: false} {async: false}
...@@ -266,22 +261,17 @@ ...@@ -266,22 +261,17 @@
getByProcessWt(){ getByProcessWt(){
let _this = this; let _this = this;
var inInfo = new EiInfo(); var inInfo = new EiInfo();
console.log('factory',this.factory)
console.log('dataPicker',this.dataPicker)
inInfo.set('inqu_status-0-factoryCode',this.factory) inInfo.set('inqu_status-0-factoryCode',this.factory)
inInfo.set('inqu_status-0-depositDate',this.dataPicker) inInfo.set('inqu_status-0-depositDate',this.dataPicker)
IPLAT.EiCommunicator.send('HGSC007', 'getByProcessWt', inInfo, { IPLAT.EiCommunicator.send('HGSC007', 'getByProcessWt', inInfo, {
onSuccess: function (res) { onSuccess: function (res) {
console.log('getByProcessWt',res)
if(undefined != res.blocks.result.extAttr){ if(undefined != res.blocks.result.extAttr){
_this.getByProcessWtList = res.blocks.result.extAttr.processNameList _this.getByProcessWtList = res.blocks.result.extAttr.processNameList
console.log('getByProcessWtList',_this.getByProcessWtList)
_this.getByProcessWtDate = res.blocks.result.extAttr.totalWeightList _this.getByProcessWtDate = res.blocks.result.extAttr.totalWeightList
console.log('getByProcessWtDate',_this.getByProcessWtDate)
} }
}, },
onFail: function (err) { onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
} }
}, },
{async: false} {async: false}
...@@ -338,22 +328,17 @@ ...@@ -338,22 +328,17 @@
getByProcessDayWt(){ getByProcessDayWt(){
let _this = this; let _this = this;
var inInfo = new EiInfo(); var inInfo = new EiInfo();
console.log('factory',this.factory)
console.log('dataPicker',this.dataPicker)
inInfo.set('inqu_status-0-factoryCode',this.factory) inInfo.set('inqu_status-0-factoryCode',this.factory)
inInfo.set('inqu_status-0-depositDate',this.dataPicker) inInfo.set('inqu_status-0-depositDate',this.dataPicker)
IPLAT.EiCommunicator.send('HGSC007', 'getByProcessDayWt', inInfo, { IPLAT.EiCommunicator.send('HGSC007', 'getByProcessDayWt', inInfo, {
onSuccess: function (res) { onSuccess: function (res) {
console.log('七日综合产量')
if(undefined != res.blocks.result.extAttr){ if(undefined != res.blocks.result.extAttr){
_this.getByProcessDayWtList = res.blocks.result.extAttr.depositDateList; _this.getByProcessDayWtList = res.blocks.result.extAttr.depositDateList;
console.log('_this.getByProcessDayWtList',_this.getByProcessDayWtList)
_this.getByProcessDayWtDate = res.blocks.result.extAttr.totalWeightList; _this.getByProcessDayWtDate = res.blocks.result.extAttr.totalWeightList;
console.log('_this.getByProcessDayWtDate',_this.getByProcessDayWtDate)
} }
}, },
onFail: function (err) { onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
} }
}, },
{async: false} {async: false}
...@@ -574,6 +559,49 @@ ...@@ -574,6 +559,49 @@
flex-wrap: wrap; flex-wrap: wrap;
padding-left: 1vw; padding-left: 1vw;
} }
.page-content-main .el-table, .el-table__expanded-cell{
background-color: transparent!important;
}
.page-content-main .el-table__cell .cell{
font-size: 10px;
padding: 0;
}
.page-content-main .el-table tr{
background-color: transparent!important;
}
.page-content-main .el-table--border, .el-table--group{
/*border-color: #4295f7;*/
border-color: transparent!important;
}
.page-content-main .el-table td.el-table__cell, .el-table th.el-table__cell{
background-color: transparent!important;
border-color: transparent!important;
}
.page-content-main .el-table--border .el-table__cell .cell{
padding-left: 0;
}
.page-content-main .el-table th.el-table__cell > .cell {
padding-right: 0;
}
.page-content-main .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf{
color: #ffffff;
border-color: transparent!important;
font-size: 0.8vw;
}
.page-content-main .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf .cell{
font-size: 0.68vw;
}
.page-content-main .el-table--border th.el-table__cell.gutter:last-of-type{
border-color: transparent!important;
}
.page-content-main .el-table--border::after, .el-table--group::after, .el-table::before{
/*background-color: #4295f7!important;*/
background-color: transparent!important;
}
.page-content-main tr{
border-bottom:1px solid #4295f7!important;
}
</style> </style>
</body> </body>
</html> </html>
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<script src="${iPlatStaticURL}/iplatui/assets/js/iplat.ui.bootstrap.min.js"></script> <script src="${iPlatStaticURL}/iplatui/assets/js/iplat.ui.bootstrap.min.js"></script>
<script src="${iPlatStaticURL}/iplatui/js/iplat.ui.min.js"></script> <script src="${iPlatStaticURL}/iplatui/js/iplat.ui.min.js"></script>
<script src="${ctx}/common/js/dayjs.min.js"></script>
<script src="${ctx}/common/js/vue-2.6.10.js"></script> <script src="${ctx}/common/js/vue-2.6.10.js"></script>
<script src="${ctx}/common/js/httpVueLoader.js"></script> <script src="${ctx}/common/js/httpVueLoader.js"></script>
<link rel="stylesheet" href="${ctx}/common/css/element-ui.css"> <link rel="stylesheet" href="${ctx}/common/css/element-ui.css">
...@@ -252,59 +252,41 @@ ...@@ -252,59 +252,41 @@
querySbYesDate:[], querySbYesDate:[],
querySbNoList:[], querySbNoList:[],
querySbNODate:[], querySbNODate:[],
currentTime:dayjs().format("YYYY-MM-DD HH:mm:ss"),
lineOption1:'',
lineOption2:''
}; };
}, },
mounted() { mounted() {
this.getYesterdayDateFormatted();
setInterval(() => { setInterval(() => {
this.date = new Date(); // 更新日期时间 this.currentTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
}, 1000); }, 1000);
this.getYesterdayDateFormatted();
this.getRoleFactory(); this.getRoleFactory();
this.queryBySbStatus(); this.initPage();
this.querySbYes();
this.querySbNo();
this.setOption(); this.setOption();
this.setOption2(); this.setOption2();
// var self = this; this.onSetInterval()
// setTimeout(function() {
// self.init();
// }, 60000);
setInterval(()=> {
this.initPage();
}, 60000);
}, },
methods: { methods: {
onSetInterval(){
if(this.timer){
clearInterval(this.timer)
this.timer = ''
}
this.timer = setInterval(()=>{
this.getYesterdayDateFormatted();
this.initPage();
},60000)
},
initPage(){ initPage(){
this.getYesterdayDateFormatted();
this.queryBySbStatus(); this.queryBySbStatus();
this.querySbYes(); this.querySbYes();
this.querySbNo(); this.querySbNo();
}, },
formatTime(currentTime) {
const formattedTime =
currentTime.getFullYear() +
"-" +
(currentTime.getMonth() + 1) +
"-" +
currentTime.getDate() +
" " +
currentTime.getHours() +
":" +
currentTime.getMinutes() +
":" +
currentTime.getSeconds();
return formattedTime;
},
getYesterdayDateFormatted() { getYesterdayDateFormatted() {
const today = new Date(); this.dataPicker = dayjs().format("YYYYMMDD");
today.setDate(today.getDate() - 1);
const year = today.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以要加1
const day = String(today.getDate()).padStart(2, '0');
const formattedDate = year+month+day;
this.dataPicker = formattedDate;
console.log('ctx',this.ctx)
}, },
getRoleFactory(){ getRoleFactory(){
let _this = this; let _this = this;
...@@ -313,20 +295,17 @@ ...@@ -313,20 +295,17 @@
onSuccess: function (res) { onSuccess: function (res) {
_this.factoryList = res.extAttr.result _this.factoryList = res.extAttr.result
_this.factory = res.extAttr.result[0].factoryCode _this.factory = res.extAttr.result[0].factoryCode
console.log('_this.factoryList',_this.factoryList)
console.log('factory',_this.factory)
}, },
onFail: function (err) { onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
} }
}, },
{async: false} {async: false}
); );
}, },
handledataPicker(){ handledataPicker(){
this.queryBySbStatus(); this.initPage();
this.querySbYes(); this.onSetInterval()
this.querySbNo();
}, },
queryBySbStatus(){ queryBySbStatus(){
let _this = this; let _this = this;
...@@ -335,7 +314,7 @@ ...@@ -335,7 +314,7 @@
inInfo.set('inqu_status-0-date',this.dataPicker) inInfo.set('inqu_status-0-date',this.dataPicker)
IPLAT.EiCommunicator.send('HGSB010', 'queryBySbStatus', inInfo, { IPLAT.EiCommunicator.send('HGSB010', 'queryBySbStatus', inInfo, {
onSuccess: function (res) { onSuccess: function (res) {
console.log('queryBySbStatus',res)
if(undefined != res.extAttr.result){ if(undefined != res.extAttr.result){
_this.queryBySbStatusList = res.extAttr.result; _this.queryBySbStatusList = res.extAttr.result;
} }
...@@ -351,7 +330,7 @@ ...@@ -351,7 +330,7 @@
}) })
}, },
onFail: function (err) { onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
} }
}, },
{async: false} {async: false}
...@@ -364,7 +343,7 @@ ...@@ -364,7 +343,7 @@
inInfo.set('inqu_status-0-date',this.dataPicker) inInfo.set('inqu_status-0-date',this.dataPicker)
IPLAT.EiCommunicator.send('HGSB010', 'querySbYes', inInfo, { IPLAT.EiCommunicator.send('HGSB010', 'querySbYes', inInfo, {
onSuccess: function (res) { onSuccess: function (res) {
console.log('querySbYes',res)
if(undefined != res.extAttr.result[0]){ if(undefined != res.extAttr.result[0]){
const dataList = res.extAttr.result; const dataList = res.extAttr.result;
_this.querySbYesDate = res.extAttr.date; _this.querySbYesDate = res.extAttr.date;
...@@ -433,10 +412,10 @@ ...@@ -433,10 +412,10 @@
_this.querySbYesList = [] _this.querySbYesList = []
_this.querySbYesDate = [] _this.querySbYesDate = []
} }
console.log('querySbYesList',_this.querySbYesList)
}, },
onFail: function (err) { onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
} }
}, },
{async: false} {async: false}
...@@ -449,7 +428,7 @@ ...@@ -449,7 +428,7 @@
inInfo.set('inqu_status-0-date',this.dataPicker) inInfo.set('inqu_status-0-date',this.dataPicker)
IPLAT.EiCommunicator.send('HGSB010', 'querySbNo', inInfo, { IPLAT.EiCommunicator.send('HGSB010', 'querySbNo', inInfo, {
onSuccess: function (res) { onSuccess: function (res) {
console.log('querySbNo',res)
if(undefined != res.extAttr.result[0]){ if(undefined != res.extAttr.result[0]){
const dataList = res.extAttr.result; const dataList = res.extAttr.result;
_this.querySbNODate = res.extAttr.date; _this.querySbNODate = res.extAttr.date;
...@@ -458,7 +437,7 @@ ...@@ -458,7 +437,7 @@
return { return {
title: { title: {
left: 'left', left: 'left',
text: '设备故障次数/分钟', text: '设备故障时长/分钟',
textStyle: { textStyle: {
color: '#ffffff' // 设置标题字体颜色为白色 color: '#ffffff' // 设置标题字体颜色为白色
} }
...@@ -518,7 +497,7 @@ ...@@ -518,7 +497,7 @@
} }
}, },
onFail: function (err) { onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
} }
}, },
{async: false} {async: false}
...@@ -526,7 +505,7 @@ ...@@ -526,7 +505,7 @@
}, },
setOption(){ setOption(){
this.testOption1 = { this.lineOption1 = {
title: { title: {
left: 'left', left: 'left',
text: '设备作业时长/分钟', text: '设备作业时长/分钟',
...@@ -561,7 +540,7 @@ ...@@ -561,7 +540,7 @@
}, },
series: [ series: [
{ {
data: [0, 0, 0, 0, 0, 0, 0], data: [350, 240, 460, 245, 467, 234, 562],
type: 'line', type: 'line',
smooth: true, smooth: true,
itemStyle: { itemStyle: {
...@@ -577,10 +556,10 @@ ...@@ -577,10 +556,10 @@
} }
}, },
setOption2(){ setOption2(){
this.testOption2 ={ this.lineOption2 ={
title: { title: {
left: 'left', left: 'left',
text: '设备故障次数/分钟', text: '设备故障时长/分钟',
textStyle: { textStyle: {
color: '#ffffff' // 设置标题字体颜色为白色 color: '#ffffff' // 设置标题字体颜色为白色
} }
...@@ -612,7 +591,7 @@ ...@@ -612,7 +591,7 @@
}, },
series: [ series: [
{ {
data: [24, 24, 24, 24, 24, 24, 24], data: [30, 45, 50, 23, 24, 18, 80],
type: 'line', type: 'line',
smooth: true, smooth: true,
itemStyle: { itemStyle: {
...@@ -628,19 +607,6 @@ ...@@ -628,19 +607,6 @@
} }
}, },
},
computed:{
lineOption1() {
// 这里我们不需要再次调用 setOption,因为 Vue 会自动处理绑定
return this.testOption1;
},
lineOption2() {
// 这里我们不需要再次调用 setOption,因为 Vue 会自动处理绑定
return this.testOption2;
},
currentTime() {
return this.formatTime(this.date);
},
} }
}) })
</script> </script>
......
...@@ -124,7 +124,6 @@ module.exports = { ...@@ -124,7 +124,6 @@ module.exports = {
}, },
watch:{ watch:{
factory(newVal) { factory(newVal) {
console.log(1)
this.getByProcessSumWt(); this.getByProcessSumWt();
this.queryBySunWt(); this.queryBySunWt();
}, },
...@@ -143,15 +142,11 @@ module.exports = { ...@@ -143,15 +142,11 @@ module.exports = {
var inInfo = new EiInfo(); var inInfo = new EiInfo();
// inInfo.set('inqu_status-0-factoryCode','R24070364') // inInfo.set('inqu_status-0-factoryCode','R24070364')
// inInfo.set('inqu_status-0-depositDate','20241019') // inInfo.set('inqu_status-0-depositDate','20241019')
console.log('this.factory',this.factory)
console.log('this.factory',this.datapicker)
inInfo.set('inqu_status-0-factoryCode',this.factory) inInfo.set('inqu_status-0-factoryCode',this.factory)
inInfo.set('inqu_status-0-depositDate',this.datapicker) inInfo.set('inqu_status-0-depositDate',this.datapicker)
IPLAT.EiCommunicator.send('HGSC007', 'getByProcessSumWt', inInfo, { IPLAT.EiCommunicator.send('HGSC007', 'getByProcessSumWt', inInfo, {
onSuccess: function (res) { onSuccess: function (res) {
if(undefined != res.extAttr.result[0]){ if(undefined != res.extAttr.result[0]){
console.log('累计产量',res.extAttr.result[0])
console.log('getByProcessSumWt',res)
_this.getByProcessSumWtList = res.extAttr.result[0] _this.getByProcessSumWtList = res.extAttr.result[0]
}else { }else {
_this.getByProcessSumWtList.push({ _this.getByProcessSumWtList.push({
...@@ -163,7 +158,7 @@ module.exports = { ...@@ -163,7 +158,7 @@ module.exports = {
}, },
onFail: function (err) { onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
} }
}, },
{async: false} {async: false}
...@@ -172,19 +167,14 @@ module.exports = { ...@@ -172,19 +167,14 @@ module.exports = {
queryBySunWt(){ queryBySunWt(){
let _this = this; let _this = this;
var inInfo = new EiInfo(); var inInfo = new EiInfo();
console.log('this.factory',this.factory)
console.log('this.factory',this.datapicker)
inInfo.set('inqu_status-0-factoryCode',this.factory) inInfo.set('inqu_status-0-factoryCode',this.factory)
inInfo.set('inqu_status-0-depositDate',this.dataPicker) inInfo.set('inqu_status-0-depositDate',this.dataPicker)
IPLAT.EiCommunicator.send('HGSC007', 'queryBySunWt', inInfo, { IPLAT.EiCommunicator.send('HGSC007', 'queryBySunWt', inInfo, {
onSuccess: function (res) { onSuccess: function (res) {
console.log('-------------------------')
console.log('累计工序',res.blocks.result.extAttr.processNameList)
console.log('累计工序',res)
_this.queryBySunWtList = res.blocks.result.extAttr.processNameList _this.queryBySunWtList = res.blocks.result.extAttr.processNameList
}, },
onFail: function (err) { onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
} }
}, },
{async: false} {async: false}
......
...@@ -8,21 +8,44 @@ ...@@ -8,21 +8,44 @@
</div> </div>
<div class="page-content-main"> <div class="page-content-main">
<div class="page-title-project"> <!-- <div class="page-title-project">-->
<div v-for="(item,index) in dataList" <!-- <div v-for="(item,index) in dataList"-->
:key="index" class="project-title-font" <!-- :key="index" class="project-title-font"-->
> <!-- >-->
{{ item }} <!-- {{ item }}-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div v-for="(temp,index) in getByProjCodewtWtList" :key="index" class="page-title-project" <!-- <div v-for="(temp,index) in getByProjCodewtWtList" :key="index" class="page-title-project"-->
style="margin-top: 0.8vh;height: 5vh;border: 1px solid #0097FF ;"> <!-- style="margin-top: 0.8vh;height: 5vh;border: 1px solid #0097FF ;">-->
<div v-for="(item,index) in getByProjCodewtWtArray" <!-- <div v-for="(item,index) in getByProjCodewtWtArray"-->
:key="index" class="project-title-font" style="opacity: 0.5;" <!-- :key="index" class="project-title-font" style="opacity: 0.5;"-->
<!-- >-->
<!-- {{ temp[item] }}-->
<!-- </div>-->
<!-- </div>-->
<el-table
:data="getByProjCodewtWtList"
border
height="68vh"
id="tableId1"
:highlight-current-row="true"
style="width: 100%">
<el-table-column
v-for="(colVal,i) in columns"
:prop="colVal.value"
:align="colVal.align"
:label="colVal.label"
:width="colVal.width"
> >
{{ temp[item] }} <template slot-scope="scope">
</div> <span class="project-title-font">{{scope.row[colVal.value] | resetData}}</span>
</div> </template>
</el-table-column>
</el-table>
</div> </div>
</div> </div>
...@@ -43,8 +66,52 @@ module.exports = { ...@@ -43,8 +66,52 @@ module.exports = {
getByProjCodewtWtList:[], getByProjCodewtWtList:[],
dataList:['项目名称','计划完成时间','计划产量','实际产量','进度'], dataList:['项目名称','计划完成时间','计划产量','实际产量','进度'],
getByProjCodewtWtArray:['projName','completeDate','totalWeight','finishWeight','schedule'], getByProjCodewtWtArray:['projName','completeDate','totalWeight','finishWeight','schedule'],
columns:[
{
label: '项目名称',
align: 'center',
value: 'projName',
width:''
},
{
label: '计划完成时间',
align: 'center',
value: 'completeDate',
width:''
},
{
label: '计划产量',
align: 'center',
value: 'totalWeight',
width:'60'
},
{
label: '实际产量',
align: 'center',
value: 'finishWeight',
width:'60'
},
{
label: '进度(%)',
align: 'center',
value: 'schedule',
width:'40'
}
]
}; };
}, },
filters: {
resetData(d) {
if (d === '' || d === undefined) {
return '-'
} else if (d === 0) {
return 0
} else if (typeof d === 'number') {
return d.toFixed(2)
}
return d
}
},
watch:{ watch:{
factory(newVal) { factory(newVal) {
this.getByProjCodewt(); this.getByProjCodewt();
...@@ -60,18 +127,17 @@ module.exports = { ...@@ -60,18 +127,17 @@ module.exports = {
getByProjCodewt(){ getByProjCodewt(){
let _this = this; let _this = this;
var inInfo = new EiInfo(); var inInfo = new EiInfo();
console.log('this.factory',this.factory)
console.log('this.factory',this.datapicker)
inInfo.set('inqu_status-0-factoryCode',this.factory) inInfo.set('inqu_status-0-factoryCode',this.factory)
inInfo.set('inqu_status-0-depositDate',this.dataPicker) inInfo.set('inqu_status-0-depositDate',this.dataPicker)
IPLAT.EiCommunicator.send('HGSC007', 'getByProjCodeWt', inInfo, { IPLAT.EiCommunicator.send('HGSC007', 'getByProjCodeWt', inInfo, {
onSuccess: function (res) { onSuccess: function (res) {
_this.getByProjCodewtWtList = res.extAttr.result _this.getByProjCodewtWtList = res.extAttr.result;
console.log('项目生产',res.extAttr.result) _this.$nextTick(() => {
console.log('项目生产',res) tableContentScroll('tableId1')
})
}, },
onFail: function (err) { onFail: function (err) {
console.error('request_tools----------------->错误信息', err);
} }
}, },
{async: false} {async: false}
...@@ -152,15 +218,9 @@ module.exports = { ...@@ -152,15 +218,9 @@ module.exports = {
display: flex; display: flex;
} }
.project-title-font{ .project-title-font{
width: 25%; color: #f4f4f4;
height: 100%;
display: flex;
font-size: 0.7vw;
justify-content: center;
align-items: center;
color: #fff;
overflow: hidden; overflow: hidden;
flex-wrap: wrap; flex-wrap: wrap;
font-size: 0.65vw;
} }
</style> </style>
...@@ -4,6 +4,9 @@ $(function() { ...@@ -4,6 +4,9 @@ $(function() {
$("#QUERY").on("click", function () { $("#QUERY").on("click", function () {
query(); query();
}); });
$("#QUERY_MORE").on("click",function (){
grush.queryMore(68)
})
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
...@@ -22,6 +25,35 @@ $(function() { ...@@ -22,6 +25,35 @@ $(function() {
} }
} }
], ],
exportGrid: {
beforeExport: function (gridInstance) {
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
return true;
},
exportServiceName: "HGCW002", // gridserviceName
exportMethodName: "export", // gridqueryMethod
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "合同管理_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (e) { loadComplete: function (e) {
$("#BTN_INSERT").on("click",addFunc); $("#BTN_INSERT").on("click",addFunc);
$("#BTN_UPDATE").on("click",updateFunc); $("#BTN_UPDATE").on("click",updateFunc);
......
...@@ -4,6 +4,13 @@ ...@@ -4,6 +4,13 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<style type="text/css">
#more {
height: 0;
overflow: hidden;
transition: height 0.5s ease-in-out;
}
</style>
<script> <script>
var ctx = "${ctx}"; var ctx = "${ctx}";
</script> </script>
...@@ -30,6 +37,8 @@ ...@@ -30,6 +37,8 @@
startName="signingDateFrom" endName="signingDateTo" row="0" role="date" startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true"> format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan> </EF:EFDateSpan>
</div>
<div class="row" id="more">
<EF:EFInput cname="甲方名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" /> <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:EFInput cname="乙方名称" ename="partyB" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="分支单位" ename="inqu_status-0-branchUnit" colWidth="3" filter="contains"> <EF:EFSelect cname="分支单位" ename="inqu_status-0-branchUnit" colWidth="3" filter="contains">
...@@ -53,9 +62,9 @@ ...@@ -53,9 +62,9 @@
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" autoFit="false"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" autoFit="false" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <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="200" align="center" sort="false"/>
<EF:EFColumn ename="companyName" cname="所属公司" align="center" enable="false"/> <EF:EFColumn ename="companyName" cname="所属公司" align="center" enable="false"/>
<EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/> <EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/>
<EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/> <EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/>
......
...@@ -5,6 +5,9 @@ $(function () { ...@@ -5,6 +5,9 @@ $(function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
}); });
$("#QUERY_MORE").on("click",function (){
grush.queryMore(34)
})
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
...@@ -39,9 +42,39 @@ $(function () { ...@@ -39,9 +42,39 @@ $(function () {
+ +
'onclick="showInfo(' + item.id + ')" >立项详情</a>'; 'onclick="showInfo(' + item.id + ')" >立项详情</a>';
return template; return template;
} }
}], }
],
exportGrid: {
beforeExport: function (gridInstance) {
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
return true;
},
exportServiceName: "HGSC001",
exportMethodName: "export",
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "项目立项_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid){ loadComplete: function(grid){
// 新增 // 新增
$("#add").click(create); $("#add").click(create);
......
...@@ -4,7 +4,13 @@ ...@@ -4,7 +4,13 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<style type="text/css">
#more {
height: 0;
overflow: hidden;
transition: height 0.5s ease-in-out;
}
</style>
<script> <script>
var ctx = "${ctx}"; var ctx = "${ctx}";
</script> </script>
...@@ -27,12 +33,24 @@ ...@@ -27,12 +33,24 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.projStatus" /> <EF:EFCodeOption codeName="hggp.projStatus" />
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="分支单位" ename="inqu_status-0-branchUnit" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
</div>
<div class="row" id="more">
<EF:EFDatePicker blockId="inqu_status" row="0" ename="permissStartDate" cname="准许开工日期"
role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="startDate" cname="开工日期"
role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="endDate" cname="完工日期"
role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="mixed" isFloat="true" copyToAdd="false"> <EF:EFGrid blockId="result" autoDraw="mixed" isFloat="true" copyToAdd="false" sort="single">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center" sort="false"/>
<%-- <EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="120" align="center"/>--%> <%-- <EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="120" align="center"/>--%>
<%-- <EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="120" align="center"/>--%> <%-- <EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="120" align="center"/>--%>
<%-- <EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center"/>--%> <%-- <EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center"/>--%>
......
...@@ -112,6 +112,34 @@ $(function () { ...@@ -112,6 +112,34 @@ $(function () {
} }
} }
], ],
exportGrid: {
beforeExport: function (gridInstance) {
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
return true;
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "项目人员_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGSC002",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid) { loadComplete: function(grid) {
// 此 grid 对象 // 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化 // 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script> <script>
var ctx = "${ctx}"; var ctx = "${ctx}";
</script> </script>
...@@ -18,16 +17,17 @@ ...@@ -18,16 +17,17 @@
<EF:EFInput ename="inqu_status-0-personName" cname="姓名" placeholder="模糊查询" colWidth="3"/> <EF:EFInput ename="inqu_status-0-personName" cname="姓名" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-personIdCard" cname="身份证号" placeholder="模糊查询" colWidth="3"/> <EF:EFInput ename="inqu_status-0-personIdCard" cname="身份证号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-personPhone" cname="电话" placeholder="模糊查询" colWidth="3"/> <EF:EFInput ename="inqu_status-0-personPhone" cname="电话" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-personDepName" cname="所属部门" placeholder="模糊查询" colWidth="3"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <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="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="createdBy" cname="创建人" hidden="true"/> <EF:EFColumn ename="createdBy" cname="创建人" hidden="true"/>
<EF:EFColumn ename="updatedBy" cname="修改人" hidden="true"/> <EF:EFColumn ename="updatedBy" cname="修改人" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/> <EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="100" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="100" align="center" sort="false"/>
<EF:EFColumn ename="companyCode" cname="公司名称" enable="true" width="120" align="center" required="true"/> <EF:EFColumn ename="companyCode" cname="公司名称" enable="true" width="120" align="center" required="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="160" align="center" required="true"/> <EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="160" align="center" required="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center" readonly="true"/> <EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center" readonly="true"/>
......
...@@ -100,6 +100,34 @@ $(function (){ ...@@ -100,6 +100,34 @@ $(function (){
} }
} }
], ],
exportGrid: {
beforeExport: function (gridInstance) {
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
return true;
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "蓝图清单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGSC003",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid) { loadComplete: function(grid) {
// 此 grid 对象 // 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化 // 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <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="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="companyCode" cname="公司名称" <EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
......
...@@ -136,6 +136,34 @@ $(function (){ ...@@ -136,6 +136,34 @@ $(function (){
} }
} }
], ],
exportGrid: {
beforeExport: function (gridInstance) {
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
return true;
},
exportServiceName: "HGSC004",
exportMethodName: "export",
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "产品清单" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid) { loadComplete: function(grid) {
// 此 grid 对象 // 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化 // 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
......
...@@ -4,7 +4,13 @@ ...@@ -4,7 +4,13 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<style type="text/css">
#more {
height: 0;
overflow: hidden;
transition: height 0.5s ease-in-out;
}
</style>
<script> <script>
var ctx = "${ctx}"; var ctx = "${ctx}";
</script> </script>
...@@ -23,9 +29,9 @@ ...@@ -23,9 +29,9 @@
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <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="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="companyCode" cname="公司编码" <EF:EFComboColumn ename="companyCode" cname="公司编码"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
......
...@@ -364,6 +364,34 @@ $(function () { ...@@ -364,6 +364,34 @@ $(function () {
} }
} }
], ],
exportGrid: {
beforeExport: function (gridInstance) {
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
return true;
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "产品清单详情" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGSC004A",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function (grid) { // 在Grid加载完成后,才能给Grid上的按钮绑定事件 loadComplete: function (grid) { // 在Grid加载完成后,才能给Grid上的按钮绑定事件
$("#SC02").on("click", function () { $("#SC02").on("click", function () {
if (grid.getCheckedBlockData().rows.length === 0) { if (grid.getCheckedBlockData().rows.length === 0) {
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<div id="right-pane" class="i-fit-height" style="width: 80%;float: right"> <div id="right-pane" class="i-fit-height" style="width: 80%;float: right">
<EF:EFRegion id="result" title="明细信息"> <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="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="lv" cname="层级" hidden="true"/> <EF:EFColumn ename="lv" cname="层级" hidden="true"/>
<EF:EFColumn enable="false" ename="parentProdCode" hidden="false" cname="上级产品编号"/> <EF:EFColumn enable="false" ename="parentProdCode" hidden="false" cname="上级产品编号"/>
...@@ -51,8 +51,8 @@ ...@@ -51,8 +51,8 @@
<EF:EFColumn enable="false" ename="productId" hidden="true" cname="产品id"/> <EF:EFColumn enable="false" ename="productId" hidden="true" cname="产品id"/>
<EF:EFColumn enable="false" ename="productType" hidden="true" cname="产品类型"/> <EF:EFColumn enable="false" ename="productType" hidden="true" cname="产品类型"/>
<EF:EFColumn enable="false" ename="inventType" hidden="true" cname="库存类型"/> <EF:EFColumn enable="false" ename="inventType" hidden="true" cname="库存类型"/>
<EF:EFColumn ename="operator" cname="操作" width="140" enable="false" readonly="false"/> <EF:EFColumn ename="operator" cname="操作" width="140" enable="false" readonly="false" sort="false"/>
<EF:EFComboColumn cname="变更类型" ename="changeType" width="90" align="center" enable="false" required="false"> <EF:EFComboColumn cname="变更类型" ename="changeType" width="90" align="center" enable="false" required="false" sort="false">
<EF:EFCodeOption codeName="hggp.sc.changeType" /> <EF:EFCodeOption codeName="hggp.sc.changeType" />
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="productCode" required="true" cname="产品编号" /> <EF:EFColumn ename="productCode" required="true" cname="产品编号" />
...@@ -73,7 +73,6 @@ ...@@ -73,7 +73,6 @@
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0" displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/" data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFComboColumn cname="审核状态" ename="approvalStatus" width="90" align="center" required="false" enable="false"> <EF:EFComboColumn cname="审核状态" ename="approvalStatus" width="90" align="center" required="false" enable="false">
<EF:EFCodeOption codeName="hggp.hgyx.status" /> <EF:EFCodeOption codeName="hggp.hgyx.status" />
</EF:EFComboColumn> </EF:EFComboColumn>
......
...@@ -22,6 +22,34 @@ $(function () { ...@@ -22,6 +22,34 @@ $(function () {
} }
} }
], ],
exportGrid: {
beforeExport: function (gridInstance) {
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
return true;
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "生产计划" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGSC005",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid) { loadComplete: function(grid) {
//提交 //提交
$("#BNT_COMMIT").on("click", commit); $("#BNT_COMMIT").on("click", commit);
......
...@@ -27,12 +27,12 @@ ...@@ -27,12 +27,12 @@
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <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="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="matId" cname="物料清单ID" hidden="true"/> <EF:EFColumn ename="matId" cname="物料清单ID" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编码" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="companyCode" cname="公司编码" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="160" align="center" /> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="160" align="center" sort="false"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" enable="true" align="center" readOnly="true"/>
......
...@@ -19,6 +19,34 @@ $(function () { ...@@ -19,6 +19,34 @@ $(function () {
}, },
columns: [ columns: [
], ],
exportGrid: {
beforeExport: function (gridInstance) {
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
return true;
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "生产计划详情" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGSC005A",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid) { loadComplete: function(grid) {
}, },
onSuccess: function (e) { onSuccess: function (e) {
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <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="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="120" align="center" readonly="true"/> <EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="120" align="center" readonly="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center" readonly="true"/> <EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center" readonly="true"/>
......
...@@ -21,6 +21,34 @@ $(function () { ...@@ -21,6 +21,34 @@ $(function () {
return template; return template;
} }
}], }],
exportGrid: {
beforeExport: function (gridInstance) {
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
return true;
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "生产订单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGSC006",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid) { loadComplete: function(grid) {
}, },
onSuccess: function (e) { onSuccess: function (e) {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" showCount="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" showCount="true" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="200" align="center" /> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="200" align="center" />
<EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/>
......
...@@ -23,6 +23,34 @@ $(function () { ...@@ -23,6 +23,34 @@ $(function () {
return template; return template;
} }
}], }],
exportGrid: {
beforeExport: function (gridInstance) {
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
return true;
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "生产订单" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGSC006A",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid) { loadComplete: function(grid) {
// 批量分派 // 批量分派
$("#BNT_ASSIGN").on("click", assign); $("#BNT_ASSIGN").on("click", assign);
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" showCount="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" showCount="true" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="center" /> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="center" />
<EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/>
......
...@@ -4,6 +4,9 @@ $(function () { ...@@ -4,6 +4,9 @@ $(function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
}); });
$("#QUERY_MORE").on("click",function (){
grush.queryMore(34)
})
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
...@@ -33,6 +36,34 @@ $(function () { ...@@ -33,6 +36,34 @@ $(function () {
} }
} }
], ],
exportGrid: {
beforeExport: function (gridInstance) {
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
return true;
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "生产订单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGSC007",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid) { loadComplete: function(grid) {
}, },
onSuccess: function (e) { onSuccess: function (e) {
......
...@@ -8,11 +8,23 @@ ...@@ -8,11 +8,23 @@
%> %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" /> <c:set var="loginName" value="<%=loginName%>" />
<style type="text/css">
#more {
height: 0;
overflow: hidden;
transition: height 0.5s ease-in-out;
}
</style>
<EF:EFPage title="生产任务"> <EF:EFPage title="生产任务">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput ename="inqu_status-0-orderDetailId" cname="订单详情ID" type="hidden"/> <EF:EFInput ename="inqu_status-0-orderDetailId" cname="订单详情ID" type="hidden"/>
<EF:EFInput ename="inqu_status-0-companyName" cname="公司名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-taskCode" cname="生产任务单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect cname="报工状态" ename="status" blockId="inqu_status" row="0" colWidth="3" optionLabel="全部" filter="contains">
<EF:EFCodeOption codeName="hggp.hgsc.status"/>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-productCode" cname="产品编码" placeholder="模糊查询" colWidth="3"/> <EF:EFInput ename="inqu_status-0-productCode" cname="产品编码" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="createdTime" cname="生产任务日期" role="date" <EF:EFDatePicker blockId="inqu_status" row="0" ename="createdTime" cname="生产任务日期" role="date"
...@@ -20,23 +32,19 @@ ...@@ -20,23 +32,19 @@
<EF:EFDatePicker blockId="inqu_status" row="0" ename="completeDate" cname="生产完工日期" role="date" <EF:EFDatePicker blockId="inqu_status" row="0" ename="completeDate" cname="生产完工日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/> format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
</div> </div>
<div class="row"> <div class="row" id="more">
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="班组名称" placeholder="模糊查询" colWidth="3"/> <EF:EFSelect cname="工序" ename="processCode" blockId="inqu_status" row="0" colWidth="3" optionLabel="全部" filter="contains">
<EF:EFSelect cname="工序" ename="processCode" blockId="inqu_status" row="0" colWidth="3" optionLabel="全部"
filter="contains">
<EF:EFOptions blockId="processCode_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="processCode_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="报工状态" ename="status" blockId="inqu_status" row="0" colWidth="3" optionLabel="全部" filter="contains"> <EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="班组名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFCodeOption codeName="hggp.hgsc.status"/>
</EF:EFSelect>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息" fitHeight="true"> <EF:EFRegion id="result" title="明细信息" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" sort="all">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="账套" hidden="true"/> <EF:EFColumn ename="accountCode" 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:EFColumn ename="companyName" cname="公司名称" enable="true" width="180" align="center" readOnly="true"/> <EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="180" align="center" readOnly="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="true" width="140" align="center" readOnly="true"/> <EF:EFColumn ename="projName" cname="项目名称" enable="true" width="140" align="center" readOnly="true"/>
<EF:EFColumn ename="createdTime" cname="生产任务日期" width="120" enable="true" readonly="false" align="center" editType="date" <EF:EFColumn ename="createdTime" cname="生产任务日期" width="120" enable="true" readonly="false" align="center" editType="date"
......
...@@ -4,6 +4,9 @@ $(function () { ...@@ -4,6 +4,9 @@ $(function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
}); });
$("#QUERY_MORE").on("click",function (){
grush.queryMore(34)
})
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
...@@ -29,12 +32,33 @@ $(function () { ...@@ -29,12 +32,33 @@ $(function () {
return options.length == 0 ? "-" : options.length; return options.length == 0 ? "-" : options.length;
} }
}], }],
loadComplete: function(grid) { exportGrid: {
}, beforeExport: function (gridInstance) {
onSuccess: function (e) { var validator1 = IPLAT.Validator({
if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){ id: "inqu"
query(); });
} // 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
return true;
},
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "生产订单_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportServiceName: "HGSC008",
exportMethodName: "export",
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
}, },
onSave: function (e) { onSave: function (e) {
// 阻止后台保存请求,使用自定义保存 // 阻止后台保存请求,使用自定义保存
......
...@@ -8,21 +8,38 @@ ...@@ -8,21 +8,38 @@
%> %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" /> <c:set var="loginName" value="<%=loginName%>" />
<style type="text/css">
#more {
height: 0;
overflow: hidden;
transition: height 0.5s ease-in-out;
}
</style>
<EF:EFPage title="生产报工单"> <EF:EFPage title="生产报工单">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" placeholder="模糊查询" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="registerDate" cname="报工日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="planEndDate" cname="计划完工日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="productCode" cname="产品编码" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="workCode" cname="报工单号" placeholder="模糊查询" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="workCode" cname="报工单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="processName" cname="工序" placeholder="模糊查询" colWidth="3"/>
</div>
<div class="row" id="more">
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="生产组" placeholder="模糊查询" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="生产组" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="spec" cname="规格" placeholder="模糊查询" colWidth="3"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息" fitHeight="true"> <EF:EFRegion id="result" title="明细信息" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" sort="all">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="账套" hidden="true"/> <EF:EFColumn ename="accountCode" 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:EFColumn ename="companyName" cname="公司名称" enable="false" width="180" align="center" readOnly="true"/> <EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="180" align="center" readOnly="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="workCode" cname="报工单号" width="130" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="workCode" cname="报工单号" width="130" enable="false" readonly="true" align="center"/>
......
...@@ -620,6 +620,16 @@ const grush = { ...@@ -620,6 +620,16 @@ const grush = {
} }
return true; return true;
}, },
queryMore (num) {
let $more = $("#more");
let height = $more.height();
if (height > 0){
$more.css("height",0);
}else{
$more.css("height",num+"px");
}
}
} }
function isExcelFile(uploadFileUrl) { function isExcelFile(uploadFileUrl) {
......
let timer1 = {}
const tableContentScroll = (el) => {
if (timer1[el]) {
clearInterval(timer1[el])
timer1[el] = null;
}
setTimeout(()=>{
let i = $("#" + el + ' .el-table__body-wrapper table');
let i2 = $("#" + el + ' .el-table__body-wrapper');
let a = 0;
let boxHeight = i.height();
let height = i2.height();
let num = boxHeight - height;
// console.log(boxHeight, height, num,"高度数据")
let run = () => {
if (num > 0) {
timer1[el] = setInterval(() => {
a = a + 0.07;
if (a >= num) {
a = 0
}
i2.scrollTop(a);
}, 10)
}
}
run()
i.on('mouseenter', () => {
clearInterval(timer1[el])
timer1[el] = null
i2.on('scroll',()=>{
a = i2.scrollTop();
})
})
i.on("mouseleave",()=>{
i2.off("scroll");
if(!timer1[el]){
run()
}
})
},50)
}
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