分配-选择工作站
parent
719494249a
commit
4b544cac3a
|
|
@ -13,4 +13,7 @@ public interface NewWaveManager extends BaseManager {
|
|||
*/
|
||||
@Transactional
|
||||
void allocateGZZ(List<Long> ids);
|
||||
//波次下发
|
||||
@Transactional
|
||||
void alloteWaveDoc(long waveDocId,boolean lx1,boolean lx2,boolean lx3,boolean lx4,boolean lx5,boolean lx6,boolean lx7,boolean lx8,boolean lx9,boolean lx10,boolean lx11,boolean lx12,boolean lx13,boolean lx14,boolean lx15,boolean hj1,boolean hj2,boolean hj3,boolean hj4,boolean hj5,boolean hj6,boolean hj7,boolean lk1,boolean lk2,boolean lk3,boolean lk4,boolean lk5);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,12 +18,14 @@ import org.hibernate.Query;
|
|||
import org.hibernate.Session;
|
||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||
|
||||
import com.dev.energy.server.exception.BusinessException;
|
||||
import com.dev.energy.server.model.EntityFactory;
|
||||
import com.dev.energy.server.service.pojo.DefaultBaseManager;
|
||||
import com.dev.sequence.model.sequence.Sequence;
|
||||
import com.dev.sequence.service.sequence.SequenceManager;
|
||||
import com.dev.swms.server.model.base.ShiXiao;
|
||||
import com.dev.swms.server.model.inventory.Task;
|
||||
import com.dev.swms.server.model.receiving.SlotType;
|
||||
import com.dev.swms.server.model.shipping.NewWaveFlag;
|
||||
import com.dev.swms.server.model.shipping.WaveDoc;
|
||||
import com.dev.swms.server.service.shipping.NewWaveManager;
|
||||
|
|
@ -1414,5 +1416,156 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements
|
|||
}
|
||||
return null;
|
||||
}
|
||||
public void alloteWaveDoc(long waveDocId, boolean lx1, boolean lx2,
|
||||
boolean lx3, boolean lx4, boolean lx5, boolean lx6, boolean lx7,
|
||||
boolean lx8, boolean lx9, boolean lx10, boolean lx11, boolean lx12,
|
||||
boolean lx13, boolean lx14, boolean lx15, boolean hj1, boolean hj2,
|
||||
boolean hj3, boolean hj4, boolean hj5, boolean hj6, boolean hj7,
|
||||
boolean lk1, boolean lk2, boolean lk3, boolean lk4, boolean lk5){
|
||||
|
||||
|
||||
WaveDoc waveDoc = commonDao.get(WaveDoc.class, waveDocId);
|
||||
ShiXiao lx_sx = kqShiXiao(NewWaveFlag.LXQ);
|
||||
ShiXiao hj_sx = kqShiXiao(NewWaveFlag.HJQ);
|
||||
ShiXiao lk_sx = kqShiXiao(NewWaveFlag.LKQ);
|
||||
// 获取开启的工作站
|
||||
/*List<String> lx_codes = getGzzCodes(NewWaveFlag.LXQ);// 自动创波工作站
|
||||
List<String> hj_codes = getGzzCodes(NewWaveFlag.HJQ);
|
||||
List<String> lk_codes = getGzzCodes(NewWaveFlag.LKQ);*/
|
||||
List<String> lx_codes=new ArrayList<String>();
|
||||
List<String> hj_codes=new ArrayList<String>();
|
||||
List<String> lk_codes=new ArrayList<String>();
|
||||
if (lx1) {
|
||||
lx_codes.add("201");
|
||||
}
|
||||
if (lx2) {
|
||||
lx_codes.add("202");
|
||||
}
|
||||
if (lx3) {
|
||||
lx_codes.add("203");
|
||||
}
|
||||
if (lx4) {
|
||||
lx_codes.add("204");
|
||||
}
|
||||
if (lx5) {
|
||||
lx_codes.add("205");
|
||||
}
|
||||
if (lx6) {
|
||||
lx_codes.add("206");
|
||||
}
|
||||
if (lx7) {
|
||||
lx_codes.add("207");
|
||||
}
|
||||
if (lx8) {
|
||||
lx_codes.add("208");
|
||||
}
|
||||
if (lx9) {
|
||||
lx_codes.add("209");
|
||||
}
|
||||
if (lx10) {
|
||||
lx_codes.add("210");
|
||||
}
|
||||
if (lx11) {
|
||||
lx_codes.add("211");
|
||||
}
|
||||
if (lx12) {
|
||||
lx_codes.add("212");
|
||||
}
|
||||
if (lx13) {
|
||||
lx_codes.add("213");
|
||||
}
|
||||
if (lx14) {
|
||||
lx_codes.add("214");
|
||||
}
|
||||
if (lx15) {
|
||||
lx_codes.add("215");
|
||||
}
|
||||
if (hj1) {
|
||||
hj_codes.add("101");
|
||||
}
|
||||
if (hj2) {
|
||||
hj_codes.add("102");
|
||||
}
|
||||
if (hj3) {
|
||||
hj_codes.add("103");
|
||||
}
|
||||
if (hj4) {
|
||||
hj_codes.add("104");
|
||||
}
|
||||
if (hj5) {
|
||||
hj_codes.add("105");
|
||||
}
|
||||
if (hj6) {
|
||||
hj_codes.add("106");
|
||||
}
|
||||
if (lk1) {
|
||||
lk_codes.add("601");
|
||||
}
|
||||
if (lk2) {
|
||||
lk_codes.add("602");
|
||||
}
|
||||
if (lk3) {
|
||||
lk_codes.add("603");
|
||||
}
|
||||
if (lk4) {
|
||||
lk_codes.add("604");
|
||||
}
|
||||
if (lk5) {
|
||||
lk_codes.add("605");
|
||||
}
|
||||
|
||||
// 得到工作站剩余任务行数
|
||||
Map<String, Integer> gzz_maps = gzzCount(waveDoc.getCode());// 所有工作站没完成的任务
|
||||
int lxCount = 0;// 工作站任务未处理任务数
|
||||
int hjCount = 0;
|
||||
int lkCount = 0;
|
||||
for (String code : lx_codes) {
|
||||
|
||||
lxCount += gzz_maps.get(code) == null ? 0 : gzz_maps.get(code);
|
||||
}
|
||||
//定义工作站最小能效数,自适应开启工作站数
|
||||
//自适应合理开启工作站数gzz_codes,每个工作站暂定60
|
||||
int lx_jianHuoXiaoLv=getValueGzzNumber(lx_sx);
|
||||
List<Object[]> lx_wwc_list=getTaskList(waveDoc.getCode(), NewWaveFlag.LXQ);
|
||||
if(lx_wwc_list.size()<=lx_jianHuoXiaoLv*5){//lx_jianHuoXiaoLv*lx_codes.size()/2
|
||||
List<GongZuoZhan> gzlistGongZuoZhans = new ArrayList<DefaultNewWaveManager.GongZuoZhan>();
|
||||
for (String gongzuozhancode : lx_codes) {
|
||||
int notFinished = (gzz_maps.get(gongzuozhancode) == null ? 0
|
||||
: gzz_maps.get(gongzuozhancode));
|
||||
GongZuoZhan gongZuoZhan = new GongZuoZhan(gongzuozhancode,
|
||||
notFinished, 0, true);
|
||||
gzlistGongZuoZhans.add(gongZuoZhan);
|
||||
}
|
||||
Collections.sort(gzlistGongZuoZhans);
|
||||
|
||||
lx_codes=new ArrayList<String>();
|
||||
int wcc_count=0;
|
||||
for(GongZuoZhan gzz:gzlistGongZuoZhans){
|
||||
wcc_count+=lx_jianHuoXiaoLv-gzz.notFinished;
|
||||
lx_codes.add(gzz.code);
|
||||
logger.info("开启工作站========="+gzz.code+"====剩余未完成任务数==========="+gzz.notFinished);
|
||||
if(wcc_count>=lx_wwc_list.size()){
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (String code : hj_codes) {
|
||||
hjCount += gzz_maps.get(code) == null ? 0 : gzz_maps.get(code);
|
||||
}
|
||||
for (String code : lk_codes) {
|
||||
lkCount += gzz_maps.get(code) == null ? 0 : gzz_maps.get(code);
|
||||
}
|
||||
allocateGZZ(lx_wwc_list, lx_codes,
|
||||
(int) lx_sx.getTaskD(), lx_jianHuoXiaoLv, lxCount,
|
||||
gzz_maps);
|
||||
allocateGZZ(getTaskList(waveDoc.getCode(), NewWaveFlag.HJQ), hj_codes,
|
||||
(int) hj_sx.getTaskD(), getValueGzzNumber(hj_sx), hjCount,
|
||||
gzz_maps);
|
||||
allocateGZZ(getTaskList(waveDoc.getCode(), NewWaveFlag.LKQ), lk_codes,
|
||||
(int) lk_sx.getTaskD(), getValueGzzNumber(lk_sx), lkCount,
|
||||
gzz_maps);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<pages>
|
||||
<editPage id="editbkfpPage" title="分配工作站" onClose="refreshParent" width="300" height="360">
|
||||
<inputUIs>
|
||||
<checkbox id="lxq" title="料箱区工作站" row="5" col="1" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false">
|
||||
<eventListeners>
|
||||
<eventListener id="lx1" refreshUI="false" />
|
||||
<eventListener id="lx2" refreshUI="false" />
|
||||
<eventListener id="lx3" refreshUI="false" />
|
||||
<eventListener id="lx4" refreshUI="false" />
|
||||
<eventListener id="lx5" refreshUI="false" />
|
||||
<eventListener id="lx6" refreshUI="false" />
|
||||
<eventListener id="lx7" refreshUI="false" />
|
||||
<eventListener id="lx8" refreshUI="false" />
|
||||
<eventListener id="lx9" refreshUI="false" />
|
||||
<eventListener id="lx10" refreshUI="false" />
|
||||
<eventListener id="lx11" refreshUI="false" />
|
||||
<eventListener id="lx12" refreshUI="false" />
|
||||
<eventListener id="lx13" refreshUI="false" />
|
||||
<eventListener id="lx14" refreshUI="false" />
|
||||
<eventListener id="lx15" refreshUI="false" />
|
||||
</eventListeners>
|
||||
</checkbox>
|
||||
|
||||
<checkbox id="lx1" title="201" row="6" col="1" width="120" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lx2" title="202" row="6" col="2" width="120" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lx3" title="203" row="6" col="3" width="120" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lx4" title="204" row="6" col="4" width="120" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lx5" title="205" row="6" col="5" width="120" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lx6" title="206" row="7" col="1" width="120" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lx7" title="207" row="7" col="2" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lx8" title="208" row="7" col="3" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lx9" title="209" row="7" col="4" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lx10" title="210" row="7" col="5" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lx11" title="211" row="8" col="1" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lx12" title="212" row="8" col="2" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lx13" title="213" row="8" col="3" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lx14" title="214" row="8" col="4" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lx15" title="215" row="8" col="5" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
|
||||
<separator id="s1" row="9" width="400"/>
|
||||
|
||||
<checkbox id="hjq" title="货架区工作站" row="10" col="1" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false">
|
||||
<eventListeners>
|
||||
<eventListener id="hj1" refreshUI="false" />
|
||||
<eventListener id="hj2" refreshUI="false" />
|
||||
<eventListener id="hj3" refreshUI="false" />
|
||||
<eventListener id="hj4" refreshUI="false" />
|
||||
<eventListener id="hj5" refreshUI="false" />
|
||||
<eventListener id="hj6" refreshUI="false" />
|
||||
<eventListener id="hj7" refreshUI="false" />
|
||||
</eventListeners>
|
||||
</checkbox>
|
||||
<checkbox id="hj1" title="101" row="11" col="1" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="hj2" title="102" row="11" col="2" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="hj3" title="103" row="11" col="3" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="hj4" title="104" row="11" col="4" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="hj5" title="105" row="11" col="5" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="hj6" title="106" row="12" col="1" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="hj7" title="107" row="12" col="2" width="60" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<separator id="s2" row="13" width="400"/>
|
||||
<checkbox id="lkq" title="立库区工作站" row="14" col="1" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false">
|
||||
<eventListeners>
|
||||
<!-- <eventListener id="lk1" refreshUI="false" /> -->
|
||||
<eventListener id="lk2" refreshUI="false" />
|
||||
<!-- <eventListener id="lk3" refreshUI="false" /> -->
|
||||
<eventListener id="lk4" refreshUI="false" />
|
||||
<!-- <eventListener id="lk5" refreshUI="false" /> -->
|
||||
</eventListeners>
|
||||
</checkbox>
|
||||
<checkbox id="lk1" title="601" row="15" col="1" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="true"/>
|
||||
<checkbox id="lk2" title="602/603" row="15" col="2" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lk3" title="603" row="15" col="3" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="true"/>
|
||||
<checkbox id="lk4" title="604/605" row="15" col="4" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<checkbox id="lk5" title="605" row="15" col="5" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="true"/>
|
||||
</inputUIs>
|
||||
<buttons>
|
||||
<commit id="save" title="save"
|
||||
enableType="none" invisible="false">
|
||||
<mappings>
|
||||
<mapping id="waveDoc.id" className="long"/>
|
||||
<mapping id="lx1" className="boolean" />
|
||||
<mapping id="lx2" className="boolean" />
|
||||
<mapping id="lx3" className="boolean" />
|
||||
<mapping id="lx4" className="boolean" />
|
||||
<mapping id="lx5" className="boolean" />
|
||||
<mapping id="lx6" className="boolean" />
|
||||
<mapping id="lx7" className="boolean" />
|
||||
<mapping id="lx8" className="boolean" />
|
||||
<mapping id="lx9" className="boolean" />
|
||||
<mapping id="lx10" className="boolean" />
|
||||
<mapping id="lx11" className="boolean" />
|
||||
<mapping id="lx12" className="boolean" />
|
||||
<mapping id="lx13" className="boolean" />
|
||||
<mapping id="lx14" className="boolean" />
|
||||
<mapping id="lx15" className="boolean" />
|
||||
|
||||
<mapping id="hj1" className="boolean" />
|
||||
<mapping id="hj2" className="boolean" />
|
||||
<mapping id="hj3" className="boolean" />
|
||||
<mapping id="hj4" className="boolean" />
|
||||
<mapping id="hj5" className="boolean" />
|
||||
<mapping id="hj6" className="boolean" />
|
||||
<mapping id="hj7" className="boolean" />
|
||||
|
||||
<mapping id="lk1" className="boolean" />
|
||||
<mapping id="lk2" className="boolean" />
|
||||
<mapping id="lk3" className="boolean" />
|
||||
<mapping id="lk4" className="boolean" />
|
||||
<mapping id="lk5" className="boolean" />
|
||||
|
||||
</mappings>
|
||||
<actions>
|
||||
<action managerName="newWaveManager" methodName="alloteWaveDoc"
|
||||
parameter="waveDoc.id,lx1,lx2,lx3,lx4,lx5,lx6,lx7,lx8,lx9,lx10,lx11,lx12,lx13,lx14,lx15,hj1,hj2,hj3,hj4,hj5,hj6,hj7,lk1,lk2,lk3,lk4,lk5" />
|
||||
</actions>
|
||||
<forwards>
|
||||
<forward name="closeWindow" newEnabled="true" editEnabled="true" />
|
||||
<forward name="refreshParent" newEnabled="true"
|
||||
editEnabled="true" />
|
||||
</forwards>
|
||||
</commit>
|
||||
</buttons>
|
||||
</editPage>
|
||||
</pages>
|
||||
|
|
@ -48,6 +48,10 @@
|
|||
containId="false" pageId="editbkcbPage2" >
|
||||
<enableExpression><![CDATA[(${waveDoc.status} =='OPEN')]]></enableExpression>
|
||||
</popup>
|
||||
<popup id="issuedFpTask" title="分配" enableType="none" invisible="false"
|
||||
containId="false" pageId="editbkfpPage" >
|
||||
<!-- <enableExpression><![CDATA[(${waveDoc.status} =='OPEN')]]></enableExpression> -->
|
||||
</popup>
|
||||
<!-- <commit id="celenPick" title="下发" enableType="none"
|
||||
invisible="false" >
|
||||
<mappings>
|
||||
|
|
|
|||
Loading…
Reference in New Issue