出库打印第三方客户

master
e 2019-03-19 22:15:12 +08:00
parent d4aad9e770
commit 7b1fa2dc8c
1 changed files with 5 additions and 40 deletions

View File

@ -234,8 +234,11 @@ public class WmOmNoticeHController extends BaseController {
MdCusEntity mdcus = systemService.findUniqueByProperty(MdCusEntity.class,"keHuBianMa",wmOmNoticeHEntity.getCusCode());
MdCusOtherEntity mdcusother = systemService.findUniqueByProperty(MdCusOtherEntity.class,"keHuBianMa",wmOmNoticeHEntity.getOcusCode());
request.setAttribute("cusname",wmOmNoticeHEntity.getCusCode()+"-"+ mdcus.getZhongWenQch());
request.setAttribute("ocusname",wmOmNoticeHEntity.getOcusCode()+"-"+ mdcusother.getZhongWenQch());
if(mdcusother!=null){
request.setAttribute("ocusname",wmOmNoticeHEntity.getOcusCode()+"-"+ mdcusother.getZhongWenQch());
}else{
request.setAttribute("ocusname",wmOmNoticeHEntity.getOcusCode());
}
}catch (Exception e){
@ -248,45 +251,32 @@ public class WmOmNoticeHController extends BaseController {
Double tomsum = 0.00;
Double noticesum = 0.00;
Double tijisum = 0.00;
Double zhlsum = 0.00;
try{
List<WmOmQmIEntity> wmOmQmIEntityList = systemService.findHql(hql0, id0);//获取行项目
List<WmOmQmIEntity> wmOmQmIEntityListnew = new ArrayList<>();
DecimalFormat dfsum=new DecimalFormat(".##");
try{
for(WmOmQmIEntity tom:wmOmQmIEntityList){
tomsum = tomsum + Double.parseDouble(tom.getBaseGoodscount());
try{
tijisum = tijisum + Double.parseDouble(tom.getTinTj());
}catch ( Exception e){
}
try{
zhlsum = zhlsum + Double.parseDouble(tom.getTinZhl());
}catch ( Exception e){
}
try{
tom.setTinZhl(dfsum.format(Double.parseDouble(tom.getTinZhl())));
}catch ( Exception e){
}
try{
tom.setTinTj(dfsum.format(Double.parseDouble(tom.getTinTj())));
}catch ( Exception e){
}
tom.setBaseGoodscount(StringUtil.getdouble(tom.getBaseGoodscount()));
try{
MvGoodsEntity mvgoods = systemService.findUniqueByProperty(
MvGoodsEntity.class, "goodsCode", tom.getGoodsId());
@ -297,7 +287,6 @@ public class WmOmNoticeHController extends BaseController {
try{
shpguige = Integer.parseInt(mvgoods.getShpGuiGe());
}catch (Exception e){
}
if(shpguige!=0){
Double xianhshu = Math.floor(Double.parseDouble(tom.getBaseGoodscount())/shpguige);
@ -305,24 +294,16 @@ public class WmOmNoticeHController extends BaseController {
long xiangshuint = Math.round(xianhshu);
if(xianhshu > 0){
tom.setPickNotice(xiangshuint+"整"+jianshu+tom.getBaseUnit());
}else{
tom.setPickNotice(tom.getBaseGoodscount()+tom.getBaseUnit());
}
}
}catch (Exception e){
}
wmOmQmIEntityListnew.add(tom);
}
}catch ( Exception e){
}
String hqlnotice = "from WmOmNoticeIEntity where 1 = 1 AND oM_NOTICE_ID = ? ";
List<WmOmNoticeIEntity> wmOmNoticeIEntityList = systemService.findHql(hqlnotice,id0);
for(WmOmNoticeIEntity tnotice:wmOmNoticeIEntityList){
@ -336,17 +317,14 @@ public class WmOmNoticeHController extends BaseController {
String tijiunit="立方分米";
String zhongliangunit="公斤";
try{
tijiunit= ResourceUtil.getConfigByName("tijiunit");
zhongliangunit=ResourceUtil.getConfigByName("zhongliangunit");
}catch (Exception e){
}
request.setAttribute("tijisum", dfsum.format(tijisum)+tijiunit);
request.setAttribute("zhlsum", dfsum.format(zhlsum)+zhongliangunit);
request.setAttribute("wmOmQmIList", wmOmQmIEntityList);
}catch (Exception e){
}
return new ModelAndView("com/zzjee/wm/print/jianhuorenwu-print");
}
@ -382,13 +360,9 @@ public class WmOmNoticeHController extends BaseController {
} catch (Exception e) {
throw new BusinessException(e.getMessage());
}
if(StringUtil.isNotEmpty(wmUtil.getCusCode())){
cq.eq("cusCode", wmUtil.getCusCode());
}
cq.eq("omSta", Constants.wm_sta6);//"复核完成"
cq.add();
this.wmOmNoticeHService.getDataGridReturn(cq, true);
@ -397,7 +371,6 @@ public class WmOmNoticeHController extends BaseController {
for (WmOmNoticeHEntity WmOmNoticeH : resultold) {
WmOmNoticeH.setDelvData(null);
resultnew.add(WmOmNoticeH);
}
dataGrid.setResults(resultnew);
TagUtil.datagrid(response, dataGrid);
@ -642,7 +615,6 @@ public class WmOmNoticeHController extends BaseController {
if(wmOmNoticeH.getCusCode()==null){
if(StringUtil.isNotEmpty(wmUtil.getCusCode())){
wmOmNoticeH.setCusCode(wmUtil.getCusCode());
}
}
List<WmOmNoticeIEntity> wmomNoticeIListnew = new ArrayList<WmOmNoticeIEntity>();
@ -655,12 +627,9 @@ public class WmOmNoticeHController extends BaseController {
} catch (Exception e) {
// TODO: handle exception
}
wmomNoticeIListnew.add(wmomNoticeIEntity);
}
}
if(StringUtil.isNotEmpty( wmOmNoticeH.getOcusCode())){
String datecuso[]= wmOmNoticeH.getOcusCode().split("-");
MdCusOtherEntity mdcusother = systemService.findUniqueByProperty(MdCusOtherEntity.class, "keHuBianMa", datecuso[0]);
@ -668,18 +637,14 @@ public class WmOmNoticeHController extends BaseController {
wmOmNoticeH.setOcusName(mdcusother.getZhongWenQch());
}
}
wmOmNoticeHService.addMain(wmOmNoticeH, wmomNoticeIListnew);
Map<String ,Object> map = new HashMap<String ,Object>();
map.put("id", wmOmNoticeH.getOmNoticeId());
try {
TuiSongMsgUtil.sendMessage("出货通知", Constants.SMS_SEND_TYPE_3, "CKYYTZ", map, "admin", ResourceUtil.getSessionUserName().getUserName());
} catch (Exception e) {
// TODO: handle exception
}
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
}catch(Exception e){
e.printStackTrace();