根据分组和批量查找储位

master
erzhongxmu 2020-10-07 05:59:55 +08:00
parent 776b32b147
commit 006600ed16
5 changed files with 83 additions and 9 deletions

View File

@ -65,6 +65,9 @@ public class MdBinEntity implements java.io.Serializable {
@Excel(name="所属客户")
private java.lang.String suoShuKeHu;
/**体积单位*/
/**最大面积*/
@Excel(name="储位组别")
private java.lang.String zuiDaMianJi;
@Excel(name="最小批量")
private java.lang.String tiJiDanWei;
@ -82,8 +85,7 @@ public class MdBinEntity implements java.io.Serializable {
/**最大重量*/
@Excel(name="最大重量")
private java.lang.String zuiDaZhongLiang;
/**最大面积*/
private java.lang.String zuiDaMianJi;
/**最大托盘*/
@Excel(name="最大托盘")
private java.lang.String zuiDaTuoPan;

View File

@ -100,8 +100,29 @@ public class SmsSendTask {
} catch (Exception e) {
zuidatiji = "1";
}
String binplantuopan = "0";
try{
WmImNoticeIEntity wmImNoticeIEntity = systemService.get(WmImNoticeIEntity.class,wmInQmIEntity.getImNoticeItem()) ;
binplantuopan = wmImNoticeIEntity.getBinPlan() ;
}catch (Exception e){
sql = "select binid from wv_avabin where ku_wei_lei_xing <> '不良品区' and zui_da_ti_ji >"
}
String hqllastbin = "from WmInQmIEntity t where t.binSta=? and (t.binId is not null or t.binId <> '' ) and imNoticeItem = ? order by updateDate desc ";
List<WmInQmIEntity> WmInQmbinlist = systemService.findHql(hql, new Object[] { "Y" },wmInQmIEntity.getImNoticeItem());
String lastbin = ""; //本单上一个储位
String lastbinfenzu = ""; //本单上一个储位分组
if(WmInQmbinlist!=null&&WmInQmbinlist.size()>0){
lastbin = WmInQmbinlist.get(0).getBinId();
List<MdBinEntity> mdblist = systemService.findByProperty(MdBinEntity.class, "kuWeiBianMa", lastbin);
if(mdblist!=null&&mdblist.size()>0){
lastbinfenzu = mdblist.get(0).getZuiDaMianJi();
}
}
sql = "select binid from wv_avabin where ku_wei_lei_xing <> '不良品区' and zui_da_mian_ji = '" +lastbinfenzu+
"' and zui_da_ti_ji >"
+ zuidatiji
+ " and ku_wei_shu_xing = (select cf_wen_ceng from mv_goods where goods_code = '"
+ wmInQmIEntity.getGoodsId()
@ -113,13 +134,42 @@ public class SmsSendTask {
+ wmInQmIEntity.getCusCode()
+ "') "
+ "order by suo_shu_ke_hu desc, shang_jia_ci_xu,binid limit 1";
org.jeecgframework.core.util.LogUtil
.info("===================sql1==================="+sql);
binMap = systemService.findOneForJdbc(sql);
if (binMap != null) {
wmInQmIEntity.setBinId(binMap.get("binid").toString());
systemService.updateEntitie(wmInQmIEntity);
}else{
sql = "select binid from wv_avabin where ku_wei_lei_xing <> '不良品区' and ti_ji_dan_wei <= " +binplantuopan+
" and zhong_liang_dan_wei >= " +binplantuopan+
" and zui_da_ti_ji >"
+ zuidatiji
+ " and ku_wei_shu_xing = (select cf_wen_ceng from mv_goods where goods_code = '"
+ wmInQmIEntity.getGoodsId()
+ "')"
+ " and locate( (select chp_shu_xing from mv_goods where goods_code = '"
+ wmInQmIEntity.getGoodsId()
+ "') ,chp_shu_xing ) <> 0 "
+ " and (suo_shu_ke_hu = '' or suo_shu_ke_hu = '"
+ wmInQmIEntity.getCusCode()
+ "') "
+ "order by suo_shu_ke_hu desc, shang_jia_ci_xu,binid limit 1";
org.jeecgframework.core.util.LogUtil
.info("===================sql2==================="+sql);
binMap = systemService.findOneForJdbc(sql);
if (binMap != null) {
wmInQmIEntity.setBinId(binMap.get("binid").toString());
systemService.updateEntitie(wmInQmIEntity);
}
}
}
if (binMap != null) {
wmInQmIEntity.setBinId(binMap.get("binid").toString());
systemService.updateEntitie(wmInQmIEntity);
}
}
}
//更新基本数量和单位

View File

@ -336,6 +336,17 @@
<label class="Validform_label" style="display: none">出库口</label>
</div>
<div class="col-xs-3 text-center">
<b>储位组别</b>
</div>
<div class="col-xs-3">
<input id="zuiDaMianJi" name="zuiDaMianJi" type="text" class="form-control"
ignore="ignore" style="text-align:right"/>
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">储位组别</label>
</div>
</div>

View File

@ -343,7 +343,17 @@
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">出库口</label>
</div>
<div class="col-xs-3 text-center">
<b>储位组别</b>
</div>
<div class="col-xs-3">
<input id="zuiDaMianJi" name="zuiDaMianJi" type="text" class="form-control"
ignore="ignore" style="text-align:right"
value='${mdBinPage.zuiDaMianJi}' />
<span class="Validform_checktip" style="float:left;height:0px;"></span>
<label class="Validform_label" style="display: none">储位组别</label>
</div>
</div>

View File

@ -27,11 +27,12 @@
<t:dgCol title="最小批量" field="tiJiDanWei" queryMode="group" width="70"></t:dgCol>
<t:dgCol title="最大批量" field="zhongLiangDanWei" queryMode="group" width="70"></t:dgCol>
<t:dgCol title="出库口" field="mianJiDanWei" queryMode="group" width="70"></t:dgCol>
<t:dgCol title="储位组别" field="zuiDaMianJi" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="出库口" field="mianJiDanWei" queryMode="group" width="70"></t:dgCol>
<t:dgCol title="最大体积" field="zuiDaTiJi" style="text-align:right" queryMode="group" width="70"></t:dgCol>
<t:dgCol title="最大重量" field="zuiDaZhongLiang" style="text-align:right" queryMode="group" width="70"></t:dgCol>
<t:dgCol title="最大面积" field="zuiDaMianJi" hidden="true" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="最大托盘" field="zuiDaTuoPan" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="长度" field="chang" queryMode="group" width="120"></t:dgCol>
<t:dgCol title="宽度" field="kuan" queryMode="group" width="120"></t:dgCol>