基于条码查询

master
erzhongxmu 2020-04-24 23:32:08 +08:00
parent 9922f066d7
commit 4b7168e5c2
5 changed files with 864 additions and 784 deletions

View File

@ -81,12 +81,11 @@ import org.springframework.http.MediaType;
import org.springframework.web.util.UriComponentsBuilder; import org.springframework.web.util.UriComponentsBuilder;
/** /**
* @author erzhongxmu
* @version V1.0
* @Title: Controller * @Title: Controller
* @Description: * @Description:
* @author erzhongxmu
* @date 2017-09-08 22:26:27 * @date 2017-09-08 22:26:27
* @version V1.0
*
*/ */
@Controller @Controller
@RequestMapping("/wvStockController") @RequestMapping("/wvStockController")
@ -113,14 +112,17 @@ public class WvStockController extends BaseController {
public ModelAndView list(HttpServletRequest request) { public ModelAndView list(HttpServletRequest request) {
return new ModelAndView("com/zzjee/wm/wvStockList"); return new ModelAndView("com/zzjee/wm/wvStockList");
} }
@RequestMapping(params = "movelist") @RequestMapping(params = "movelist")
public ModelAndView movelist(HttpServletRequest request) { public ModelAndView movelist(HttpServletRequest request) {
return new ModelAndView("com/zzjee/wm/wvStockmoveList"); return new ModelAndView("com/zzjee/wm/wvStockmoveList");
} }
@RequestMapping(params = "tpmovelist") @RequestMapping(params = "tpmovelist")
public ModelAndView tpmovelist(HttpServletRequest request) { public ModelAndView tpmovelist(HttpServletRequest request) {
return new ModelAndView("com/zzjee/wm/wvStocktmoveList"); return new ModelAndView("com/zzjee/wm/wvStocktmoveList");
} }
/** /**
* easyui AJAX * easyui AJAX
* *
@ -173,6 +175,7 @@ public class WvStockController extends BaseController {
this.wvStockService.getDataGridReturn(cq, true); this.wvStockService.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid); TagUtil.datagrid(response, dataGrid);
} }
@RequestMapping(params = "datagrid") @RequestMapping(params = "datagrid")
public void datagrid(WvStockEntity wvStock, HttpServletRequest request, public void datagrid(WvStockEntity wvStock, HttpServletRequest request,
HttpServletResponse response, DataGrid dataGrid) { HttpServletResponse response, DataGrid dataGrid) {
@ -614,10 +617,6 @@ public class WvStockController extends BaseController {
} }
/** /**
* *
* *
@ -842,7 +841,24 @@ public class WvStockController extends BaseController {
} catch (Exception e) { } catch (Exception e) {
} }
String[] ss = searchstr2.split(",");
if (ss.length == 1) {
hql = hql + " and goodsId = '" + searchstr2 + "'"; hql = hql + " and goodsId = '" + searchstr2 + "'";
} else {
String insearch = "";
for (String s : ss) {
if (StringUtil.isNotEmpty(insearch)) {
insearch = insearch + " or goodsId = '" + s + "'";
} else {
insearch = "goodsId = '" + s + "'";
}
hql = hql + " and (" + insearch + ")";
}
}
// hql=hql+" and goodsId in (:alist)";
} }
List<WvStockEntity> listWvStocks = wvStockService.findHql(hql); List<WvStockEntity> listWvStocks = wvStockService.findHql(hql);

View File

@ -357,7 +357,24 @@ public class WvGiController extends BaseController {
} }
// hql=hql+" and goodsId = '" + searchstr2 + "'";
String[] ss = searchstr2.split(",");
if (ss.length == 1) {
hql = hql + " and goodsId = '" + searchstr2 + "'"; hql = hql + " and goodsId = '" + searchstr2 + "'";
} else {
String insearch = "";
for (String s : ss) {
if (StringUtil.isNotEmpty(insearch)) {
insearch = insearch + " or goodsId = '" + s + "'";
} else {
insearch = "goodsId = '" + s + "'";
}
hql = hql + " and (" + insearch + ")";
}
}
} }
List<WvGiEntity> listWvGis=wvGiService.findHql(hql); List<WvGiEntity> listWvGis=wvGiService.findHql(hql);

View File

@ -357,7 +357,27 @@ public class WvGiNoticeController extends BaseController {
}catch (Exception e){ }catch (Exception e){
} }
// hql=hql+" and goodsId = '" + searchstr2 + "'";
String[] ss = searchstr2.split(",");
if (ss.length == 1) {
hql = hql + " and goodsId = '" + searchstr2 + "'"; hql = hql + " and goodsId = '" + searchstr2 + "'";
} else {
String insearch = "";
for (String s : ss) {
if (StringUtil.isNotEmpty(insearch)) {
insearch = insearch + " or goodsId = '" + s + "'";
} else {
insearch = "goodsId = '" + s + "'";
}
hql = hql + " and (" + insearch + ")";
}
}
} }
if(!StringUtil.isEmpty(searchstr3)) { if(!StringUtil.isEmpty(searchstr3)) {
hql=hql+" and binId = '" + searchstr3 + "'"; hql=hql+" and binId = '" + searchstr3 + "'";

View File

@ -345,7 +345,24 @@ public class WvNoticeController extends BaseController {
}catch (Exception e){ }catch (Exception e){
} }
String[] ss = searchstr2.split(",");
if (ss.length == 1) {
hql = hql + " and goodsCode = '" + searchstr2 + "'"; hql = hql + " and goodsCode = '" + searchstr2 + "'";
} else {
String insearch = "";
for (String s : ss) {
if (StringUtil.isNotEmpty(insearch)) {
insearch = insearch + " or goodsCode = '" + s + "'";
} else {
insearch = "goodsCode = '" + s + "'";
}
hql = hql + " and (" + insearch + ")";
}
}
// hql=hql+" and goodsCode in (:alist)";
} }
List<WvNoticeEntity> listWvNotices=wvNoticeService.findHql(hql); List<WvNoticeEntity> listWvNotices=wvNoticeService.findHql(hql);

View File

@ -477,8 +477,18 @@ public class wmUtil {
if("yes".equals(ResourceUtil.getConfigByName("sptmon"))){ if("yes".equals(ResourceUtil.getConfigByName("sptmon"))){
try{ try{
SystemService systemService = ApplicationContextUtil.getContext().getBean(SystemService.class); SystemService systemService = ApplicationContextUtil.getContext().getBean(SystemService.class);
MdGoodsEntity t = systemService.findByProperty(MdGoodsEntity.class,"shpTiaoMa",tiaoma).get(0);
return t.getShpBianMa(); String ttr= "";
List<MdGoodsEntity> t = systemService.findByProperty(MdGoodsEntity.class,"shpTiaoMa",tiaoma) ;
for(MdGoodsEntity tt :t){
if(StringUtil.isNotEmpty(ttr)){
ttr = ttr+","+tt.getShpBianMa();
}else{
ttr = tt.getShpBianMa();
}
}
return ttr;
}catch (Exception e){ }catch (Exception e){
return null; return null;
} }