这样的需求应该如何实现?
@RequestMapping(value = "/searchDetailData")
public CIPResponseQueryMsg searchDetailData(CIPReqParameter parameter,HttpServletRequest request) {
CIPResponseQueryMsg msg = new CIPResponseQueryMsg();
try {
// String spare_store_id = request.getParameter("spare_store_id");
// String str = "{\"spare_store_id\":\""+spare_store_id+"\"}";
// parameter.setSearch_condition(str);
/*'{"emp_id":"90056532","emp_name":"","emp_status":"","begin_data":"","end_data":""}'*/
CIPPageInfo page = new CIPPageInfo(parameter.getPage(),parameter.getRows());
String conditonStr = parameter.getSearch_condition();
CIPReqCondition[] conditions = null;
if(conditonStr!=null){
Map reqCondtions = JSONUtils.convertJson2Object(conditonStr, HashMap.class);
Set<String> keys = reqCondtions.keySet();
CIPReqCondition req = null;
CIPReqCondition[] tempConditions = new CIPReqCondition[keys.size()];
int i = 0;
String value;
for( String key : keys ){
value = (String) reqCondtions.get(key);
if(value==null || value.trim().equals(""))
continue;
req = new CIPReqCondition();
req.setFieldName(key);
req.setLowValue(value);
tempConditions[i++] = req;
}
if( i > 0 ){
conditions = new CIPReqCondition[i];
System.arraycopy(tempConditions, 0, conditions, 0, i);
}
}
List<EMS_storage_instore_detailData> vos = dataService.searchData(page,conditions);
上面注释掉的三行是根据spare_store_id这个标识来弹出一个包含spare_store_id的样式表
然而,这个样式表里要实现根据另外的一个标识
如 入库流水号 这个标识来模糊搜索
再进行搜索时会进入这个control方法 结果返回的值并不是根据流水号的这个标识 好像是因为上面注释掉的限制了。。。
怎么设计可以在满足了第一次查询条件下 在进行第二各查询。。。。。。
public CIPResponseQueryMsg searchDetailData(CIPReqParameter parameter,HttpServletRequest request) {
CIPResponseQueryMsg msg = new CIPResponseQueryMsg();
try {
// String spare_store_id = request.getParameter("spare_store_id");
// String str = "{\"spare_store_id\":\""+spare_store_id+"\"}";
// parameter.setSearch_condition(str);
/*'{"emp_id":"90056532","emp_name":"","emp_status":"","begin_data":"","end_data":""}'*/
CIPPageInfo page = new CIPPageInfo(parameter.getPage(),parameter.getRows());
String conditonStr = parameter.getSearch_condition();
CIPReqCondition[] conditions = null;
if(conditonStr!=null){
Map reqCondtions = JSONUtils.convertJson2Object(conditonStr, HashMap.class);
Set<String> keys = reqCondtions.keySet();
CIPReqCondition req = null;
CIPReqCondition[] tempConditions = new CIPReqCondition[keys.size()];
int i = 0;
String value;
for( String key : keys ){
value = (String) reqCondtions.get(key);
if(value==null || value.trim().equals(""))
continue;
req = new CIPReqCondition();
req.setFieldName(key);
req.setLowValue(value);
tempConditions[i++] = req;
}
if( i > 0 ){
conditions = new CIPReqCondition[i];
System.arraycopy(tempConditions, 0, conditions, 0, i);
}
}
List<EMS_storage_instore_detailData> vos = dataService.searchData(page,conditions);
上面注释掉的三行是根据spare_store_id这个标识来弹出一个包含spare_store_id的样式表
然而,这个样式表里要实现根据另外的一个标识
如 入库流水号 这个标识来模糊搜索 再进行搜索时会进入这个control方法 结果返回的值并不是根据流水号的这个标识 好像是因为上面注释掉的限制了。。。
怎么设计可以在满足了第一次查询条件下 在进行第二各查询。。。。。。
...全文
相关推荐
如何通过平台实现校企合作?技术合作需求提交通道有哪些优势?.docx
如何通过平台实现校企合作?技术合作需求提交通道有哪些优势?
【第28例】IPD体系进阶 | 需求管理:需求实现过程
继续 IPD 体系中的需求管理相关的专题。先来看看整个需求管理涉及的过程内容:需求管理流程主要包含五个阶段:需求收集;需求分析;需求分发/分配;需求实现;需求验证与确认。在专栏的前几节内容中,着重讲解了需求的分析、分发。以及需求组织(需求管理/分析团队)相关的内容。今天就继续来讲讲需求实现。
科技成果如何实现精准对接市场需求?.docx
科技成果如何实现精准对接市场需求?
如何实现科技成果与企业需求的精准对接?.docx
如何实现科技成果与企业需求的精准对接?
科技中介服务机构在服务企业技术需求时,如何利用平台实现需求挖掘与服务流程的优化?.docx
科技中介服务机构在服务企业技术需求时,如何利用平台实现需求挖掘与服务流程的优化?


Web 开发
