master
erzhongxmu 2020-12-14 00:25:44 +08:00
parent 8ebc65574f
commit d73a9b8dda
6 changed files with 105 additions and 9 deletions

View File

@ -69,6 +69,8 @@ import java.net.URI;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.util.UriComponentsBuilder; import org.springframework.web.util.UriComponentsBuilder;
import static com.xiaoleilu.hutool.date.DateTime.now;
/** /**
* @Title: Controller * @Title: Controller
* @Description: wave_to_down * @Description: wave_to_down
@ -391,8 +393,12 @@ public class WaveToDownController extends BaseController {
hql="from WaveToDownEntity where waveId = ? and binId = ?"; hql="from WaveToDownEntity where waveId = ? and binId = ?";
listWaveToDowns = waveToDownService.findHql(hql,searchstr,searchstr2); listWaveToDowns = waveToDownService.findHql(hql,searchstr,searchstr2);
} }
System.out.println("11111searchstr3="+searchstr3);
if(StringUtil.isNotEmpty(searchstr3)){ if(StringUtil.isNotEmpty(searchstr3)){
for(WaveToDownEntity t: listWaveToDowns ){ for(WaveToDownEntity t: listWaveToDowns ){
System.out.println("t.getGoodsId()="+t.getGoodsId());
System.out.println("searchstr3="+searchstr3);
try{ try{
if(StringUtil.strPos(t.getGoodsId(),searchstr3)||StringUtil.strPos(t.getShpTiaoMa(),searchstr3)){ if(StringUtil.strPos(t.getGoodsId(),searchstr3)||StringUtil.strPos(t.getShpTiaoMa(),searchstr3)){
listWaveToDownsnew.add(t); listWaveToDownsnew.add(t);
@ -492,6 +498,8 @@ public class WaveToDownController extends BaseController {
wmToDownGoods.setOmBeizhu(wmOmQmI.getOmBeizhu());//备注 wmToDownGoods.setOmBeizhu(wmOmQmI.getOmBeizhu());//备注
wmToDownGoods.setImCusCode(wmOmQmI.getImCusCode());//客户单号 wmToDownGoods.setImCusCode(wmOmQmI.getImCusCode());//客户单号
wmToDownGoods.setOrderType("99");//默认为01 wmToDownGoods.setOrderType("99");//默认为01
wmToDownGoods.setCreateDate(now());
systemService.save(wmToDownGoods); systemService.save(wmToDownGoods);
wmOmQmI.setBinSta("H"); wmOmQmI.setBinSta("H");
wmOmQmI.setFirstRq(waveToDown.getFirstRq()); wmOmQmI.setFirstRq(waveToDown.getFirstRq());

View File

@ -374,10 +374,14 @@ public class WaveToFjController extends BaseController {
String omnoticeid="1"; String omnoticeid="1";
String siji = ""; String siji = "";
String chehao = ""; String chehao = "";
System.out.println("11111searchstr3="+searchstr3);
for(WaveToFjEntity t:listWaveToFjs) { for(WaveToFjEntity t:listWaveToFjs) {
if (StringUtil.isNotEmpty(searchstr3)) { if (StringUtil.isNotEmpty(searchstr3)) {
System.out.println("t.getGoodsId()="+t.getGoodsId());
System.out.println("searchstr3="+searchstr3);
try{ try{
if (!StringUtil.strPos(t.getGoodsId(), searchstr3)||StringUtil.strPos(t.getShpTiaoMa(),searchstr3)) { if (!(StringUtil.strPos(t.getGoodsId(), searchstr3)||StringUtil.strPos(t.getShpTiaoMa(),searchstr3))) {
continue; continue;
} }
}catch (Exception e){ }catch (Exception e){

View File

@ -258,6 +258,8 @@ public class WmInQmIController extends BaseController {
try{ try{
WmToUpGoodsEntity wmToUpGoodsEntityold = systemService.findUniqueByProperty(WmToUpGoodsEntity.class,"orderIdI",wmInQmIEntity.getId()); WmToUpGoodsEntity wmToUpGoodsEntityold = systemService.findUniqueByProperty(WmToUpGoodsEntity.class,"orderIdI",wmInQmIEntity.getId());
if (wmToUpGoodsEntityold!=null){ if (wmToUpGoodsEntityold!=null){
wmInQmIEntity.setBinSta("Y");
systemService.saveOrUpdate(wmInQmIEntity);
continue; continue;
} }
}catch (Exception e){ }catch (Exception e){

View File

@ -361,6 +361,54 @@ public class WmOmQmIController extends BaseController {
return j; return j;
} }
@RequestMapping(params = "dotowavedown")
@ResponseBody
public AjaxJson dotowavedown(HttpServletRequest request) {
String message = null;
AjaxJson j = new AjaxJson();
message = "下架成功";
try {
WmOmQmIEntity wmOmQmI = systemService.getEntity(
WmOmQmIEntity.class, request.getParameter("id").toString());
if (wmOmQmI != null&&wmOmQmI.getBinSta().equals("N")) {
WmToDownGoodsEntity wmToDownGoods = new WmToDownGoodsEntity();
wmToDownGoods.setBinIdFrom(wmOmQmI.getTinId());//下架托盘
wmToDownGoods.setKuWeiBianMa(wmOmQmI.getBinId());//储位
wmToDownGoods.setBinIdTo(wmOmQmI.getOmNoticeId());//到托盘
wmToDownGoods.setCusCode(wmOmQmI.getCusCode());//货主
wmToDownGoods.setGoodsId(wmOmQmI.getGoodsId());//
wmToDownGoods.setGoodsProData(wmOmQmI.getProData());//生产日期
wmToDownGoods.setOrderId(wmOmQmI.getOmNoticeId());//出货通知单
wmToDownGoods.setOrderIdI(wmOmQmI.getId());//出货通知项目
wmToDownGoods.setBaseUnit(wmOmQmI.getBaseUnit());//基本单位
wmToDownGoods.setBaseGoodscount(wmOmQmI.getBaseGoodscount());//基本单位数量
wmToDownGoods.setGoodsUnit(wmOmQmI.getGoodsUnit());//出货单位
wmToDownGoods.setGoodsQua(wmOmQmI.getQmOkQuat());//出货数量
wmToDownGoods.setGoodsQuaok(wmOmQmI.getQmOkQuat());//出货数量
wmToDownGoods.setGoodsName(wmOmQmI.getGoodsName());//商品名称
wmToDownGoods.setOmBeizhu(wmOmQmI.getOmBeizhu());//备注
wmToDownGoods.setImCusCode(wmOmQmI.getImCusCode());//客户单号
wmToDownGoods.setOrderType("01");//默认为01
systemService.save(wmToDownGoods);
wmOmQmI.setBinSta("H");
systemService.saveOrUpdate(wmOmQmI);
systemService.addLog(message, Globals.Log_Type_DEL,
Globals.Log_Leavel_INFO);
} else {
j.setSuccess(false);
message = "下架任务找不到";
}
} catch (Exception e) {
j.setSuccess(false);
e.printStackTrace();
message = "下架失败";
throw new BusinessException(e.getMessage());
}
j.setMsg(message);
return j;
}
@RequestMapping(params = "dotodown") @RequestMapping(params = "dotodown")

View File

@ -14,6 +14,8 @@
<t:dgCol title="所属部门" field="sysOrgCode" hidden="true" queryMode="group" width="120"></t:dgCol> <t:dgCol title="所属部门" field="sysOrgCode" hidden="true" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="所属公司" field="sysCompanyCode" hidden="true" queryMode="group" width="120"></t:dgCol> <t:dgCol title="所属公司" field="sysCompanyCode" hidden="true" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="操作" field="opt" width="100"></t:dgCol> <t:dgCol title="操作" field="opt" width="100"></t:dgCol>
<t:dgCol title="波次号" field="waveId" query="true" queryMode="single" width="120"></t:dgCol>
<t:dgCol title="出库通知单" field="omNoticeId" query="true" queryMode="single" width="100"></t:dgCol> <t:dgCol title="出库通知单" field="omNoticeId" query="true" queryMode="single" width="100"></t:dgCol>
<t:dgCol title="出库通知行项目" field="iomNoticeItem" hidden="true" queryMode="group" width="120"></t:dgCol> <t:dgCol title="出库通知行项目" field="iomNoticeItem" hidden="true" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="商品编码" field="goodsId" query="true" queryMode="single" width="100"></t:dgCol> <t:dgCol title="商品编码" field="goodsId" query="true" queryMode="single" width="100"></t:dgCol>
@ -36,7 +38,6 @@
<t:dgCol title="下架状态" field="binSta" query="true" queryMode="single" dictionary="sf_yn" width="50"></t:dgCol> <t:dgCol title="下架状态" field="binSta" query="true" queryMode="single" dictionary="sf_yn" width="50"></t:dgCol>
<t:dgCol title="货主" field="cusCode" query="true" queryMode="single" dictionary="mv_cus,cus_code,cus_name" width="120"></t:dgCol> <t:dgCol title="货主" field="cusCode" query="true" queryMode="single" dictionary="mv_cus,cus_code,cus_name" width="120"></t:dgCol>
<%-- <t:dgCol title="温度" field="recDeg" queryMode="group" width="120"></t:dgCol> --%> <%-- <t:dgCol title="温度" field="recDeg" queryMode="group" width="120"></t:dgCol> --%>
<t:dgCol title="波次号" field="waveId" query="true" queryMode="single" width="120"></t:dgCol>
<%-- <t:dgCol title="客户名称" field="cusName" queryMode="group" width="120"></t:dgCol> --%> <%-- <t:dgCol title="客户名称" field="cusName" queryMode="group" width="120"></t:dgCol> --%>
<%-- <t:dgCol title="商品名称" field="goodsName" queryMode="group" width="120"></t:dgCol> --%> <%-- <t:dgCol title="商品名称" field="goodsName" queryMode="group" width="120"></t:dgCol> --%>
@ -46,6 +47,7 @@
<t:dgToolBar title="编辑" icon="icon-edit" url="wmOmQmIController.do?goUpdate" funname="update"></t:dgToolBar> <t:dgToolBar title="编辑" icon="icon-edit" url="wmOmQmIController.do?goUpdate" funname="update"></t:dgToolBar>
<%-- <t:dgFunOpt title="任务确认" funname="taskassign(id)" urlclass="ace_button" exp="binSta#eq#I" /> --%> <%-- <t:dgFunOpt title="任务确认" funname="taskassign(id)" urlclass="ace_button" exp="binSta#eq#I" /> --%>
<t:dgToolBar title="批量下架" funname="doalltodown"></t:dgToolBar> <t:dgToolBar title="批量下架" funname="doalltodown"></t:dgToolBar>
<t:dgToolBar title="批量波次下架" funname="doallwavetodown"></t:dgToolBar>
<t:dgToolBar title="选择批量更改" icon="icon-edit" funname="editRow"></t:dgToolBar> <t:dgToolBar title="选择批量更改" icon="icon-edit" funname="editRow"></t:dgToolBar>
<t:dgToolBar title="批量保存" icon="icon-save" url="wmOmQmIController.do?saveRows" funname="saveData"></t:dgToolBar> <t:dgToolBar title="批量保存" icon="icon-save" url="wmOmQmIController.do?saveRows" funname="saveData"></t:dgToolBar>
<t:dgToolBar title="取消批量更改" icon="icon-undo" funname="reject"></t:dgToolBar> <t:dgToolBar title="取消批量更改" icon="icon-undo" funname="reject"></t:dgToolBar>
@ -80,6 +82,38 @@
} }
function doallwavetodown(){
var ids = [];
var rows = $('#wmOmQmIList').datagrid('getSelections');
for(var i=0; i<rows.length; i++){
wmwavetodown(rows[i].id);
}
}
function wmwavetodown(id){
var url = "wmOmQmIController.do?dotowavedown&id="+id;
$.ajax({
async : true,
cache : false,
type : 'POST',
url : url,// 请求的action路径
error : function() {// 请求失败处理函数
},
success : function(data) {
var d = $.parseJSON(data);
if (d.success) {
tip("下架成功");
$('#wmOmQmIList').datagrid('reload',{});
}
}
});
}
function wmtodown(id){ function wmtodown(id){
var url = "wmOmQmIController.do?dotodown&id="+id; var url = "wmOmQmIController.do?dotodown&id="+id;
$.ajax({ $.ajax({

View File

@ -3,7 +3,7 @@
<t:base type="jquery,easyui,tools,DatePicker"></t:base> <t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true"> <div class="easyui-layout" fit="true">
<div region="center" style="padding:0px;border:0px"> <div region="center" style="padding:0px;border:0px">
<t:datagrid autoLoadData="false" name="wmInQmIbatchList" checkbox="true" pageSize="100" fitColumns="false" title="批量收货" actionUrl="wmImNoticeHController.do?datagridbatch" sortName="createDate" sortOrder="desc" idField="id" fit="true" queryMode="group"> <t:datagrid autoLoadData="false" name="wmInQmIbatchList" checkbox="true" pageSize="10" fitColumns="false" title="批量收货" actionUrl="wmImNoticeHController.do?datagridbatch" sortName="createDate" sortOrder="desc" idField="id" fit="true" queryMode="group">
<t:dgCol title="操作" field="opt" width="50"></t:dgCol> <t:dgCol title="操作" field="opt" width="50"></t:dgCol>
<t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol> <t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
<t:dgCol title="创建人名称" field="createName" queryMode="single" width="80"></t:dgCol> <t:dgCol title="创建人名称" field="createName" queryMode="single" width="80"></t:dgCol>