Commit 738dc9ec by liuyang

2024/03/15 报工管理问题修复

parent 79373890
......@@ -235,42 +235,42 @@ public enum DdynamicEnum {
* 用途:用户查询
* 编写:ly
*/
USER_ID_BLOCK_ID("user_id_block_id","userId","userName","factoryCode","groupCode", "deleteFlag","HPSC008.queryUserId"),
USER_ID_BLOCK_ID("user_id_block_id","userId","userName","factoryCode","groupCode", "HPSC008.queryUserId"),
/**
* 模块:系统管理
* 用途:生产组查询
* 编写:ly
*/
GROUP_CODE_BLOCK_ID("group_code_block_id","groupCode","groupName","factoryCode", "deleteFlag","HPSC008.queryGroupCode"),
GROUP_CODE_BLOCK_ID("group_code_block_id","groupCode","groupName","factoryCode", "HPSC008.queryGroupCode"),
/**
* 模块:系统管理
* 用途:厂区查询
* 编写:ly
*/
FACTORY_CODE_BLOCK_ID("factory_code_block_id","factoryCode","factoryName", "deleteFlag","HPSC008.queryFactoryCode"),
FACTORY_CODE_BLOCK_ID("factory_code_block_id","factoryCode","factoryName","HPSC008.queryFactoryCode"),
/**
* 模块:系统管理
* 用途:用户查询
* 编写:ly
*/
USER_ID1_BLOCK_ID("user_id1_block_id","userId","userName","factoryCode","groupCode", "deleteFlag","HPSC008.queryUserId"),
USER_ID1_BLOCK_ID("user_id1_block_id","userId","userName","factoryCode","groupCode", "HPSC008.queryUserId"),
/**
* 模块:系统管理
* 用途:生产组查询
* 编写:ly
*/
GROUP_CODE1_BLOCK_ID("group_code1_block_id","groupCode","groupName","factoryCode", "deleteFlag","HPSC008.queryGroupCode"),
GROUP_CODE1_BLOCK_ID("group_code1_block_id","groupCode","groupName","factoryCode", "HPSC008.queryGroupCode"),
/**
* 模块:系统管理
* 用途:厂区查询
* 编写:ly
*/
FACTORY_CODE1_BLOCK_ID("factory_code1_block_id","factoryCode","factoryName", "deleteFlag","HPSC008.queryFactoryCode"),
FACTORY_CODE1_BLOCK_ID("factory_code1_block_id","factoryCode","factoryName", "HPSC008.queryFactoryCode"),
/**
......
......@@ -35,13 +35,13 @@ public class ServiceHPSC008 extends ServiceEPBase {
Arrays.asList(DdynamicEnum.USER_ID_BLOCK_ID,DdynamicEnum.GROUP_CODE_BLOCK_ID,DdynamicEnum.FACTORY_CODE_BLOCK_ID),
new HashMap<String,Object>(){{put(HPSC008.FIELD_COMPANY_CODE,companyCode);}}
);
/*CommonMethod.initBlock(outEiInfo,
CommonMethod.initBlock(outEiInfo,
Arrays.asList(DdynamicEnum.USER_ID1_BLOCK_ID,DdynamicEnum.GROUP_CODE1_BLOCK_ID,DdynamicEnum.FACTORY_CODE1_BLOCK_ID),
new HashMap<String,Object>(){{
put(HPSC008.FIELD_COMPANY_CODE,companyCode);
put(HPSC008.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}}
);*/
);
//outEiInfo.getBlock(EiConstant.resultBlock).getRows().clear();
return outEiInfo;
}
......@@ -104,17 +104,24 @@ public class ServiceHPSC008 extends ServiceEPBase {
String factoryCode = inInfo.getString(HPPZ013.FIELD_FACTORY_CODE);
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.GROUP_CODE_BLOCK_ID),
new HashMap<String,Object>(){{put(HPSC008.FIELD_COMPANY_CODE,companyCode);put(HPPZ013.FIELD_FACTORY_CODE,factoryCode);}});
new HashMap<String,Object>(){{
put(HPSC008.FIELD_COMPANY_CODE,companyCode);
put(HPSC008.FIELD_FACTORY_CODE,factoryCode);
}});
return inInfo;
}
public EiInfo queryGroupCode(EiInfo inInfo) {
final String companyCode = UserSessionUtils.getCompanyCode();
String factoryCode = inInfo.getString(HPPZ013.FIELD_FACTORY_CODE);
String groupCode = inInfo.getString(HPPZ013.FIELD_GROUP_CODE);
String groupCode = inInfo.getString(HPSC008.FIELD_GROUP_CODE);
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.USER_ID_BLOCK_ID),
new HashMap<String,Object>(){{put(HPSC008.FIELD_COMPANY_CODE,companyCode);put(HPPZ013.FIELD_FACTORY_CODE,factoryCode);put(HPPZ013.FIELD_GROUP_CODE,groupCode);}});
new HashMap<String,Object>(){{
put(HPSC008.FIELD_COMPANY_CODE,companyCode);
put(HPSC008.FIELD_FACTORY_CODE,factoryCode);
put(HPSC008.FIELD_GROUP_CODE,groupCode);
}});
return inInfo;
}
}
......@@ -260,12 +260,14 @@
<select id="queryFactoryCode" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
FACTORY_CODE as "factoryCode",
FACTORY_NAME as "factoryName",
DELETE_FLAG as "deleteFlag"
FACTORY_NAME as "factoryName"
FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
......@@ -281,15 +283,23 @@
SELECT DISTINCT
GROUP_CODE as "groupCode",
GROUP_NAME as "groupName",
FACTORY_CODE AS factoryCode,
DELETE_FLAG as "deleteFlag"
FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1 and GROUP_TYPE = 'prodGroup'
FACTORY_CODE AS factoryCode
FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isEmpty prepend=" AND " property="groupType">
GROUP_TYPE = 'prodGroup'
</isEmpty>
<isNotEmpty prepend=" AND " property="groupType">
GROUP_TYPE = #groupType#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
......@@ -306,9 +316,8 @@
USER_ID as "userId",
USER_NAME as "userName",
FACTORY_CODE AS factoryCode,
GROUP_CODE as "groupCode",
DELETE_FLAG as "deleteFlag"
FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1 and GROUP_TYPE = 'prodGroup' and STATUS = '1'
GROUP_CODE as "groupCode"
FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1 and STATUS = '1'
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -318,6 +327,15 @@
<isNotEmpty prepend=" AND " property="groupCode">
GROUP_CODE = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isEmpty prepend=" AND " property="groupType">
GROUP_TYPE = 'prodGroup'
</isEmpty>
<isNotEmpty prepend=" AND " property="groupType">
GROUP_TYPE = #groupType#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
......
......@@ -2,15 +2,6 @@ $(function () {
var factoryCodes = __eiInfo.getBlock("factory_code_block_id").getMappedRows();
var groupCodes = __eiInfo.getBlock("group_code_block_id").getMappedRows();
var userIds = __eiInfo.getBlock("user_id_block_id").getMappedRows();
var factoryCode = _.filter(__eiInfo.getBlock("factory_code_block_id").getMappedRows(), function (item) {
return item["param1Field"]=="false";
});
var groupCode = _.filter(__eiInfo.getBlock("group_code_block_id").getMappedRows(), function (item) {
return item["param2Field"]=="false";
});
var userId = _.filter(__eiInfo.getBlock("user_id_block_id").getMappedRows(), function (item) {
return item["param3Field"]=="false";
});
$(".row").children().attr("class", "col-md-3");
......@@ -52,6 +43,17 @@ $(function () {
return currShortDate();
}
},{
field: "factoryCode",
title: "工厂",
template: function (dataItem) {
for (let i = 0; i < factoryCodes.length; i++) {
if (factoryCodes[i]['valueField'] === dataItem['factoryCode']) {
return factoryCodes[i]['textField'];
}
}
return dataItem["factoryCode"];
}
},{
field: "groupCode",
title: "生产组",
filter: function (options) {
......@@ -65,6 +67,14 @@ $(function () {
} else {
return [];
}
},
template: function (dataItem) {
for (let i = 0; i < groupCodes.length; i++) {
if (groupCodes[i]['valueField'] === dataItem['groupCode']) {
return groupCodes[i]['textField'];
}
}
return dataItem["groupCode"];
}
},{
field: "userId",
......@@ -81,6 +91,14 @@ $(function () {
} else {
return [];
}
},
template: function (dataItem) {
for (let i = 0; i < userIds.length; i++) {
if (userIds[i]['valueField'] === dataItem['userId']) {
return userIds[i]['textField'];
}
}
return dataItem["userId"];
}
}],
loadComplete: function(grid) {
......@@ -101,10 +119,10 @@ $(function () {
//e.sender.dataSource.options.fields[5].values = groupCode
//e.sender.dataSource.options.fields[6].values = userId;
// 动态设置默认邮箱
$.each(e.items, function(index, item){
/*$.each(e.items, function(index, item){
item['prdtName'] = "demo"+ index + "@baosight.com";
});
});*/
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
......@@ -148,7 +166,7 @@ $(function () {
EiCommunicator.send("HPSC008", "queryFactoryCode", inInfo, {
onSuccess: function (ei) {
var input=$("#inqu_status-0-groupCode");
dataEdition=ei.getBlock("group_code_block_id").getMappedRows();
let dataEdition=ei.getBlock("group_code_block_id").getMappedRows();
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
......@@ -171,7 +189,7 @@ $(function () {
EiCommunicator.send("HPSC008", "queryGroupCode", inInfo, {
onSuccess: function (ei) {
var input=$("#inqu_status-0-userId");
dataEdition=ei.getBlock("user_id_block_id").getMappedRows();
let dataEdition=ei.getBlock("user_id_block_id").getMappedRows();
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
......
......@@ -48,19 +48,19 @@
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="registerDate" cname="登记日期" width="160" align="center" editType="date" readonly="true"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_code_block_id"
<EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_code1_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFComboColumn ename="groupCode" cname="生产组" blockName="group_code_block_id"
<EF:EFComboColumn ename="groupCode" cname="生产组" blockName="group_code1_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFComboColumn ename="userId" cname="员工" blockName="user_id_block_id"
<EF:EFComboColumn ename="userId" cname="员工" blockName="user_id1_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="100" required="true"
......
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