Commit ef14de96 by wuwenlong

分页查询bugfix

parent f9ef2c88
......@@ -5,23 +5,17 @@ import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC001A;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Dept;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.util.*;
......@@ -34,7 +28,8 @@ public class ServiceHGSC001 extends ServiceBase {
@OperationLogAnnotation(operModul = "项目立项", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC001.QUERY, new HGSC001());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC001().eiMetadata);
// inInfo = super.query(inInfo, HGSC001.QUERY, new HGSC001());
Map map = new HashMap();
map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_TYPE_BLOCK_ID), map,false);
......
......@@ -30,7 +30,8 @@ public class ServiceHGSC002 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
List<Company> companyList = UserSessionUtils.getRoleCompany();
inInfo = super.query(inInfo, HGSC002.QUERY, new HGSC002());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC002().eiMetadata);
// inInfo = super.query(inInfo, HGSC002.QUERY, new HGSC002());
EiInfoUtils.addBlock(inInfo,"roleCompany", companyList, Company.class);
Map map = new HashMap();
map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode());
......
......@@ -27,7 +27,8 @@ public class ServiceHGSC005 extends ServiceBase {
@OperationLogAnnotation(operModul = "生产计划", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC005.QUERY, new HGSC005());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC005().eiMetadata);
// inInfo = super.query(inInfo, HGSC005.QUERY, new HGSC005());
List<Map> rows = inInfo.getBlock(EiConstant.resultBlock).getRows();
if(CollectionUtils.isNotEmpty(rows)){
List<HGSC005> hgsc005List = HGSCTools.THGSC005.buildFinishRate(HGSCTools.THGSC005.convertToObj(rows));
......
......@@ -27,7 +27,8 @@ public class ServiceHGSC005A extends ServiceBase {
String planCode = inInfo.getCellStr(EiConstant.queryBlock,0,HGSC005A.FIELD_plan_code);
HGSC005 hgsc005 = HGSCTools.THGSC005.queryByPlanCode(planCode);
inInfo.setCell(EiConstant.queryBlock,0,HGSC005.FIELD_is_schedule,hgsc005.getIsSchedule());
inInfo = super.query(inInfo, HGSC005A.QUERY, new HGSC005A());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC005A().eiMetadata);
// inInfo = super.query(inInfo, HGSC005A.QUERY, new HGSC005A());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PLAN_PROCESS_BLOCK_ID), new HashMap<String, Object>(){{
put(HGSC005A.FIELD_plan_code,planCode);
}},false);
......
......@@ -22,7 +22,8 @@ public class ServiceHGSC006 extends ServiceBase {
@OperationLogAnnotation(operModul = "生产订单", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC006.QUERY, new HGSC006());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC006().eiMetadata);
// inInfo = super.query(inInfo, HGSC006.QUERY, new HGSC006());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
......
......@@ -29,7 +29,8 @@ public class ServiceHGSC006A extends ServiceBase {
@OperationLogAnnotation(operModul = "生产订单详情", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC006A.QUERY, new HGSC006A());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC006A().eiMetadata);
// inInfo = super.query(inInfo, HGSC006A.QUERY, new HGSC006A());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
......
......@@ -37,7 +37,8 @@ import java.util.*;
@OperationLogAnnotation(operModul = "生产任务", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC007.QUERY, new HGSC007());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC007().eiMetadata);
// inInfo = super.query(inInfo, HGSC007.QUERY, new HGSC007());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
......
......@@ -26,6 +26,7 @@ public class ServiceHGSC008 extends ServiceEPBase {
@OperationLogAnnotation(operModul = "生产报工单", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC008().eiMetadata);
inInfo = super.query(inInfo, HGSC008.QUERY, new HGSC008());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
......@@ -36,7 +36,8 @@ public class ServiceHGZL002 extends ServiceBase {
@OperationLogAnnotation(operModul = "工序质检单", operType = "查询", operDesc = "初始化查询")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = customQuery(inInfo);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGZL002().eiMetadata);
// inInfo = customQuery(inInfo);
EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
......@@ -36,7 +36,8 @@ public class ServiceHGZL003 extends ServiceBase {
@OperationLogAnnotation(operModul = "日常巡检单", operType = "查询", operDesc = "初始化查询")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGZL003.QUERY, new HGZL003());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGZL003().eiMetadata);
// inInfo = super.query(inInfo, HGZL003.QUERY, new HGZL003());
EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class);
// EiInfoUtils.addBlock(inInfo,"workUserBlockId", UserSessionUtils.getUserByCompany(UserSessionUtils.getAccountCode()), User.class);
CommonMethod.objConvertComboBox(UserSessionUtils.getUserByCompany(UserSessionUtils.getAccountCode()),inInfo, "workUserBlockId","loginName","userName");
......
......@@ -21,7 +21,8 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
@OperationLogAnnotation(operModul = "日常巡检单-生产任务", operType = "查询", operDesc = "初始化页面")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGSC007.QUERY, new HGSC007());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC007().eiMetadata);
// inInfo = super.query(inInfo, HGSC007.QUERY, new HGSC007());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
......
......@@ -5,7 +5,6 @@ import com.baosight.hggp.common.HandleStatusEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.sc.domain.HGSC004;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.zl.domain.HGZL004;
import com.baosight.hggp.hg.zl.tools.HGZLTools;
......@@ -36,7 +35,8 @@ public class ServiceHGZL004 extends ServiceBase {
@OperationLogAnnotation(operModul = "整改通知单", operType = "查询", operDesc = "初始化查询")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGZL004.QUERY, new HGZL004());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGZL004().eiMetadata);
// inInfo = super.query(inInfo, HGZL004.QUERY, new HGZL004());
EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
......@@ -31,7 +31,8 @@ public class ServiceHGZL004A extends ServiceBase {
@OperationLogAnnotation(operModul = "整改通知单-沟通记录", operType = "查询", operDesc = "初始化查询")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGZL004A.QUERY, new HGZL004A());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGZL004A().eiMetadata);
// inInfo = super.query(inInfo, HGZL004A.QUERY, new HGZL004A());
EiInfoUtils.addBlock(inInfo,"userBlockId", UserSessionUtils.getUser(), User.class);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
......@@ -66,6 +66,18 @@ $(function () {
}
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
function showInfo(id) {
JSColorbox.open({
href: "HGSC001D?inqu_status-0-id=" + id + "&efParentFormEname=HGSC001",
......
......@@ -2,10 +2,7 @@ $(function () {
var userByCompany ;//= __eiInfo.getBlock("userByCompany").getMappedRows();
IPLATUI.EFGrid.detail = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
pageable:false,
columns: [{
field: "userCode",
template: function (dataItem) {
......
......@@ -2,10 +2,7 @@ $(function () {
var userByCompany = __eiInfo.getBlock("userByCompany").getMappedRows();
IPLATUI.EFGrid.detail = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
pageable:false,
columns: [{
field: "userCode",
template: function (dataItem) {
......
......@@ -2,10 +2,7 @@ $(function () {
var userByCompany = __eiInfo.getBlock("userByCompany").getMappedRows();
IPLATUI.EFGrid.detail = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
pageable:false,
columns: [{
field: "userCode",
template: function (dataItem) {
......@@ -60,11 +57,6 @@ $(function () {
onDelete: function(e) {
detailGrid.removeRows(detailGrid.getCheckedRowsIndex())
e.preventDefault();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
......
......@@ -179,3 +179,14 @@ function showUploadFile(id) {
});
}
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
\ No newline at end of file
......@@ -35,6 +35,18 @@ $(function () {
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
function showInfo(planCode) {
JSColorbox.open({
href: "HGSC005A?methodName=initLoad&inqu_status-0-planCode=" + planCode + "&efParentFormEname=HGSC005",
......
......@@ -7,7 +7,7 @@ $(function () {
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 10,
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [
......@@ -33,7 +33,7 @@ function query() {
$(window).load(function () {
// 查
// query();
query();
});
function schedule() {
......
......@@ -33,6 +33,18 @@ $(function () {
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
function showInfo(orderCode) {
JSColorbox.open({
href: "HGSC006A?methodName=initLoad&inqu_status-0-orderCode=" + orderCode + "&efParentFormEname=HGSC006",
......
......@@ -36,7 +36,17 @@ $(function () {
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
/**
* 批量分派
......
......@@ -34,7 +34,17 @@ $(function () {
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
/**
* 显示附件详情
......
......@@ -20,6 +20,16 @@ $(function () {
}
}
}
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
......@@ -53,8 +53,10 @@ $(function () {
var nowStr = now.getFullYear() + "-" + String(now.getMonth() + 1).padStart(2, '0') + "-" + String(now.getDate()).padStart(2, '0');
resultGrid.setCellValue(e.row, "checkDate", nowStr);
}
resultGrid.setCellValue(e.row, "checkBy", loginUser[0].userId);
resultGrid.setCellValue(e.row, "checkName", loginUser[0].userName);
if(loginUser.length>0) {
resultGrid.setCellValue(e.row, "checkBy", loginUser[0].userId);
resultGrid.setCellValue(e.row, "checkName", loginUser[0].userName);
}
}
// else{
// if(e.model.checkStatus === '0'){
......@@ -81,10 +83,14 @@ $(function () {
/**
* 查询
*/
let query = function () {
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
/**
* 提交操作
......@@ -102,17 +108,24 @@ let save = function () {
let passQuantity = rows[i]['passQuantity'];
let unpassQuantity = rows[i]['unpassQuantity'];
let quantity = rows[i]['quantity'];
let checkBy = rows[i]['checkBy'];
let checkCode = rows[i]['checkCode'];
if (!isNumber(passQuantity)||!isNumber(unpassQuantity)) {
message("第" + (i + 1) + "行合格数量与不合格数量必须是大于等于0的数字!");
message("质检单号[" + checkCode + "]合格数量与不合格数量必须是大于等于0的数字!");
return;
}
if (passQuantity > quantity) {
message("第" + (i + 1) + "行合格数量不能大于报工数量!");
message("质检单号[" + checkCode + "]合格数量不能大于报工数量!");
return;
}
if (unpassQuantity > quantity) {
message("第" + (i + 1) + "行不合格数量不能大于报工数量!");
message("质检单号[" + checkCode + "]不合格数量不能大于报工数量!");
return;
}
if(!checkBy||checkBy===' '){
message("质检单号[" + checkCode + "]质检人员不能为空!");
return;
}
......
......@@ -131,10 +131,14 @@ $(function () {
/**
* 查询
*/
let query = function () {
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
/**
* 提交操作
......
......@@ -42,3 +42,14 @@ $(function () {
});
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
\ No newline at end of file
......@@ -56,10 +56,14 @@ $(function () {
/**
* 查询
*/
let query = function () {
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
/**
* 提交操作
......
......@@ -33,10 +33,14 @@ $(function () {
/**
* 查询
*/
let query = function () {
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
......
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