diff --git a/src/main/java/com/zzjee/wm/controller/WmImNoticeHController.java b/src/main/java/com/zzjee/wm/controller/WmImNoticeHController.java index 5ea8e9f4..f31c9b84 100644 --- a/src/main/java/com/zzjee/wm/controller/WmImNoticeHController.java +++ b/src/main/java/com/zzjee/wm/controller/WmImNoticeHController.java @@ -1,10 +1,7 @@ package com.zzjee.wm.controller; import com.zzjee.api.ResultDO; -import com.zzjee.md.entity.MdCusEntity; -import com.zzjee.md.entity.MdGoodsEntity; -import com.zzjee.md.entity.MdSupEntity; -import com.zzjee.md.entity.MvGoodsEntity; +import com.zzjee.md.entity.*; import com.zzjee.wm.entity.*; import com.zzjee.wm.page.WmNoticeImpPage; import com.zzjee.wm.service.WmImNoticeHServiceI; @@ -167,6 +164,68 @@ public class WmImNoticeHController extends BaseController { public ModelAndView tbatchlist(HttpServletRequest request) { return new ModelAndView("com/zzjee/wm/wmintqmbatchList"); } + + @RequestMapping(params = "doPrintpage") + public ModelAndView doPrint(String id,HttpServletRequest request) { + WmImNoticeHEntity wmImNoticeHEntity = wmImNoticeHService.getEntity(WmImNoticeHEntity.class, id); + request.setAttribute("wmImNoticeHPage", wmImNoticeHEntity); + request.setAttribute("kprq",DateUtils.date2Str(wmImNoticeHEntity.getCreateDate(),DateUtils.date_sdf)); + request.setAttribute("comname", ResourceUtil.getConfigByName("comname")); + + if(StringUtil.isNotEmpty(wmImNoticeHEntity.getImCusCode())){ + request.setAttribute("noticeid", wmImNoticeHEntity.getImCusCode()); + }else{ + request.setAttribute("noticeid", wmImNoticeHEntity.getNoticeId()); + } + + try{ + MdSupEntity mdSupEntity = systemService.findUniqueByProperty(MdSupEntity.class,"gysBianMa",wmImNoticeHEntity.getSupCode()); + MdCusEntity mdcus = systemService.findUniqueByProperty(MdCusEntity.class,"keHuBianMa",wmImNoticeHEntity.getCusCode()); + + request.setAttribute("cusname",wmImNoticeHEntity.getCusCode()+"-"+mdcus.getZhongWenQch()); + + request.setAttribute("supname",mdSupEntity.getGysBianMa()+"-"+ mdSupEntity.getZhongWenQch()); + + }catch (Exception e){ + + } + //获取参数 + Object id0 = wmImNoticeHEntity.getNoticeId(); + //=================================================================================== + //查询-产品 + Double tomsum = 0.00; + Double noticesum = 0.00; + + + List wmImNoticeIEntitynewList = new ArrayList<>(); + String hql0 = "from WmImNoticeIEntity where 1 = 1 AND iM_NOTICE_ID = ? "; + try { + List wmImNoticeIEntityList = systemService + .findHql(hql0, id0); + for (WmImNoticeIEntity wmImNoticeIEntity : wmImNoticeIEntityList) { + if (StringUtil.isEmpty(wmImNoticeIEntity.getBinPlan())){ + String hqlup = "from WmToUpGoodsEntity where 1 = 1 AND goodsId = ? order by createDate desc"; + try { + WmToUpGoodsEntity wmToUpGoodsEntity = (WmToUpGoodsEntity)systemService.findHql(hqlup,wmImNoticeIEntity.getGoodsCode()).get(0); + wmImNoticeIEntity.setBinPlan(wmToUpGoodsEntity.getKuWeiBianMa()); + }catch (Exception e){ + + } + } + wmImNoticeIEntitynewList.add(wmImNoticeIEntity); + } + + request.setAttribute("wmImNoticeIList", wmImNoticeIEntitynewList); + }catch (Exception e){ + + } + return new ModelAndView("com/zzjee/wm/print/imnotice-print"); + } + + + + + @RequestMapping(params = "datagridbatch") public void datagridbatch(WmImNoticeIEntity wmImNoticeI, HttpServletRequest request, HttpServletResponse response, diff --git a/src/main/java/com/zzjee/wm/entity/WmImNoticeIEntity.java b/src/main/java/com/zzjee/wm/entity/WmImNoticeIEntity.java index 602750d4..56ba0250 100644 --- a/src/main/java/com/zzjee/wm/entity/WmImNoticeIEntity.java +++ b/src/main/java/com/zzjee/wm/entity/WmImNoticeIEntity.java @@ -115,7 +115,8 @@ public class WmImNoticeIEntity implements java.io.Serializable { /**基本单位收货数量*/ private java.lang.String baseQmcount; - + @Excel(name="商品条码") + private java.lang.String barCode; /** *方法: 取得java.lang.String *@return: java.lang.String 主键 @@ -645,4 +646,18 @@ public class WmImNoticeIEntity implements java.io.Serializable { public void setOtherId(java.lang.String otherId){ this.otherId = otherId; } + + + @Column(name ="BARCODE",nullable=true,length=32) + public java.lang.String getBarCode(){ + return this.barCode; + } + + /** + *方法: 设置java.lang.String + *@param: java.lang.String 商品条码 + */ + public void setBarCode(java.lang.String barCode){ + this.barCode = barCode; + } } diff --git a/src/main/java/com/zzjee/wm/service/impl/WmImNoticeHServiceImpl.java b/src/main/java/com/zzjee/wm/service/impl/WmImNoticeHServiceImpl.java index 0b9fabf1..3c98d2e0 100644 --- a/src/main/java/com/zzjee/wm/service/impl/WmImNoticeHServiceImpl.java +++ b/src/main/java/com/zzjee/wm/service/impl/WmImNoticeHServiceImpl.java @@ -52,7 +52,7 @@ public class WmImNoticeHServiceImpl extends CommonServiceImpl implements WmImNot mvgoods = this.findUniqueByProperty(MvGoodsEntity.class, "goodsCode", wmImNoticeI.getGoodsCode()) ; if(mvgoods!=null){ wmImNoticeI.setGoodsName(mvgoods.getGoodsName()); - + wmImNoticeI.setBarCode(mvgoods.getShpTiaoMa()); try { try { diff --git a/src/main/webapp/webpage/com/zzjee/wm/print/imnotice-print.jsp b/src/main/webapp/webpage/com/zzjee/wm/print/imnotice-print.jsp new file mode 100644 index 00000000..29894f2c --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/wm/print/imnotice-print.jsp @@ -0,0 +1,190 @@ +<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/context/mytags.jsp"%> + + + +入库通知打印 + + + + + + + +打印 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
${comname}日期:${kprq} + +
入库通知单单号:${noticeid}
货主:${cusname}供应商:${supname}
备注:${wmOmNoticeHPage.imBeizhu}WMS单号:${wmImNoticeHPage.noticeId}
最近上架商品编码商品名称单位生产日期数量托盘流通码
${poVal.binPlan } ${poVal.goodsCode }${poVal.goodsName }${poVal.goodsUnit }${poVal.goodsPrdData }${poVal.goodsCount }${poVal.barCode } 
主管:                      + 制单: ${wmOmNoticeHPage.createBy}                      + 仓管:                        + 叉车:
+
+ \ No newline at end of file diff --git a/src/main/webapp/webpage/com/zzjee/wm/wmImNoticeHList.jsp b/src/main/webapp/webpage/com/zzjee/wm/wmImNoticeHList.jsp index 5aca9666..9c6e77ca 100644 --- a/src/main/webapp/webpage/com/zzjee/wm/wmImNoticeHList.jsp +++ b/src/main/webapp/webpage/com/zzjee/wm/wmImNoticeHList.jsp @@ -29,6 +29,8 @@ <%----%> + + @@ -88,7 +90,12 @@ $('#wmImNoticeHList').datagrid('reload',{}); } } + function doprint(id){ + var url = "wmImNoticeHController.do?doPrintpage&id="+id; + createdetailwindow(" 进货通知单", url, 1000, 1000); + // window.open(url); + } function addorder(){ var url = "wmImNoticeHController.do?goAdd&orderTypeCode=01"; openwindow("添加",url,"进货",770,500);