线边库存无需批次
parent
0dfe22db6a
commit
af45935bad
|
|
@ -1587,7 +1587,7 @@ public class DefaultInterfaceManager extends DefaultBaseManager implements Inter
|
||||||
int shsl=Integer.parseInt(sl.trim());
|
int shsl=Integer.parseInt(sl.trim());
|
||||||
obj.put("qty",shsl);
|
obj.put("qty",shsl);
|
||||||
obj.put("put_xs", getPutXs(tph,d.getId(),it.getCode()));
|
obj.put("put_xs", getPutXs(tph,d.getId(),it.getCode()));
|
||||||
List<Pinfan> pfs=this.commonDao.findByQuery("from Pinfan pf where pf.item.id="+d.getItem().getId()+" and pf.bonded='"+tax+"'");
|
List<Pinfan> pfs=this.commonDao.findByQuery("from Pinfan pf where pf.item.id="+d.getItem().getId()+" and pf.bonded='"+tax+"' and pf.zone.code like '%CKD%'");
|
||||||
if(pfs.size()<=0){
|
if(pfs.size()<=0){
|
||||||
throw new BusinessException("请维护品番关联");
|
throw new BusinessException("请维护品番关联");
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
|
|
@ -2453,6 +2453,9 @@ public class DefaultASNManager extends DefaultBaseManager implements ASNManager
|
||||||
Long id=Long.parseLong(sheet.getCell(0,i).getContents().trim());
|
Long id=Long.parseLong(sheet.getCell(0,i).getContents().trim());
|
||||||
Inventory inv=this.commonDao.get(Inventory.class, id);
|
Inventory inv=this.commonDao.get(Inventory.class, id);
|
||||||
if(inv!=null){
|
if(inv!=null){
|
||||||
|
//清0日志
|
||||||
|
InventoryLog log=pickKamsManager.addInventoryLog(InventoryLogType.COUNT_ADJUST, -1, inv.getZone(), inv.getLocation(), null, inv.getItemKey(),
|
||||||
|
inv.getQuantity(), null, UserHolder.getUser().getName(), inv.getId(), "调整数量"+inv.getQuantity()+"盘点归0", null, null, inv.getZzkw());
|
||||||
Double tzQty=Double.parseDouble(sheet.getCell(8,i).getContents().trim());
|
Double tzQty=Double.parseDouble(sheet.getCell(8,i).getContents().trim());
|
||||||
String tzbz=sheet.getCell(9,i).getContents().trim();
|
String tzbz=sheet.getCell(9,i).getContents().trim();
|
||||||
double srcQty=inv.getQtyOfMasterPack();
|
double srcQty=inv.getQtyOfMasterPack();
|
||||||
|
|
@ -2461,22 +2464,22 @@ public class DefaultASNManager extends DefaultBaseManager implements ASNManager
|
||||||
this.commonDao.store(inv);
|
this.commonDao.store(inv);
|
||||||
String des=(int)srcQty+"变为"+tzQty;
|
String des=(int)srcQty+"变为"+tzQty;
|
||||||
int incOrDec=1;
|
int incOrDec=1;
|
||||||
double fasl=srcQty-tzQty;;
|
// double fasl=srcQty-tzQty;;
|
||||||
if(fasl==0){
|
// if(fasl==0){
|
||||||
System.out.println(i+1+"行没有调整");
|
// System.out.println(i+1+"行没有调整");
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
if(fasl>0){
|
// if(fasl>0){
|
||||||
incOrDec=-1;
|
// incOrDec=-1;
|
||||||
}
|
// }
|
||||||
InventoryLog log=pickKamsManager.addInventoryLog(InventoryLogType.INVENTORY_ADJUST, incOrDec, inv.getZone(), inv.getLocation(), null, inv.getItemKey(),
|
InventoryLog log2=pickKamsManager.addInventoryLog(InventoryLogType.COUNT_ADJUST, 1, inv.getZone(), inv.getLocation(), null, inv.getItemKey(),
|
||||||
Math.abs(fasl), null, UserHolder.getUser().getName(), inv.getId(), des, null, null, inv.getZzkw());
|
inv.getQuantity(), null, UserHolder.getUser().getName(), inv.getId(), "盘点初始值"+inv.getQuantity(), null, null, inv.getZzkw());
|
||||||
log.setOperDes(tzbz);
|
log2.setOperDes(tzbz);
|
||||||
this.commonDao.store(log);
|
this.commonDao.store(log2);
|
||||||
System.out.println(i+1+"行调整完成");
|
System.out.println(i+1+"行调整完成");
|
||||||
}else{
|
}else{
|
||||||
System.out.println(i+1+"行没找到");
|
System.out.println(i+1+"行没找到");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (BiffException e) {
|
} catch (BiffException e) {
|
||||||
|
|
|
||||||
|
|
@ -1131,7 +1131,13 @@ public class DefaultPickKamsManager extends DefaultBaseManager implements PickKa
|
||||||
this.commonDao.store(r);
|
this.commonDao.store(r);
|
||||||
}
|
}
|
||||||
PickTicketDetail ptd=t.getPickTicketDetail();
|
PickTicketDetail ptd=t.getPickTicketDetail();
|
||||||
Inventory inv=findInventory(t.getItemKey(), zone, xb_loc, pt.getCode(), SysCode.XB1, ptd.getZzkw());
|
ItemKey key =t.getItemKey();
|
||||||
|
//重新生成itemKey,不带批次
|
||||||
|
if(t.getItemKey().getItem().isBeWeight()){//发动机重新获得批次
|
||||||
|
key = this.itemManager.getItemKey(new ItemKey("",
|
||||||
|
key.getItem(), key.getPinfan()), Boolean.TRUE,null);
|
||||||
|
}
|
||||||
|
Inventory inv=findInventory(key, zone, xb_loc, pt.getCode(), SysCode.XB1, ptd.getZzkw());
|
||||||
double xb_qty=l.getShipQuantity();
|
double xb_qty=l.getShipQuantity();
|
||||||
t_xb_qty+=xb_qty;
|
t_xb_qty+=xb_qty;
|
||||||
double srcQty1=0;
|
double srcQty1=0;
|
||||||
|
|
@ -1597,39 +1603,42 @@ public class DefaultPickKamsManager extends DefaultBaseManager implements PickKa
|
||||||
hql+=" and i.itemKey.pinfan.bonded='"+b.getBonded()+"' ";
|
hql+=" and i.itemKey.pinfan.bonded='"+b.getBonded()+"' ";
|
||||||
hql+=" and i.itemKey.pinfan.zone.id!=77 ";
|
hql+=" and i.itemKey.pinfan.zone.id!=77 ";
|
||||||
}
|
}
|
||||||
|
if(b.getItem().isBeWeight()){//发动机去除批次
|
||||||
|
hql+=" and i.itemKey.lotInfo.propC3 is null";
|
||||||
|
}
|
||||||
hql+=" and i.location.id="+xb_loc.getId()+" order by i.itemKey.lotInfo.propC3";
|
hql+=" and i.location.id="+xb_loc.getId()+" order by i.itemKey.lotInfo.propC3";
|
||||||
// hql+=" order by i.id ";
|
// hql+=" order by i.id ";
|
||||||
List<Inventory> invs=commonDao.findByQuery(hql);
|
List<Inventory> invs=commonDao.findByQuery(hql);
|
||||||
double srcQty1=0;
|
double srcQty1=0;
|
||||||
if(invs.size()>0) {
|
if(invs.size()>0) {
|
||||||
double qty=Double.parseDouble(b.getSingle())*sp.getOrderQuantity();
|
double qty=Double.parseDouble(b.getSingle())*sp.getOrderQuantity();
|
||||||
//如果为发动机,则按照批次耗用
|
// //如果为发动机,则按照批次耗用
|
||||||
if(b.getItem().isBeWeight()){
|
// if(b.getItem().isBeWeight()){
|
||||||
int i=0;
|
// int i=0;
|
||||||
for(Inventory inv:invs){
|
// for(Inventory inv:invs){
|
||||||
if(qty<=0){
|
// if(qty<=0){
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
i++;
|
// i++;
|
||||||
if(i<invs.size()&&inv.getQtyOfMasterPack()<=0){
|
// if(i<invs.size()&&inv.getQtyOfMasterPack()<=0){
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
srcQty1=inv.getQtyOfMasterPack();
|
// srcQty1=inv.getQtyOfMasterPack();
|
||||||
double hyQty=0;
|
// double hyQty=0;
|
||||||
if(inv.getQtyOfMasterPack()>qty||i==invs.size()){
|
// if(inv.getQtyOfMasterPack()>qty||i==invs.size()){
|
||||||
hyQty=qty;
|
// hyQty=qty;
|
||||||
qty-=hyQty;
|
// qty-=hyQty;
|
||||||
}else{
|
// }else{
|
||||||
hyQty=inv.getQtyOfMasterPack();
|
// hyQty=inv.getQtyOfMasterPack();
|
||||||
qty-=hyQty;
|
// qty-=hyQty;
|
||||||
}
|
// }
|
||||||
inv.setQtyOfMasterPack(inv.getQtyOfMasterPack()-hyQty);
|
// inv.setQtyOfMasterPack(inv.getQtyOfMasterPack()-hyQty);
|
||||||
inv.setQuantity(inv.getQtyOfMasterPack());
|
// inv.setQuantity(inv.getQtyOfMasterPack());
|
||||||
commonDao.store(inv);
|
// commonDao.store(inv);
|
||||||
this.addInventoryLog(InventoryLogType.PROCESS_DOWN, -1, b.getZone(), inv.getLocation(), sp.getBigItem().getCode(), inv.getItemKey(),
|
// this.addInventoryLog(InventoryLogType.PROCESS_DOWN, -1, b.getZone(), inv.getLocation(), sp.getBigItem().getCode(), inv.getItemKey(),
|
||||||
hyQty, null, UserHolder.getUser().getName(), null, (int)srcQty1+"变为"+(int)inv.getQtyOfMasterPack()+"hy"+sp.getId(), null, null, b.getZzkw());
|
// hyQty, null, UserHolder.getUser().getName(), null, (int)srcQty1+"变为"+(int)inv.getQtyOfMasterPack()+"hy"+sp.getId(), null, null, b.getZzkw());
|
||||||
}
|
// }
|
||||||
}else{
|
// }else{
|
||||||
Inventory inv=invs.get(0);
|
Inventory inv=invs.get(0);
|
||||||
srcQty1=inv.getQtyOfMasterPack();
|
srcQty1=inv.getQtyOfMasterPack();
|
||||||
|
|
||||||
|
|
@ -1638,7 +1647,7 @@ public class DefaultPickKamsManager extends DefaultBaseManager implements PickKa
|
||||||
commonDao.store(inv);
|
commonDao.store(inv);
|
||||||
this.addInventoryLog(InventoryLogType.PROCESS_DOWN, -1, b.getZone(), inv.getLocation(), sp.getBigItem().getCode(), inv.getItemKey(),
|
this.addInventoryLog(InventoryLogType.PROCESS_DOWN, -1, b.getZone(), inv.getLocation(), sp.getBigItem().getCode(), inv.getItemKey(),
|
||||||
qty, null, UserHolder.getUser().getName(), null, (int)srcQty1+"变为"+(int)inv.getQtyOfMasterPack()+"hy"+sp.getId(), null, null, b.getZzkw());
|
qty, null, UserHolder.getUser().getName(), null, (int)srcQty1+"变为"+(int)inv.getQtyOfMasterPack()+"hy"+sp.getId(), null, null, b.getZzkw());
|
||||||
}
|
// }
|
||||||
}else {
|
}else {
|
||||||
//生成库存记录
|
//生成库存记录
|
||||||
Inventory inv=EntityFactory.getEntity(Inventory.class);
|
Inventory inv=EntityFactory.getEntity(Inventory.class);
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,9 @@
|
||||||
where 1=1 and commonCode.codeType='工位' order by commonCode.id]]></hql>
|
where 1=1 and commonCode.codeType='工位' order by commonCode.id]]></hql>
|
||||||
</list>
|
</list>
|
||||||
<text id="p.code" title="p.code" row="2" col="1" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" isPrecision="false"/>
|
<text id="p.code" title="p.code" row="2" col="1" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" isPrecision="false"/>
|
||||||
<date id="pp.OfflineDate" title="操作日期" row="2" col="2" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false" showTime="false" manualEditable="true" defaultCurrentDate="false"/>
|
<dateRanger id="pp.OfflineDate" title="操作日期" row="7" col="1" span="2" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" showTime="false" manualEditable="true" defaultCurrentDate="false" fromDate="pp.OfflineDate.begin" toDate="pp.OfflineDate.end"/>
|
||||||
|
|
||||||
|
<!-- <date id="pp.OfflineDate" title="操作日期" row="2" col="2" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false" showTime="false" manualEditable="true" defaultCurrentDate="false"/> -->
|
||||||
<text id="pp.bigItem.code" title="机型" row="3" col="1" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" isPrecision="false"/>
|
<text id="pp.bigItem.code" title="机型" row="3" col="1" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" isPrecision="false"/>
|
||||||
<text id="pp.strExtend2" title="发货" row="3" col="2" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" isPrecision="false"/>
|
<text id="pp.strExtend2" title="发货" row="3" col="2" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" isPrecision="false"/>
|
||||||
<text id="pp.modelNo" title="机号" row="5" col="1" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" isPrecision="false"/>
|
<text id="pp.modelNo" title="机号" row="5" col="1" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" isPrecision="false"/>
|
||||||
|
|
@ -65,8 +67,8 @@
|
||||||
/~procedure: and pp.procedure like {procedure} ~/
|
/~procedure: and pp.procedure like {procedure} ~/
|
||||||
/~p.numberNo: and pp.numberNo like {p.numberNo} ~/
|
/~p.numberNo: and pp.numberNo like {p.numberNo} ~/
|
||||||
/~ p.bomList.id: and pp.bomList.id = {p.bomList.id} ~/
|
/~ p.bomList.id: and pp.bomList.id = {p.bomList.id} ~/
|
||||||
/~pickTicket.orderDate.begin: AND pp.OfflineDate >= {pickTicket.orderDate.begin} ~/
|
/~pp.OfflineDate.begin: AND DATE(pp.OfflineDate) >= {pp.OfflineDate.begin} ~/
|
||||||
/~pickTicket.orderDate.end: AND pp.OfflineDate <= {pickTicket.orderDate.end} ~/
|
/~pp.OfflineDate.end: AND DATE(pp.OfflineDate) <= {pp.OfflineDate.end} ~/
|
||||||
order by pp.strExtend4 desc,pp.longExtend1 desc,pp.id
|
order by pp.strExtend4 desc,pp.longExtend1 desc,pp.id
|
||||||
]]></datasource>
|
]]></datasource>
|
||||||
<columns>
|
<columns>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
AND (location.outLock = '' or location.outLock is null)
|
AND (location.outLock = '' or location.outLock is null)
|
||||||
AND location.warehouse = #{SESSION_WAREHOUSE}
|
AND location.warehouse = #{SESSION_WAREHOUSE}
|
||||||
AND location.code <> ${inventory.location.code}
|
AND location.code <> ${inventory.location.code}
|
||||||
AND location.type in ('STORAGE','TRANSIT','BAD','SHIP')]]></hql>
|
AND (location.type in ('STORAGE','TRANSIT','BAD','SHIP') OR location.code='JBTXB' )]]></hql>
|
||||||
</remote>
|
</remote>
|
||||||
<text id="destLP" title="moveInventoryPage.destLP" row="11" col="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="true" trimSpace="true" isPrecision="true">
|
<text id="destLP" title="moveInventoryPage.destLP" row="11" col="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="true" trimSpace="true" isPrecision="true">
|
||||||
<!-- <visibleExpression><![CDATA[(${fullLPMove}=='false')]]></visibleExpression> -->
|
<!-- <visibleExpression><![CDATA[(${fullLPMove}=='false')]]></visibleExpression> -->
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue