增加模糊搜索
parent
d79f0b8578
commit
5cec1a3d64
|
@ -55,12 +55,12 @@ import com.zzjee.wm.entity.WmToUpGoodsEntity;
|
|||
import com.zzjee.wm.service.WmSttInGoodsServiceI;
|
||||
import com.zzjee.wmutil.wmUtil;
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 库存盘点
|
||||
* @author erzhongxmu
|
||||
* @date 2017-09-08 21:03:33
|
||||
* @version V1.0
|
||||
* @version V1.0
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
|
@ -77,12 +77,12 @@ public class WmSttInGoodsController extends BaseController {
|
|||
private SystemService systemService;
|
||||
@Autowired
|
||||
private Validator validator;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 库存盘点列表 页面跳转
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "list")
|
||||
|
@ -99,7 +99,7 @@ public class WmSttInGoodsController extends BaseController {
|
|||
}
|
||||
/**
|
||||
* easyui AJAX请求数据
|
||||
*
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param dataGrid
|
||||
|
@ -131,16 +131,16 @@ public class WmSttInGoodsController extends BaseController {
|
|||
}catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
Map<String,Object> map1 = new HashMap<String,Object>();
|
||||
map1.put("createDate", "desc");
|
||||
cq.setOrder(map1);
|
||||
Map<String,Object> map1 = new HashMap<String,Object>();
|
||||
map1.put("createDate", "desc");
|
||||
cq.setOrder(map1);
|
||||
cq.notEq("sttSta", "已删除");
|
||||
cq.add();
|
||||
this.wmSttInGoodsService.getDataGridReturn(cq, true);
|
||||
TagUtil.datagrid(response, dataGrid);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(params = "datagridcygz")
|
||||
public void datagridcygz(WmSttInGoodsEntity wmSttInGoods,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||
CriteriaQuery cq = new CriteriaQuery(WmSttInGoodsEntity.class, dataGrid);
|
||||
|
@ -151,9 +151,9 @@ public class WmSttInGoodsController extends BaseController {
|
|||
}catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
Map<String,Object> map1 = new HashMap<String,Object>();
|
||||
map1.put("createDate", "desc");
|
||||
cq.setOrder(map1);
|
||||
Map<String,Object> map1 = new HashMap<String,Object>();
|
||||
map1.put("createDate", "desc");
|
||||
cq.setOrder(map1);
|
||||
cq.eq("sttSta", "已完成");
|
||||
cq.add();
|
||||
this.wmSttInGoodsService.getDataGridReturn(cq, true);
|
||||
|
@ -162,17 +162,17 @@ public class WmSttInGoodsController extends BaseController {
|
|||
for (WmSttInGoodsEntity wmSttInGoodsold : resultold) {
|
||||
if(!wmSttInGoodsold.getGoodsQua().equals(wmSttInGoodsold.getSttQua())){
|
||||
resultnew.add(wmSttInGoodsold);
|
||||
}
|
||||
}
|
||||
}
|
||||
dataGrid.setResults(resultnew);
|
||||
dataGrid.setTotal(resultnew.size());
|
||||
TagUtil.datagrid(response, dataGrid);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(params = "datagridfp")
|
||||
public void datagridfp(WmSttInGoodsEntity wmSttInGoods,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||
CriteriaQuery cq = new CriteriaQuery(WmSttInGoodsEntity.class, dataGrid);
|
||||
|
@ -183,9 +183,9 @@ public class WmSttInGoodsController extends BaseController {
|
|||
}catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
Map<String,Object> map1 = new HashMap<String,Object>();
|
||||
map1.put("createDate", "desc");
|
||||
cq.setOrder(map1);
|
||||
Map<String,Object> map1 = new HashMap<String,Object>();
|
||||
map1.put("createDate", "desc");
|
||||
cq.setOrder(map1);
|
||||
cq.eq("sttSta", "已完成");
|
||||
cq.add();
|
||||
this.wmSttInGoodsService.getDataGridReturn(cq, true);
|
||||
|
@ -194,17 +194,17 @@ public class WmSttInGoodsController extends BaseController {
|
|||
for (WmSttInGoodsEntity wmSttInGoodsold : resultold) {
|
||||
if(!wmSttInGoodsold.getGoodsQua().equals(wmSttInGoodsold.getSttQua())){
|
||||
resultnew.add(wmSttInGoodsold);
|
||||
}
|
||||
}
|
||||
}
|
||||
dataGrid.setResults(resultnew);
|
||||
dataGrid.setTotal(resultnew.size());
|
||||
TagUtil.datagrid(response, dataGrid);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除库存盘点
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doDel")
|
||||
|
@ -226,9 +226,9 @@ public class WmSttInGoodsController extends BaseController {
|
|||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(params = "dorun")
|
||||
@ResponseBody
|
||||
public AjaxJson dorun(WmSttInGoodsEntity wmSttInGoods, HttpServletRequest request) {
|
||||
|
@ -238,7 +238,7 @@ public class WmSttInGoodsController extends BaseController {
|
|||
.getParameter("id").toString());
|
||||
message = "库存盘点差异过账成功";
|
||||
if(wmSttInGoods.getSttSta().equals("已完成")){
|
||||
|
||||
|
||||
if(!wmSttInGoods.getGoodsQua().equals(wmSttInGoods.getSttQua())){
|
||||
try{
|
||||
// wmSttInGoods.setSttQua("0");
|
||||
|
@ -246,7 +246,7 @@ public class WmSttInGoodsController extends BaseController {
|
|||
//下架
|
||||
String goodsqua = Double.toString((Double.parseDouble(wmSttInGoods.getGoodsQua()) - Double.parseDouble(wmSttInGoods.getSttQua())));
|
||||
WmToDownGoodsEntity wmToDownGoods = new WmToDownGoodsEntity();
|
||||
|
||||
|
||||
wmToDownGoods.setOrderId("ZY");
|
||||
wmToDownGoods.setBinIdTo("PK");
|
||||
wmToDownGoods.setDownSta("已复核");
|
||||
|
@ -266,12 +266,12 @@ public class WmSttInGoodsController extends BaseController {
|
|||
wmToDownGoods.setBaseGoodscount(wmToDownGoods
|
||||
.getGoodsQuaok());
|
||||
wmToDownGoods.setCusCode(wmSttInGoods.getCusCode());
|
||||
|
||||
|
||||
if(!wmUtil.checkstcok(wmToDownGoods.getKuWeiBianMa(),wmToDownGoods.getBinIdFrom(),wmToDownGoods.getGoodsId(),wmToDownGoods.getGoodsProData(),wmToDownGoods.getGoodsQua())){
|
||||
message = "库存不足";
|
||||
j.setMsg(message);
|
||||
return j;
|
||||
|
||||
|
||||
};
|
||||
systemService.save(wmToDownGoods);
|
||||
wmSttInGoods.setSttSta("已过帐");
|
||||
|
@ -317,8 +317,8 @@ public class WmSttInGoodsController extends BaseController {
|
|||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(params = "dostt")
|
||||
@ResponseBody
|
||||
public AjaxJson dostt(WmSttInGoodsEntity wmSttInGoods, HttpServletRequest request) {
|
||||
|
@ -340,10 +340,10 @@ public class WmSttInGoodsController extends BaseController {
|
|||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除库存盘点
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doBatchDel")
|
||||
|
@ -354,7 +354,7 @@ public class WmSttInGoodsController extends BaseController {
|
|||
message = "库存盘点删除成功";
|
||||
try{
|
||||
for(String id:ids.split(",")){
|
||||
WmSttInGoodsEntity wmSttInGoods = systemService.getEntity(WmSttInGoodsEntity.class,
|
||||
WmSttInGoodsEntity wmSttInGoods = systemService.getEntity(WmSttInGoodsEntity.class,
|
||||
id
|
||||
);
|
||||
wmSttInGoodsService.delete(wmSttInGoods);
|
||||
|
@ -372,7 +372,7 @@ public class WmSttInGoodsController extends BaseController {
|
|||
|
||||
/**
|
||||
* 添加库存盘点
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doAdd")
|
||||
|
@ -393,10 +393,10 @@ public class WmSttInGoodsController extends BaseController {
|
|||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更新库存盘点
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "doUpdate")
|
||||
|
@ -418,11 +418,11 @@ public class WmSttInGoodsController extends BaseController {
|
|||
j.setMsg(message);
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 库存盘点新增页面跳转
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "goAdd")
|
||||
|
@ -435,7 +435,7 @@ public class WmSttInGoodsController extends BaseController {
|
|||
}
|
||||
/**
|
||||
* 库存盘点编辑页面跳转
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "goUpdate")
|
||||
|
@ -446,10 +446,10 @@ public class WmSttInGoodsController extends BaseController {
|
|||
}
|
||||
return new ModelAndView("com/zzjee/wm/wmSttInGoods-update");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导入功能跳转
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "upload")
|
||||
|
@ -457,10 +457,10 @@ public class WmSttInGoodsController extends BaseController {
|
|||
req.setAttribute("controller_name","wmSttInGoodsController");
|
||||
return new ModelAndView("common/upload/pub_excel_upload");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
|
@ -479,7 +479,7 @@ public class WmSttInGoodsController extends BaseController {
|
|||
}
|
||||
/**
|
||||
* 导出excel 使模板
|
||||
*
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
|
@ -493,13 +493,13 @@ public class WmSttInGoodsController extends BaseController {
|
|||
modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList());
|
||||
return NormalExcelConstants.JEECG_EXCEL_VIEW;
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@RequestMapping(params = "importExcel", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
AjaxJson j = new AjaxJson();
|
||||
|
||||
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
|
@ -527,7 +527,7 @@ public class WmSttInGoodsController extends BaseController {
|
|||
}
|
||||
return j;
|
||||
}
|
||||
|
||||
//PDA接口
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> list( @RequestParam(value="username", required=false) String username, @RequestParam(value="searchstr", required=false)String searchstr, @RequestParam(value="searchstr2", required=false)String searchstr2) {
|
||||
|
@ -571,7 +571,7 @@ public class WmSttInGoodsController extends BaseController {
|
|||
return new ResponseEntity(D0, HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> get(@PathVariable("id") String id) {
|
||||
|
|
|
@ -819,7 +819,7 @@ public class WvStockController extends BaseController {
|
|||
}
|
||||
return j;
|
||||
}
|
||||
|
||||
//PDA接口
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> list(@RequestParam(value = "username", required = false) String username, @RequestParam(value = "searchstr", required = false) String searchstr, @RequestParam(value = "searchstr2", required = false) String searchstr2) {
|
||||
|
@ -851,7 +851,7 @@ public class WvStockController extends BaseController {
|
|||
if (StringUtil.isNotEmpty(insearch)) {
|
||||
insearch = insearch + " or goodsId like '%" + s + "%'";
|
||||
} else {
|
||||
insearch = "goodsId like '%" + s + "%'";
|
||||
insearch = " goodsId like '%" + s + "%'";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -335,7 +335,7 @@ public class WvGiNoticeController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
//下架任务
|
||||
//下架任务 PDA接口
|
||||
@RequestMapping(value = "/search",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> lists( @RequestParam(value="username", required=false) String username, @RequestParam(value="searchstr", required=false)String searchstr, @RequestParam(value="searchstr2", required=false)String searchstr2, @RequestParam(value="searchstr3", required=false)String searchstr3) {
|
||||
|
@ -346,7 +346,7 @@ public class WvGiNoticeController extends BaseController {
|
|||
String hql = " from WvGiNoticeEntity where 1 = 1 ";
|
||||
D0.setOK(true);
|
||||
if(!StringUtil.isEmpty(searchstr)) {
|
||||
hql=hql+" and omNoticeId = '" + searchstr + "'";
|
||||
hql=hql+" and omNoticeId like '%" + searchstr + "%'" +" or imCusCode like '%" + searchstr + "%'";
|
||||
}
|
||||
if(!StringUtil.isEmpty(searchstr2)) {
|
||||
try{
|
||||
|
@ -362,7 +362,7 @@ public class WvGiNoticeController extends BaseController {
|
|||
|
||||
String[] ss = searchstr2.split(",");
|
||||
if (ss.length == 1) {
|
||||
hql = hql + " and goodsId = '" + searchstr2 + "'";
|
||||
hql = hql + " and goodsId like '%" + searchstr2 + "%'";
|
||||
|
||||
} else {
|
||||
String insearch = "";
|
||||
|
|
|
@ -323,7 +323,7 @@ public class WvNoticeController extends BaseController {
|
|||
}
|
||||
return j;
|
||||
}
|
||||
|
||||
//PDA接口
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ResponseEntity<?> list( @RequestParam(value="username", required=false) String username, @RequestParam(value="searchstr", required=false)String searchstr, @RequestParam(value="searchstr2", required=false)String searchstr2) {
|
||||
|
@ -334,7 +334,7 @@ public class WvNoticeController extends BaseController {
|
|||
String hql = " from WvNoticeEntity where 1 = 1 ";
|
||||
D0.setOK(true);
|
||||
if(!StringUtil.isEmpty(searchstr)) {
|
||||
hql=hql+" and noticeId = '" + searchstr + "'";
|
||||
hql=hql+" and noticeId like '%" + searchstr + "%'" +" or imCusCode like '%" + searchstr + "%'";
|
||||
}
|
||||
if(!StringUtil.isEmpty(searchstr2)) {
|
||||
try{
|
||||
|
@ -347,7 +347,7 @@ public class WvNoticeController extends BaseController {
|
|||
}
|
||||
String[] ss = searchstr2.split(",");
|
||||
if (ss.length == 1) {
|
||||
hql = hql + " and goodsCode = '" + searchstr2 + "'";
|
||||
hql = hql + " and goodsCode like '%" + searchstr2 + "%'";
|
||||
|
||||
} else {
|
||||
String insearch = "";
|
||||
|
|
|
@ -18,12 +18,12 @@ import org.hibernate.annotations.GenericGenerator;
|
|||
import javax.persistence.SequenceGenerator;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Title: Entity
|
||||
* @Description: wv_gi_notice
|
||||
* @author erzhongxmu
|
||||
* @date 2018-05-30 20:20:38
|
||||
* @version V1.0
|
||||
* @version V1.0
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
|
@ -45,10 +45,12 @@ public class WvGiNoticeEntity implements java.io.Serializable {
|
|||
/**主键*/
|
||||
private String id;
|
||||
/**到货通知单*/
|
||||
@Excel(name="到货通知单")
|
||||
@Excel(name="出货通知单")
|
||||
private String omNoticeId;
|
||||
@Excel(name="客户订单号")
|
||||
private java.lang.String imCusCode;
|
||||
/**到货通知行项目*/
|
||||
@Excel(name="到货通知行项目")
|
||||
@Excel(name="出货通知行项目")
|
||||
private String iomNoticeItem;
|
||||
/**仓位*/
|
||||
@Excel(name="仓位")
|
||||
|
@ -510,4 +512,13 @@ public class WvGiNoticeEntity implements java.io.Serializable {
|
|||
public void setShpGuiGe(java.lang.String shpGuiGe){
|
||||
this.shpGuiGe = shpGuiGe;
|
||||
}
|
||||
|
||||
@Column(name ="IM_CUS_CODE",nullable=true,length=32)
|
||||
public String getImCusCode() {
|
||||
return imCusCode;
|
||||
}
|
||||
|
||||
public void setImCusCode(String imCusCode) {
|
||||
this.imCusCode = imCusCode;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,12 +18,12 @@ import org.hibernate.annotations.GenericGenerator;
|
|||
import javax.persistence.SequenceGenerator;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Title: Entity
|
||||
* @Description: wv_notice
|
||||
* @author erzhongxmu
|
||||
* @date 2018-05-30 20:21:05
|
||||
* @version V1.0
|
||||
* @version V1.0
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
|
@ -35,6 +35,9 @@ public class WvNoticeEntity implements java.io.Serializable {
|
|||
/**进货通知单号*/
|
||||
@Excel(name="进货通知单号")
|
||||
private String noticeId;
|
||||
/**客户订单号*/
|
||||
@Excel(name="客户订单号")
|
||||
private java.lang.String imCusCode;
|
||||
/**客户编码*/
|
||||
@Excel(name="客户编码")
|
||||
private String cusCode;
|
||||
|
@ -92,7 +95,7 @@ public class WvNoticeEntity implements java.io.Serializable {
|
|||
/**recDeg*/
|
||||
@Excel(name="recDeg")
|
||||
private String recDeg;
|
||||
|
||||
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
*@return: java.lang.String 主键
|
||||
|
@ -432,4 +435,13 @@ public class WvNoticeEntity implements java.io.Serializable {
|
|||
public void setRecDeg(String recDeg){
|
||||
this.recDeg = recDeg;
|
||||
}
|
||||
|
||||
@Column(name ="IM_CUS_CODE",nullable=true,length=32)
|
||||
public String getImCusCode() {
|
||||
return imCusCode;
|
||||
}
|
||||
|
||||
public void setImCusCode(String imCusCode) {
|
||||
this.imCusCode = imCusCode;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue