parent
8f8330a40a
commit
66c8a5643a
|
|
@ -214,7 +214,7 @@
|
||||||
<property name="jobDetail" ref="autoLibraryTask"/>
|
<property name="jobDetail" ref="autoLibraryTask"/>
|
||||||
<property name="cronExpression">
|
<property name="cronExpression">
|
||||||
<!-- <value> 0 0/01 * * * ? </value> -->
|
<!-- <value> 0 0/01 * * * ? </value> -->
|
||||||
<value> */3 * * * * ? </value>
|
<value> */1 * * * * ? </value>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
<!-- 立库任务入库下发 -->
|
<!-- 立库任务入库下发 -->
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@ import com.dev.swms.server.service.shipping.PickTicketManager;
|
||||||
import com.dev.swms.server.service.shipping.WaveDocManager;
|
import com.dev.swms.server.service.shipping.WaveDocManager;
|
||||||
import com.dev.swms.server.utils.interfaceUtil;
|
import com.dev.swms.server.utils.interfaceUtil;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author dev
|
* @author dev
|
||||||
* @version $Id: AdapterLauncher.java,v 1.2 2010/06/01 09:14:16 peng.lei Exp $
|
* @version $Id: AdapterLauncher.java,v 1.2 2010/06/01 09:14:16 peng.lei Exp $
|
||||||
|
|
@ -120,7 +122,7 @@ public class ItemJobLauncher implements ApplicationListener {
|
||||||
public void DefaultAutoWaveDoc0(){
|
public void DefaultAutoWaveDoc0(){
|
||||||
Warehouse w =commonDao.load(Warehouse.class, 1L);
|
Warehouse w =commonDao.load(Warehouse.class, 1L);
|
||||||
if(w.isBeGyWarehouse()){
|
if(w.isBeGyWarehouse()){
|
||||||
System.out.println("杂单开始");
|
logger.info("杂单开始");
|
||||||
/*waveDocManager.NewWaveDoc01("ONLINE_STATION001");
|
/*waveDocManager.NewWaveDoc01("ONLINE_STATION001");
|
||||||
waveDocManager.NewWaveDoc01("ONLINE_STATION002");
|
waveDocManager.NewWaveDoc01("ONLINE_STATION002");
|
||||||
waveDocManager.NewWaveDoc01("ONLINE_STATION003");
|
waveDocManager.NewWaveDoc01("ONLINE_STATION003");
|
||||||
|
|
@ -141,7 +143,7 @@ public class ItemJobLauncher implements ApplicationListener {
|
||||||
public void autoLibraryTask(){
|
public void autoLibraryTask(){
|
||||||
synchronized ("ltTaskOut") {
|
synchronized ("ltTaskOut") {
|
||||||
//按工作站循环下发
|
//按工作站循环下发
|
||||||
// System.out.println("1------");
|
// logger.info("1------");
|
||||||
for(int y1=602;y1<=605;y1++) {
|
for(int y1=602;y1<=605;y1++) {
|
||||||
int gzd=0;
|
int gzd=0;
|
||||||
Boolean daup =false;
|
Boolean daup =false;
|
||||||
|
|
@ -150,10 +152,8 @@ public class ItemJobLauncher implements ApplicationListener {
|
||||||
+ " and ltask.type in ('2','6','3') "
|
+ " and ltask.type in ('2','6','3') "
|
||||||
+" and ltask.toCellCode='"+y1+"'"
|
+" and ltask.toCellCode='"+y1+"'"
|
||||||
+ " order by ltask.relatedBill4 desc,ltask.seq asc,ltask.createDate asc");
|
+ " order by ltask.relatedBill4 desc,ltask.seq asc,ltask.createDate asc");
|
||||||
// System.out.println("1------"+y1);
|
// logger.info("1------"+y1);
|
||||||
// System.out.println(y1+"zgz="+ls21.size());
|
// logger.info(y1+"zgz="+ls21.size());
|
||||||
//查到4个巷道没有任务的巷道 1:false;2:false;
|
|
||||||
|
|
||||||
gzd=ls21.size();
|
gzd=ls21.size();
|
||||||
if (ls21.size()>=3) {
|
if (ls21.size()>=3) {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -165,16 +165,16 @@ public class ItemJobLauncher implements ApplicationListener {
|
||||||
+ " and ltask.type in ('2','6','3') "
|
+ " and ltask.type in ('2','6','3') "
|
||||||
+" and ltask.relatedBill5='"+y+"'"
|
+" and ltask.relatedBill5='"+y+"'"
|
||||||
+ " order by ltask.seq asc");
|
+ " order by ltask.seq asc");
|
||||||
// System.out.println("1------"+y1+"-----"+y);
|
// logger.info("1------"+y1+"-----"+y);
|
||||||
// System.out.println(y+"hdtask="+ls22.size());
|
// logger.info(y+"hdtask="+ls22.size());
|
||||||
if (ls22.size()>0) {
|
if (ls22.size()>0) {
|
||||||
continue;
|
continue;
|
||||||
}else {
|
}else {
|
||||||
List<LibraryTask> listTasks=moveDocManager.autoOutLibraryTask3(y,y1);//生成出库的移位任务,
|
List<LibraryTask> listTasks=moveDocManager.autoOutLibraryTask3(y,y1);//生成出库的移位任务,
|
||||||
System.out.println("xiafarenw="+listTasks.size());
|
|
||||||
moveDocManager.autoWcsLibraryTask(listTasks);//下发任务
|
moveDocManager.autoWcsLibraryTask(listTasks);//下发任务
|
||||||
|
// logger.info("xiafarenw="+listTasks.size());
|
||||||
if(listTasks.size()>0) {
|
if(listTasks.size()>0) {
|
||||||
System.out.println("1------"+y1+"-----"+y+"---2222");
|
// logger.info("1------"+y1+"-----"+y+"---2222");
|
||||||
gzd++;
|
gzd++;
|
||||||
if(gzd>=3) {//判定工作站任务是否大于三个,大于跳出工作站循环
|
if(gzd>=3) {//判定工作站任务是否大于三个,大于跳出工作站循环
|
||||||
daup=true;
|
daup=true;
|
||||||
|
|
@ -185,7 +185,7 @@ public class ItemJobLauncher implements ApplicationListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if(daup) {
|
// if(daup) {
|
||||||
// System.out.println("1------"+y1+"--跳出---"+"---2222");
|
// logger.info("1------"+y1+"--跳出---"+"---2222");
|
||||||
// break;
|
// break;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
@ -235,7 +235,7 @@ public class ItemJobLauncher implements ApplicationListener {
|
||||||
int e=0;
|
int e=0;
|
||||||
switch (a) {
|
switch (a) {
|
||||||
case 1:
|
case 1:
|
||||||
System.out.println("1");
|
logger.info("1");
|
||||||
if (true) {
|
if (true) {
|
||||||
List<AgvTask> agvTasks = commonDao.findByQuery(" from AgvTask agvTask "
|
List<AgvTask> agvTasks = commonDao.findByQuery(" from AgvTask agvTask "
|
||||||
+ " where 1=1 " //agvTask.beIssue=true
|
+ " where 1=1 " //agvTask.beIssue=true
|
||||||
|
|
@ -256,28 +256,28 @@ public class ItemJobLauncher implements ApplicationListener {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
System.out.println("2");
|
logger.info("2");
|
||||||
//下发料箱整理AGV任务
|
//下发料箱整理AGV任务
|
||||||
hujiaoAgvTask1(1763L,"料箱整理",null);
|
hujiaoAgvTask1(1763L,"料箱整理",null);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
System.out.println("3");
|
logger.info("3");
|
||||||
//下发货架整理AGV任务
|
//下发货架整理AGV任务
|
||||||
hujiaoAgvTask1(1765L,"货架整理",null);
|
hujiaoAgvTask1(1765L,"货架整理",null);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
System.out.println("4");
|
logger.info("4");
|
||||||
//下发库位整理AGV任务
|
//下发库位整理AGV任务
|
||||||
hujiaoAgvTask1(1763L,"库位整理",null);
|
hujiaoAgvTask1(1763L,"库位整理",null);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
System.out.println("5");
|
logger.info("5");
|
||||||
//下发AGV取料AGV任务
|
//下发AGV取料AGV任务
|
||||||
hujiaoAgvTask1(1763L,"拣货",null);
|
hujiaoAgvTask1(1763L,"拣货",null);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
//到站一分钟后调用返库
|
//到站一分钟后调用返库
|
||||||
System.out.println("6");
|
logger.info("6");
|
||||||
List<AgvTask> agvTasks = commonDao.findByQuery(" from AgvTask agvTask "
|
List<AgvTask> agvTasks = commonDao.findByQuery(" from AgvTask agvTask "
|
||||||
+ " where agvTask.beIssue=true "
|
+ " where agvTask.beIssue=true "
|
||||||
+ " and agvTask.status in ('ATPICK') "
|
+ " and agvTask.status in ('ATPICK') "
|
||||||
|
|
@ -297,17 +297,17 @@ public class ItemJobLauncher implements ApplicationListener {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
System.out.println("7");
|
logger.info("7");
|
||||||
//下发AGV取料AGV任务
|
//下发AGV取料AGV任务
|
||||||
agvTaskManager.sendAgvTask("拣货",null);
|
agvTaskManager.sendAgvTask("拣货",null);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
System.out.println("8");
|
logger.info("8");
|
||||||
//下发AGV取料AGV任务
|
//下发AGV取料AGV任务
|
||||||
agvTaskManager.sendAgvTask("盘点",null);
|
agvTaskManager.sendAgvTask("盘点",null);
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
System.out.println("9");
|
logger.info("9");
|
||||||
//下发AGV取料AGV任务
|
//下发AGV取料AGV任务
|
||||||
agvTaskManager.sendAgvTask("呼叫",null);
|
agvTaskManager.sendAgvTask("呼叫",null);
|
||||||
break;
|
break;
|
||||||
|
|
@ -475,7 +475,7 @@ public class ItemJobLauncher implements ApplicationListener {
|
||||||
public void DefaultAutoPickticket(){
|
public void DefaultAutoPickticket(){
|
||||||
Warehouse w =commonDao.load(Warehouse.class, 1L);
|
Warehouse w =commonDao.load(Warehouse.class, 1L);
|
||||||
if(w.isDisabled()==false){
|
if(w.isDisabled()==false){
|
||||||
// System.out.println("接单开始");
|
// logger.info("接单开始");
|
||||||
pickTicketManager.receivePickticket();
|
pickTicketManager.receivePickticket();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -499,7 +499,7 @@ public class ItemJobLauncher implements ApplicationListener {
|
||||||
// commonDao.store(pt);
|
// commonDao.store(pt);
|
||||||
// break;
|
// break;
|
||||||
}else {
|
}else {
|
||||||
// System.out.println("工单号"+pt.getCode()+" 未拣货完成");
|
// logger.info("工单号"+pt.getCode()+" 未拣货完成");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@ public class Item extends Entity {
|
||||||
protected String strExtend1;//备注
|
protected String strExtend1;//备注
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**品管类别*/
|
/**品管类别*/
|
||||||
protected String strExtend3;//标准价
|
protected String strExtend3;//标准价
|
||||||
protected String strExtend2;//币种
|
protected String strExtend2;//币种
|
||||||
|
|
|
||||||
|
|
@ -140,10 +140,10 @@ public class Task extends VersionalEntity {
|
||||||
private String strBill4;//合单库位
|
private String strBill4;//合单库位
|
||||||
private String strBill5;//合单人
|
private String strBill5;//合单人
|
||||||
private String strBill6;//是否未未拆包装
|
private String strBill6;//是否未未拆包装
|
||||||
private String strBill7;//
|
private String strBill7;//大容器号
|
||||||
private String strBill8;//
|
private String strBill8;//头物料拼接号
|
||||||
private String strBill9;//
|
private String strBill9;//
|
||||||
private String strBill10;//退料属性(T)
|
private String strBill10;//
|
||||||
private Date dateBill1=new Date();//下发日期
|
private Date dateBill1=new Date();//下发日期
|
||||||
private Date dateBill2;//合单移动日期
|
private Date dateBill2;//合单移动日期
|
||||||
private Date dateBill3;//合单任务完成日期
|
private Date dateBill3;//合单任务完成日期
|
||||||
|
|
@ -156,8 +156,6 @@ public class Task extends VersionalEntity {
|
||||||
private String oldGzz;//原工作站
|
private String oldGzz;//原工作站
|
||||||
private String oldZrw;//原子任务
|
private String oldZrw;//原子任务
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getOldGzz() {
|
public String getOldGzz() {
|
||||||
return oldGzz;
|
return oldGzz;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ import com.dev.swms.server.model.base.PackageUnit;
|
||||||
import com.dev.swms.server.model.base.Structure;
|
import com.dev.swms.server.model.base.Structure;
|
||||||
import com.dev.swms.server.model.base.Warehouse;
|
import com.dev.swms.server.model.base.Warehouse;
|
||||||
import com.dev.swms.server.model.base.WarehouseArea;
|
import com.dev.swms.server.model.base.WarehouseArea;
|
||||||
import com.dev.swms.server.model.base.WarehouseAreaStatus;
|
|
||||||
import com.dev.swms.server.model.base.Worker;
|
import com.dev.swms.server.model.base.Worker;
|
||||||
import com.dev.swms.server.model.base.Workstation;
|
import com.dev.swms.server.model.base.Workstation;
|
||||||
import com.dev.swms.server.model.count.CountDetail;
|
import com.dev.swms.server.model.count.CountDetail;
|
||||||
|
|
@ -76,10 +75,12 @@ import com.dev.energy.server.model.EntityFactory;
|
||||||
import com.dev.energy.server.service.pojo.DefaultBaseManager;
|
import com.dev.energy.server.service.pojo.DefaultBaseManager;
|
||||||
import com.dev.energy.server.util.LocalizedMessage;
|
import com.dev.energy.server.util.LocalizedMessage;
|
||||||
import com.dev.energy.server.web.security.UserHolder;
|
import com.dev.energy.server.web.security.UserHolder;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public class DefaultCountPlanManager extends DefaultBaseManager implements
|
public class DefaultCountPlanManager extends DefaultBaseManager implements
|
||||||
CountPlanManager {
|
CountPlanManager {
|
||||||
|
private static Logger logger = Logger.getLogger(DefaultCountPlanManager.class);
|
||||||
protected final InventoryManager inventoryManager;
|
protected final InventoryManager inventoryManager;
|
||||||
protected final ItemManager itemManager;
|
protected final ItemManager itemManager;
|
||||||
protected final BussinessCodeManager bussinessCodeManager;
|
protected final BussinessCodeManager bussinessCodeManager;
|
||||||
|
|
@ -100,7 +101,7 @@ public class DefaultCountPlanManager extends DefaultBaseManager implements
|
||||||
* @see com.dev.swms.server.service.count.CountPlanManager#active(java.lang.Long)
|
* @see com.dev.swms.server.service.count.CountPlanManager#active(java.lang.Long)
|
||||||
*/
|
*/
|
||||||
public void active(RowData rowData) {
|
public void active(RowData rowData) {
|
||||||
System.out.println(new Date());
|
logger.info(new Date());
|
||||||
Long countPlanId = (Long) rowData.getColumnValue(0);
|
Long countPlanId = (Long) rowData.getColumnValue(0);
|
||||||
CountPlan countPlan = commonDao.load(CountPlan.class, countPlanId);
|
CountPlan countPlan = commonDao.load(CountPlan.class, countPlanId);
|
||||||
if (countPlan.active()) {
|
if (countPlan.active()) {
|
||||||
|
|
@ -109,13 +110,13 @@ public class DefaultCountPlanManager extends DefaultBaseManager implements
|
||||||
|| CountMethod.MOVED_ITEM.equals(countPlan.getCountMethod())
|
|| CountMethod.MOVED_ITEM.equals(countPlan.getCountMethod())
|
||||||
|| CountMethod.ABC.equals(countPlan.getCountMethod())) {
|
|| CountMethod.ABC.equals(countPlan.getCountMethod())) {
|
||||||
//按货品盘点
|
//按货品盘点
|
||||||
System.out.println(new Date());
|
logger.info(new Date());
|
||||||
List<CountDetail> cdlists= commonDao.findByQuery(" from CountDetail c where c.countPlan.id="+countPlanId);
|
List<CountDetail> cdlists= commonDao.findByQuery(" from CountDetail c where c.countPlan.id="+countPlanId);
|
||||||
for (CountDetail countDetail : cdlists) {
|
for (CountDetail countDetail : cdlists) {
|
||||||
Item item = ((CountDetailItem) countDetail).getItem();
|
Item item = ((CountDetailItem) countDetail).getItem();
|
||||||
createCountRecordByItem(countPlan, item,countDetail);
|
createCountRecordByItem(countPlan, item,countDetail);
|
||||||
}
|
}
|
||||||
System.out.println(new Date());
|
logger.info(new Date());
|
||||||
} else {
|
} else {
|
||||||
//按库位动碰盘点&&按库位盘点
|
//按库位动碰盘点&&按库位盘点
|
||||||
for (CountDetail countDetail : countPlan.getDetails()) {
|
for (CountDetail countDetail : countPlan.getDetails()) {
|
||||||
|
|
@ -139,7 +140,7 @@ public class DefaultCountPlanManager extends DefaultBaseManager implements
|
||||||
} else {
|
} else {
|
||||||
throw new BusinessException("countPlan.active.failed");
|
throw new BusinessException("countPlan.active.failed");
|
||||||
}
|
}
|
||||||
System.out.println(new Date());
|
logger.info(new Date());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -180,7 +181,7 @@ public class DefaultCountPlanManager extends DefaultBaseManager implements
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// System.out.println(inventories.size());
|
// logger.info(inventories.size());
|
||||||
item.setCycleDate(new Date());
|
item.setCycleDate(new Date());
|
||||||
if(inventories.size()>0)
|
if(inventories.size()>0)
|
||||||
createCountRecordByInventories(countPlan, inventories);
|
createCountRecordByInventories(countPlan, inventories);
|
||||||
|
|
@ -238,7 +239,6 @@ public class DefaultCountPlanManager extends DefaultBaseManager implements
|
||||||
record.setQuantity(inventory.getQtyOfMasterPack());
|
record.setQuantity(inventory.getQtyOfMasterPack());
|
||||||
record.setOperator(UserHolder.getUser().getName());
|
record.setOperator(UserHolder.getUser().getName());
|
||||||
record.setOccurTime(new Date());
|
record.setOccurTime(new Date());
|
||||||
record.setBarCode(inventory.getBarCode());
|
|
||||||
commonDao.store(record);
|
commonDao.store(record);
|
||||||
inventory.setCounPlan(countPlan.getCode());
|
inventory.setCounPlan(countPlan.getCode());
|
||||||
commonDao.store(inventory);
|
commonDao.store(inventory);
|
||||||
|
|
@ -1122,7 +1122,7 @@ public class DefaultCountPlanManager extends DefaultBaseManager implements
|
||||||
commonDao.store(cr);
|
commonDao.store(cr);
|
||||||
// inv.setCounPlan(countPlan.getCode());
|
// inv.setCounPlan(countPlan.getCode());
|
||||||
// commonDao.store(inv);
|
// commonDao.store(inv);
|
||||||
System.out.println(inv.getId() );
|
logger.info(inv.getId() );
|
||||||
js++;
|
js++;
|
||||||
}
|
}
|
||||||
// countPlan.setStatus(CountStatus.ACTIVE);
|
// countPlan.setStatus(CountStatus.ACTIVE);
|
||||||
|
|
@ -1222,7 +1222,7 @@ public class DefaultCountPlanManager extends DefaultBaseManager implements
|
||||||
commonDao.store(cr);
|
commonDao.store(cr);
|
||||||
// inv.setCounPlan(countPlan.getCode());
|
// inv.setCounPlan(countPlan.getCode());
|
||||||
// commonDao.store(inv);
|
// commonDao.store(inv);
|
||||||
System.out.println(inv.getId() );
|
logger.info(inv.getId() );
|
||||||
js++;
|
js++;
|
||||||
}
|
}
|
||||||
// countPlan.setStatus(CountStatus.ACTIVE);
|
// countPlan.setStatus(CountStatus.ACTIVE);
|
||||||
|
|
@ -1375,7 +1375,6 @@ public class DefaultCountPlanManager extends DefaultBaseManager implements
|
||||||
List<CountRecord> CountRecords = commonDao.findByQuery(" from CountRecord cr where cr.countPlan.id=:id and cr.needCount=1 and cr.delta=0",
|
List<CountRecord> CountRecords = commonDao.findByQuery(" from CountRecord cr where cr.countPlan.id=:id and cr.needCount=1 and cr.delta=0",
|
||||||
new String[] { "id"},new Object[] {countPlanId});
|
new String[] { "id"},new Object[] {countPlanId});
|
||||||
for(CountRecord cr:CountRecords){
|
for(CountRecord cr:CountRecords){
|
||||||
//是否盘点,是否有差异
|
|
||||||
if(cr.isNeedCount()&&cr.getCountQuantity()-cr.getQuantity()!=0) {
|
if(cr.isNeedCount()&&cr.getCountQuantity()-cr.getQuantity()!=0) {
|
||||||
if(cr.getIndId()==null) {
|
if(cr.getIndId()==null) {
|
||||||
cr.setIndId(0L);
|
cr.setIndId(0L);
|
||||||
|
|
@ -1388,19 +1387,7 @@ public class DefaultCountPlanManager extends DefaultBaseManager implements
|
||||||
inv.setQuantity(cr.getCountQuantity());
|
inv.setQuantity(cr.getCountQuantity());
|
||||||
inv.setCounPlan(null);
|
inv.setCounPlan(null);
|
||||||
InventoryLog log1 = new InventoryLog(InventoryLogType.CHECK_ADJUST,inv.getSOI(), 1, w==null?"":w.getName(), inv.getLocation(), cr.getItemKey(), new Date(), inv.getQuantity(), null, "盘点调整", null, null);
|
InventoryLog log1 = new InventoryLog(InventoryLogType.CHECK_ADJUST,inv.getSOI(), 1, w==null?"":w.getName(), inv.getLocation(), cr.getItemKey(), new Date(), inv.getQuantity(), null, "盘点调整", null, null);
|
||||||
if(inv.getQtyOfMasterPack()==0) {
|
commonDao.store(inv);
|
||||||
commonDao.delete(inv);
|
|
||||||
List<Long> list=commonDao.findByQuery("select inv.id from Inventory inv where inv.location.id="+inv.getLocation().getId()+" and "
|
|
||||||
+ " inv.quantity>0 ");
|
|
||||||
if(list.size()==0) {
|
|
||||||
Location invloc=this.load(Location.class, inv.getLocation().getId());
|
|
||||||
invloc.setStatus(WarehouseAreaStatus.FREE);
|
|
||||||
commonDao.store(invloc);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
commonDao.store(inv);
|
|
||||||
}
|
|
||||||
|
|
||||||
Inventory moveInv=new Inventory();
|
Inventory moveInv=new Inventory();
|
||||||
List<Inventory> incs=commonDao.findByQuery(" from Inventory inv where inv.location.id=97197 and "
|
List<Inventory> incs=commonDao.findByQuery(" from Inventory inv where inv.location.id=97197 and "
|
||||||
+ " inv.itemKey.id="+cr.getItemKey().getId()+" ");
|
+ " inv.itemKey.id="+cr.getItemKey().getId()+" ");
|
||||||
|
|
@ -1470,8 +1457,12 @@ public class DefaultCountPlanManager extends DefaultBaseManager implements
|
||||||
dInv.setStatus("已入库");
|
dInv.setStatus("已入库");
|
||||||
dInv.setStorageDate(new Date());
|
dInv.setStorageDate(new Date());
|
||||||
commonDao.store(dInv);
|
commonDao.store(dInv);
|
||||||
loc.setStatus(WarehouseAreaStatus.OCCUPY);
|
// cr.setDelta(1);
|
||||||
commonDao.store(loc);
|
// commonDao.store(cr);
|
||||||
|
// InventoryLog log3 = new InventoryLog(InventoryLogType.CHECK_ADJUST,dInv.getSOI(), 1, w==null?"":w.getName(), loc, cr.getItemKey(), new Date(), moveInv.getQuantity(), null, null, null, null);
|
||||||
|
// log3.setSerial(dInv.getBarCode());
|
||||||
|
// log3.setSrcLoc(cr.getLocation());
|
||||||
|
// commonDao.store(log3);
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
if(cr.isNeedCount()&&cr.getCountQuantity()-cr.getQuantity()==0) {
|
if(cr.isNeedCount()&&cr.getCountQuantity()-cr.getQuantity()==0) {
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ import com.dev.swms.server.service.sequence.BussinessCodeManager;
|
||||||
import com.dev.swms.server.service.shipping.PickTicketManager;
|
import com.dev.swms.server.service.shipping.PickTicketManager;
|
||||||
import com.dev.swms.server.utils.TimeNumberUtils;
|
import com.dev.swms.server.utils.TimeNumberUtils;
|
||||||
import com.dev.swms.server.web.filter.WarehouseHolder;
|
import com.dev.swms.server.web.filter.WarehouseHolder;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
public class DefaultInterfaceRespManager extends DefaultBaseManager implements InterfaceRespManager{
|
public class DefaultInterfaceRespManager extends DefaultBaseManager implements InterfaceRespManager{
|
||||||
protected final InterfaceManager interfaceManager;
|
protected final InterfaceManager interfaceManager;
|
||||||
protected final ASNManager asnManager;
|
protected final ASNManager asnManager;
|
||||||
|
|
@ -83,6 +83,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
protected LocationStorageManager locationStorageManager;
|
protected LocationStorageManager locationStorageManager;
|
||||||
protected final AgvTaskManager agvTaskManager;
|
protected final AgvTaskManager agvTaskManager;
|
||||||
protected final MoveDocManager moveDocManager;
|
protected final MoveDocManager moveDocManager;
|
||||||
|
private static Logger logger = Logger.getLogger(DefaultInterfaceRespManager.class);
|
||||||
public DefaultInterfaceRespManager(InterfaceManager interfaceManager,ASNManager asnManager,PickTicketManager pickTicketManager,
|
public DefaultInterfaceRespManager(InterfaceManager interfaceManager,ASNManager asnManager,PickTicketManager pickTicketManager,
|
||||||
BussinessCodeManager manager3,JdbcManager jdbcManager,ItemManager itemManager,InterfaceReqManager interfaceReqManager,
|
BussinessCodeManager manager3,JdbcManager jdbcManager,ItemManager itemManager,InterfaceReqManager interfaceReqManager,
|
||||||
LocationStorageManager locationStorageManager,AgvTaskManager agvTaskManager,MoveDocManager moveDocManager) {
|
LocationStorageManager locationStorageManager,AgvTaskManager agvTaskManager,MoveDocManager moveDocManager) {
|
||||||
|
|
@ -218,7 +219,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
JSONArray pickTickets=json.getJSONArray("header");
|
JSONArray pickTickets=json.getJSONArray("header");
|
||||||
for(int j=0;j<pickTickets.size();j++){
|
for(int j=0;j<pickTickets.size();j++){
|
||||||
JSONObject pickTicket=pickTickets.getJSONObject(j);
|
JSONObject pickTicket=pickTickets.getJSONObject(j);
|
||||||
System.out.println(pickTicket);
|
logger.info(pickTicket);
|
||||||
String strBill1=pickTicket.has("TKAL1") ? pickTicket.getString("TKAL1") : ""; //Task Alias(SAP task number)
|
String strBill1=pickTicket.has("TKAL1") ? pickTicket.getString("TKAL1") : ""; //Task Alias(SAP task number)
|
||||||
log.setReference(strBill1);
|
log.setReference(strBill1);
|
||||||
log.setFunction(strBill1);
|
log.setFunction(strBill1);
|
||||||
|
|
@ -453,7 +454,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
PickTicket pTicket=null;
|
PickTicket pTicket=null;
|
||||||
for(int j=0;j<pickTickets.size();j++){
|
for(int j=0;j<pickTickets.size();j++){
|
||||||
JSONObject pickTicket=pickTickets.getJSONObject(j);
|
JSONObject pickTicket=pickTickets.getJSONObject(j);
|
||||||
System.out.println(pickTicket);
|
logger.info(pickTicket);
|
||||||
String strBill1=pickTicket.has("TKAL1") ? pickTicket.getString("TKAL1") : ""; //Task Alias(SAP task number)
|
String strBill1=pickTicket.has("TKAL1") ? pickTicket.getString("TKAL1") : ""; //Task Alias(SAP task number)
|
||||||
String sourceId=pickTicket.has("TKIT1") ? pickTicket.getString("TKIT1") : ""; //Task item(Task item号5位流水号+2位版本号)
|
String sourceId=pickTicket.has("TKIT1") ? pickTicket.getString("TKIT1") : ""; //Task item(Task item号5位流水号+2位版本号)
|
||||||
String TKPRN=pickTicket.has("TKPRN") ? pickTicket.getString("TKPRN") : ""; //优先级 U最高级 H加急
|
String TKPRN=pickTicket.has("TKPRN") ? pickTicket.getString("TKPRN") : ""; //优先级 U最高级 H加急
|
||||||
|
|
@ -688,7 +689,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
JSONArray jsonDate =json.getJSONArray("header");
|
JSONArray jsonDate =json.getJSONArray("header");
|
||||||
for( int i=0;i<jsonDate.size();i++ ) {
|
for( int i=0;i<jsonDate.size();i++ ) {
|
||||||
JSONObject pickTicket=jsonDate.getJSONObject(i);
|
JSONObject pickTicket=jsonDate.getJSONObject(i);
|
||||||
System.out.println(pickTicket);
|
logger.info(pickTicket);
|
||||||
String btCode="CPUTPTC";
|
String btCode="CPUTPTC";
|
||||||
String sourceId=pickTicket.has("ZTKALI") ? pickTicket.getString("ZTKALI") : ""; //任务号
|
String sourceId=pickTicket.has("ZTKALI") ? pickTicket.getString("ZTKALI") : ""; //任务号
|
||||||
|
|
||||||
|
|
@ -858,7 +859,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
List<BillType> billTypes=commonDao.findByQuery(" from BillType bt where bt.code='"+billTypess+"'");//单据类型查询
|
List<BillType> billTypes=commonDao.findByQuery(" from BillType bt where bt.code='"+billTypess+"'");//单据类型查询
|
||||||
for(int j=0;j<pickTickets.size();j++){
|
for(int j=0;j<pickTickets.size();j++){
|
||||||
JSONObject pickTicket=pickTickets.getJSONObject(j);
|
JSONObject pickTicket=pickTickets.getJSONObject(j);
|
||||||
System.out.println(pickTicket);
|
logger.info(pickTicket);
|
||||||
String RQORD=pickTicket.has("TAALS") ? pickTicket.getString("TAALS") : ""; //工单号(任务号)
|
String RQORD=pickTicket.has("TAALS") ? pickTicket.getString("TAALS") : ""; //工单号(任务号)
|
||||||
String workerName4=pickTicket.has("KUNNR") ? pickTicket.getString("KUNNR") : ""; //需求者(客户编号)
|
String workerName4=pickTicket.has("KUNNR") ? pickTicket.getString("KUNNR") : ""; //需求者(客户编号)
|
||||||
String relatedBill1=pickTicket.has("SERNR") ? pickTicket.getString("SERNR") : ""; //序列号(项目ID)(机台号)
|
String relatedBill1=pickTicket.has("SERNR") ? pickTicket.getString("SERNR") : ""; //序列号(项目ID)(机台号)
|
||||||
|
|
@ -984,7 +985,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
JSONArray jsonDate =json.getJSONArray("header");
|
JSONArray jsonDate =json.getJSONArray("header");
|
||||||
for( int i=0;i<jsonDate.size();i++ ) {
|
for( int i=0;i<jsonDate.size();i++ ) {
|
||||||
JSONObject pickTicket=jsonDate.getJSONObject(i);
|
JSONObject pickTicket=jsonDate.getJSONObject(i);
|
||||||
System.out.println(pickTicket);
|
logger.info(pickTicket);
|
||||||
String btCode="QPUTPTC";
|
String btCode="QPUTPTC";
|
||||||
String sourceId=pickTicket.has("ZTKALI") ? pickTicket.getString("ZTKALI") : ""; //任务号
|
String sourceId=pickTicket.has("ZTKALI") ? pickTicket.getString("ZTKALI") : ""; //任务号
|
||||||
|
|
||||||
|
|
@ -1179,7 +1180,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
List<BillType> billTypes=commonDao.findByQuery(" from BillType bt where bt.code='"+billType+"'");//单据类型查询
|
List<BillType> billTypes=commonDao.findByQuery(" from BillType bt where bt.code='"+billType+"'");//单据类型查询
|
||||||
for(int j=0;j<jsonArray.size();j++){//循环报文数据
|
for(int j=0;j<jsonArray.size();j++){//循环报文数据
|
||||||
JSONObject asn=JSONObject.fromObject(jsonArray.get(j));//根据报文获取数据赋值给asn
|
JSONObject asn=JSONObject.fromObject(jsonArray.get(j));//根据报文获取数据赋值给asn
|
||||||
System.out.println(asn);//输出数据
|
logger.info(asn);//输出数据
|
||||||
String PO=asn.has("TAALS") ? asn.getString("TAALS") : ""; //入库序号(任务号)
|
String PO=asn.has("TAALS") ? asn.getString("TAALS") : ""; //入库序号(任务号)
|
||||||
log.setFunction(PO);
|
log.setFunction(PO);
|
||||||
String strBill7=asn.has("MBLNR") ? asn.getString("MBLNR") : ""; //凭证号
|
String strBill7=asn.has("MBLNR") ? asn.getString("MBLNR") : ""; //凭证号
|
||||||
|
|
@ -1531,7 +1532,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
if(returnCode.equals("200")) {
|
if(returnCode.equals("200")) {
|
||||||
for (int i = 0; i < jsonArray.size(); i++) {
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
JSONObject JSONobj=JSONObject.fromObject(jsonArray.get(i));
|
JSONObject JSONobj=JSONObject.fromObject(jsonArray.get(i));
|
||||||
System.out.println(JSONobj);
|
logger.info(JSONobj);
|
||||||
String invId=JSONobj.has("invId")? JSONobj.getString("invId"):"";//任务号
|
String invId=JSONobj.has("invId")? JSONobj.getString("invId"):"";//任务号
|
||||||
double expectedQuantity=JSONobj.has("quantity")? JSONobj.getDouble("quantity"):0;//出库数量
|
double expectedQuantity=JSONobj.has("quantity")? JSONobj.getDouble("quantity"):0;//出库数量
|
||||||
String itemCode=JSONobj.has("itemCode")? JSONobj.getString("itemCode"):"";//货品(物料料号)(物料描述)
|
String itemCode=JSONobj.has("itemCode")? JSONobj.getString("itemCode"):"";//货品(物料料号)(物料描述)
|
||||||
|
|
@ -1643,7 +1644,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
List<BillType> billTypes=commonDao.findByQuery(" from BillType bt where bt.code='"+billType+"'");
|
List<BillType> billTypes=commonDao.findByQuery(" from BillType bt where bt.code='"+billType+"'");
|
||||||
JSONObject objectItem=new JSONObject();
|
JSONObject objectItem=new JSONObject();
|
||||||
JSONObject asn=JSONObject.fromObject(jsonArray.get(j));
|
JSONObject asn=JSONObject.fromObject(jsonArray.get(j));
|
||||||
// System.out.println(asn);
|
// logger.info(asn);
|
||||||
// String billType="";
|
// String billType="";
|
||||||
String PO=asn.has("sourceId") ? asn.getString("sourceId") : ""; //入库序号
|
String PO=asn.has("sourceId") ? asn.getString("sourceId") : ""; //入库序号
|
||||||
int lineNo=asn.has("lineNo") ? asn.getInt("lineNo") : 0; //行号
|
int lineNo=asn.has("lineNo") ? asn.getInt("lineNo") : 0; //行号
|
||||||
|
|
@ -1725,7 +1726,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
List<BillType> billTypes=commonDao.findByQuery(" from BillType bt where bt.code='"+billType+"'");
|
List<BillType> billTypes=commonDao.findByQuery(" from BillType bt where bt.code='"+billType+"'");
|
||||||
JSONObject objectItem=new JSONObject();
|
JSONObject objectItem=new JSONObject();
|
||||||
JSONObject asn=JSONObject.fromObject(jsonArray.get(j));
|
JSONObject asn=JSONObject.fromObject(jsonArray.get(j));
|
||||||
// System.out.println(asn);
|
// logger.info(asn);
|
||||||
// String billType="";
|
// String billType="";
|
||||||
String PO=asn.has("sourceId") ? asn.getString("sourceId") : ""; //入库序号
|
String PO=asn.has("sourceId") ? asn.getString("sourceId") : ""; //入库序号
|
||||||
|
|
||||||
|
|
@ -2209,6 +2210,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
}else {
|
}else {
|
||||||
asnDetail.setExpectedQuantity(expectedQuantity);
|
asnDetail.setExpectedQuantity(expectedQuantity);
|
||||||
}
|
}
|
||||||
|
|
||||||
asnDetail.setItem(items.get(0));
|
asnDetail.setItem(items.get(0));
|
||||||
asnDetail.setStrBill2(strBill2);
|
asnDetail.setStrBill2(strBill2);
|
||||||
// asnDetail.setStrBill1(strBill1);
|
// asnDetail.setStrBill1(strBill1);
|
||||||
|
|
@ -2267,7 +2269,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
List<BillType> billTypes=commonDao.findByQuery(" from BillType bt where bt.code='"+billType+"'");
|
List<BillType> billTypes=commonDao.findByQuery(" from BillType bt where bt.code='"+billType+"'");
|
||||||
JSONObject objectItem=new JSONObject();
|
JSONObject objectItem=new JSONObject();
|
||||||
JSONObject asn=JSONObject.fromObject(jsonArray.get(j));
|
JSONObject asn=JSONObject.fromObject(jsonArray.get(j));
|
||||||
System.out.println(asn);
|
logger.info(asn);
|
||||||
// String billType="";
|
// String billType="";
|
||||||
log.setFunction("盘点差异");
|
log.setFunction("盘点差异");
|
||||||
String MATNR=asn.has("MATNR") ? asn.getString("MATNR") : ""; //物料号
|
String MATNR=asn.has("MATNR") ? asn.getString("MATNR") : ""; //物料号
|
||||||
|
|
@ -2360,7 +2362,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
CountPlan countPlan=null;
|
CountPlan countPlan=null;
|
||||||
for(int j=0;j<json.getJSONArray("header").size();j++){
|
for(int j=0;j<json.getJSONArray("header").size();j++){
|
||||||
JSONObject pickTicket=json.getJSONArray("header").getJSONObject(j);
|
JSONObject pickTicket=json.getJSONArray("header").getJSONObject(j);
|
||||||
System.out.println(pickTicket);
|
logger.info(pickTicket);
|
||||||
String mdCode=pickTicket.has("ZTKALI") ? pickTicket.getString("ZTKALI") : ""; //任务号
|
String mdCode=pickTicket.has("ZTKALI") ? pickTicket.getString("ZTKALI") : ""; //任务号
|
||||||
log.setFunction(mdCode);
|
log.setFunction(mdCode);
|
||||||
String SOI=pickTicket.has("ZITEM") ? pickTicket.getString("ZITEM") : ""; //任务项次号
|
String SOI=pickTicket.has("ZITEM") ? pickTicket.getString("ZITEM") : ""; //任务项次号
|
||||||
|
|
@ -2507,9 +2509,9 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
JSONArray JSONA=json.getJSONArray("header");
|
JSONArray JSONA=json.getJSONArray("header");
|
||||||
for(int j=0;j<JSONA.size();j++){
|
for(int j=0;j<JSONA.size();j++){
|
||||||
JSONObject pickTicket=JSONA.getJSONObject(j);
|
JSONObject pickTicket=JSONA.getJSONObject(j);
|
||||||
System.out.println(pickTicket);
|
logger.info(pickTicket);
|
||||||
String mdCode=pickTicket.has("ZTKALI") ? pickTicket.getString("ZTKALI") : ""; //任务号
|
String mdCode=pickTicket.has("ZTKALI") ? pickTicket.getString("ZTKALI") : ""; //任务号
|
||||||
|
log.setFunction(mdCode);
|
||||||
String SOI=pickTicket.has("ZTALIN") ? pickTicket.getString("ZTALIN") : ""; //任务项次号
|
String SOI=pickTicket.has("ZTALIN") ? pickTicket.getString("ZTALIN") : ""; //任务项次号
|
||||||
String strBill10=pickTicket.has("ZBPNUM") ? pickTicket.getString("ZBPNUM") : ""; //序列号顺序
|
String strBill10=pickTicket.has("ZBPNUM") ? pickTicket.getString("ZBPNUM") : ""; //序列号顺序
|
||||||
String workerName4=pickTicket.has("ERNAM") ? pickTicket.getString("ERNAM") : ""; //需求者
|
String workerName4=pickTicket.has("ERNAM") ? pickTicket.getString("ERNAM") : ""; //需求者
|
||||||
|
|
@ -2533,7 +2535,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
String TEXT3=pickTicket.has("TEXT3") ? pickTicket.getString("TEXT3") : ""; //备注
|
String TEXT3=pickTicket.has("TEXT3") ? pickTicket.getString("TEXT3") : ""; //备注
|
||||||
String POTX2=pickTicket.has("POTX2") ? pickTicket.getString("POTX2") : ""; //申请人
|
String POTX2=pickTicket.has("POTX2") ? pickTicket.getString("POTX2") : ""; //申请人
|
||||||
String TEXT2=pickTicket.has("TEXT2") ? pickTicket.getString("TEXT2") : ""; //申请号
|
String TEXT2=pickTicket.has("TEXT2") ? pickTicket.getString("TEXT2") : ""; //申请号
|
||||||
log.setFunction(mdCode+RSNUM);
|
|
||||||
Long longExtend1= Long.parseLong(pickTicket.has("ZEILE") ? pickTicket.getString("ZEILE") : "0"); //凭证项次号
|
Long longExtend1= Long.parseLong(pickTicket.has("ZEILE") ? pickTicket.getString("ZEILE") : "0"); //凭证项次号
|
||||||
String DATUM=pickTicket.has("DATUM") ? pickTicket.getString("DATUM") : "2022-12-31"; //日期 年-月-日
|
String DATUM=pickTicket.has("DATUM") ? pickTicket.getString("DATUM") : "2022-12-31"; //日期 年-月-日
|
||||||
String UZEIT=pickTicket.has("UZEIT") ? pickTicket.getString("UZEIT") : "00:00:00"; //时间 时:分:秒
|
String UZEIT=pickTicket.has("UZEIT") ? pickTicket.getString("UZEIT") : "00:00:00"; //时间 时:分:秒
|
||||||
|
|
@ -2684,9 +2686,9 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
if (status.equals("20402")||status.equals("20103")) {
|
if (status.equals("20402")||status.equals("20103")) {
|
||||||
//返库
|
//返库
|
||||||
//更新AgvTask任务
|
//更新AgvTask任务
|
||||||
// System.out.println(taskCode+"打印2"+work);
|
// logger.info(taskCode+"打印2"+work);
|
||||||
List<AgvTask> agvTasks = commonDao.findByQuery(" from AgvTask agvTask where agvTask.robotJobId='"+taskCode+"' or agvTask.robotJobId='A"+taskCode+"'");
|
List<AgvTask> agvTasks = commonDao.findByQuery(" from AgvTask agvTask where agvTask.robotJobId='"+taskCode+"' or agvTask.robotJobId='A"+taskCode+"'");
|
||||||
// System.out.println("打印3--"+agvTasks.size());
|
// logger.info("打印3--"+agvTasks.size());
|
||||||
if (agvTasks.size()>0) {
|
if (agvTasks.size()>0) {
|
||||||
|
|
||||||
AgvTask agvTask=agvTasks.get(0);
|
AgvTask agvTask=agvTasks.get(0);
|
||||||
|
|
@ -2709,7 +2711,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
agvTask.setStationCode(locationStorage.get(0).getGzzCode());
|
agvTask.setStationCode(locationStorage.get(0).getGzzCode());
|
||||||
commonDao.store(agvTask);
|
commonDao.store(agvTask);
|
||||||
}
|
}
|
||||||
// System.out.println("打印3"+agvTask.getRobotJobId());
|
// logger.info("打印3"+agvTask.getRobotJobId());
|
||||||
//判断接驳口状态是否可用
|
//判断接驳口状态是否可用
|
||||||
// if(WcsCSDCode.getWmsJbkCode1(WcsCSDCode.getWmsCSDCode(work))) {
|
// if(WcsCSDCode.getWmsJbkCode1(WcsCSDCode.getWmsCSDCode(work))) {
|
||||||
string = interfaceReqManager.sendAgvTask(agvTask)+"";
|
string = interfaceReqManager.sendAgvTask(agvTask)+"";
|
||||||
|
|
@ -2757,7 +2759,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
String msg="";
|
String msg="";
|
||||||
for(int j=0;j<jsonArray.size();j++){
|
for(int j=0;j<jsonArray.size();j++){
|
||||||
JSONObject it=JSONObject.fromObject(jsonArray.get(j));
|
JSONObject it=JSONObject.fromObject(jsonArray.get(j));
|
||||||
System.out.println(it);
|
logger.info(it);
|
||||||
String MATNR=it.has("MATNR") ? it.getString("MATNR") : ""; //物料号
|
String MATNR=it.has("MATNR") ? it.getString("MATNR") : ""; //物料号
|
||||||
String WERKS=it.has("WERKS") ? it.getString("WERKS") : ""; //工厂
|
String WERKS=it.has("WERKS") ? it.getString("WERKS") : ""; //工厂
|
||||||
String LGORT=it.has("LGORT") ? it.getString("LGORT") : ""; //库存地
|
String LGORT=it.has("LGORT") ? it.getString("LGORT") : ""; //库存地
|
||||||
|
|
@ -2929,7 +2931,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
if(jsonArray.size()>0) {
|
if(jsonArray.size()>0) {
|
||||||
for(int j=0;j<jsonArray.size();j++){
|
for(int j=0;j<jsonArray.size();j++){
|
||||||
JSONObject it=JSONObject.fromObject(jsonArray.get(j));
|
JSONObject it=JSONObject.fromObject(jsonArray.get(j));
|
||||||
System.out.println(it);
|
logger.info(it);
|
||||||
String invId=it.has("invId") ? it.getString("invId") : ""; //库存序号
|
String invId=it.has("invId") ? it.getString("invId") : ""; //库存序号
|
||||||
String itemCode=it.has("itemCode") ? it.getString("itemCode") : ""; //料号
|
String itemCode=it.has("itemCode") ? it.getString("itemCode") : ""; //料号
|
||||||
log.setFunction("OA库存调整"+invId);
|
log.setFunction("OA库存调整"+invId);
|
||||||
|
|
@ -2992,7 +2994,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
String msg="";
|
String msg="";
|
||||||
for(int j=0;j<jsonArray.size();j++){
|
for(int j=0;j<jsonArray.size();j++){
|
||||||
JSONObject it=JSONObject.fromObject(jsonArray.get(j));
|
JSONObject it=JSONObject.fromObject(jsonArray.get(j));
|
||||||
System.out.println(it);
|
logger.info(it);
|
||||||
String applicant=it.has("applicant") ? it.getString("applicant") : ""; //申请人
|
String applicant=it.has("applicant") ? it.getString("applicant") : ""; //申请人
|
||||||
String applicantName=it.has("applicantName") ? it.getString("applicantName") : ""; //申请人名称
|
String applicantName=it.has("applicantName") ? it.getString("applicantName") : ""; //申请人名称
|
||||||
String dept=it.has("dept") ? it.getString("dept") : ""; //部门
|
String dept=it.has("dept") ? it.getString("dept") : ""; //部门
|
||||||
|
|
@ -3414,7 +3416,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
||||||
ASN asndb=null;
|
ASN asndb=null;
|
||||||
for (int i = 0; i < jsonArray.size(); i++) {
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
JSONObject asn=JSONObject.fromObject(jsonArray.get(i));
|
JSONObject asn=JSONObject.fromObject(jsonArray.get(i));
|
||||||
System.out.println(asn);
|
logger.info(asn);
|
||||||
String jodNumber=asn.has("jodNumber")? asn.getString("jodNumber"):"";//工号
|
String jodNumber=asn.has("jodNumber")? asn.getString("jodNumber"):"";//工号
|
||||||
String name=asn.has("name")? asn.getString("name"):"";//姓名
|
String name=asn.has("name")? asn.getString("name"):"";//姓名
|
||||||
String dept=asn.has("dept")? asn.getString("dept"):"";//部门
|
String dept=asn.has("dept")? asn.getString("dept"):"";//部门
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ import com.dev.swms.server.utils.StringUtil;
|
||||||
import com.dev.swms.server.utils.TimeNumberUtils;
|
import com.dev.swms.server.utils.TimeNumberUtils;
|
||||||
import com.dev.swms.server.utils.interfaceUtil;
|
import com.dev.swms.server.utils.interfaceUtil;
|
||||||
import com.dev.swms.server.web.filter.WarehouseHolder;
|
import com.dev.swms.server.web.filter.WarehouseHolder;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public class DefaultQueryAppManager extends DefaultBaseManager implements QueryAppManager {
|
public class DefaultQueryAppManager extends DefaultBaseManager implements QueryAppManager {
|
||||||
protected final CarLoadManager carLoadManager;
|
protected final CarLoadManager carLoadManager;
|
||||||
|
|
@ -116,6 +116,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
protected final InventoryManager inventoryManager;
|
protected final InventoryManager inventoryManager;
|
||||||
protected final WorkerManager workerManager;
|
protected final WorkerManager workerManager;
|
||||||
protected final ItemJobLauncher itemJobLauncher;
|
protected final ItemJobLauncher itemJobLauncher;
|
||||||
|
private static Logger logger = Logger.getLogger(DefaultQueryAppManager.class);
|
||||||
public DefaultQueryAppManager(CarLoadManager carLoadManager,StockManager stockManager,AgvTaskManager agvTaskManager,JdbcManager jdbcManager,MoveDocManager moveDocManager,LocationManager locationManager,
|
public DefaultQueryAppManager(CarLoadManager carLoadManager,StockManager stockManager,AgvTaskManager agvTaskManager,JdbcManager jdbcManager,MoveDocManager moveDocManager,LocationManager locationManager,
|
||||||
PickTicketManager pickTicketManager,AutoAllocator autoAllocator,InterfaceReqManager interfaceReqManager,WorkerManager workerManager,InventoryManager inventoryManager,ItemJobLauncher itemJobLauncher) {
|
PickTicketManager pickTicketManager,AutoAllocator autoAllocator,InterfaceReqManager interfaceReqManager,WorkerManager workerManager,InventoryManager inventoryManager,ItemJobLauncher itemJobLauncher) {
|
||||||
super();
|
super();
|
||||||
|
|
@ -221,6 +222,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
|
|
||||||
sql+= " and ((ad.ftl_qty=0 and ad.EXPECTED_QUANTITY>ad.RECEIVED_QUANTITY) or (ad.ftl_qty>0 and ad.ftl_qty>ad.RECEIVED_QUANTITY)) "
|
sql+= " and ((ad.ftl_qty=0 and ad.EXPECTED_QUANTITY>ad.RECEIVED_QUANTITY) or (ad.ftl_qty>0 and ad.ftl_qty>ad.RECEIVED_QUANTITY)) "
|
||||||
+ " order by ad.strBill8,item.code";
|
+ " order by ad.strBill8,item.code";
|
||||||
|
// logger.info(sql);
|
||||||
Query query = session.createSQLQuery(sql);
|
Query query = session.createSQLQuery(sql);
|
||||||
List<Object[]> list= (List<Object[]>)query.list();
|
List<Object[]> list= (List<Object[]>)query.list();
|
||||||
String sql1=" select ad.id,asn.code,ad.be_quality from ASN_DETAIL ad "
|
String sql1=" select ad.id,asn.code,ad.be_quality from ASN_DETAIL ad "
|
||||||
|
|
@ -236,6 +238,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
List<Object[]> asnds=(List<Object[]>)query1.list();
|
List<Object[]> asnds=(List<Object[]>)query1.list();
|
||||||
|
|
||||||
String sql2=sql1+" and ad.EXPECTED_QUANTITY=ad.RECEIVED_QUANTITY ";
|
String sql2=sql1+" and ad.EXPECTED_QUANTITY=ad.RECEIVED_QUANTITY ";
|
||||||
|
// logger.info(sql2);
|
||||||
//整理完成
|
//整理完成
|
||||||
Query query2 = session.createSQLQuery(sql2);
|
Query query2 = session.createSQLQuery(sql2);
|
||||||
List<Object[]> asds=(List<Object[]>)query2.list();
|
List<Object[]> asds=(List<Object[]>)query2.list();
|
||||||
|
|
@ -254,7 +257,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
obj.put("strBill7", arrier[i++]==null?"":arrier[i-1]);//行号
|
obj.put("strBill7", arrier[i++]==null?"":arrier[i-1]);//行号
|
||||||
obj.put("propC5", arrier[i++]==null?"":arrier[i-1]);
|
obj.put("propC5", arrier[i++]==null?"":arrier[i-1]);
|
||||||
obj.put("propC2", arrier[i++]==null?"":arrier[i-1]);
|
obj.put("propC2", arrier[i++]==null?"":arrier[i-1]);
|
||||||
// System.out.println(arrier[8].toString()+"----");
|
// logger.info(arrier[8].toString()+"----");
|
||||||
if(itemcode!=null&&!itemcode.equals("")) {
|
if(itemcode!=null&&!itemcode.equals("")) {
|
||||||
if(arrier[8]!=null&&arrier[8].toString().length()>0) {
|
if(arrier[8]!=null&&arrier[8].toString().length()>0) {
|
||||||
|
|
||||||
|
|
@ -1101,7 +1104,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
// sql+=" and (upper(md.RELATEBILLCODE) like upper('%"+ asn_code + "%') or upper(s.LP) like upper('%"+ asn_code +"%'))";
|
// sql+=" and (upper(md.RELATEBILLCODE) like upper('%"+ asn_code + "%') or upper(s.LP) like upper('%"+ asn_code +"%'))";
|
||||||
// }
|
// }
|
||||||
sql+=" order by mdd.ID ";
|
sql+=" order by mdd.ID ";
|
||||||
// System.out.println(sql);
|
logger.info(sql);
|
||||||
Query query = session.createSQLQuery(sql);
|
Query query = session.createSQLQuery(sql);
|
||||||
List<Object[]> list= (List<Object[]>)query.list();
|
List<Object[]> list= (List<Object[]>)query.list();
|
||||||
if(list.size()>0){
|
if(list.size()>0){
|
||||||
|
|
@ -1242,7 +1245,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
if(moveDocDetail.getStrBill11()!=null&&moveDocDetail.getStrBill11().equals("1")) {
|
if(moveDocDetail.getStrBill11()!=null&&moveDocDetail.getStrBill11().equals("1")) {
|
||||||
msg="加急料号"+item.getCode()+",需要出库";
|
msg="加急料号"+item.getCode()+",需要出库";
|
||||||
}
|
}
|
||||||
// System.out.println(moveDocDetail.getStrBill11());
|
// logger.info(moveDocDetail.getStrBill11());
|
||||||
data1.put("beMarkWeight", beMarkWeight);
|
data1.put("beMarkWeight", beMarkWeight);
|
||||||
array.add(data1);
|
array.add(data1);
|
||||||
}
|
}
|
||||||
|
|
@ -1343,7 +1346,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
sql+=" and z.id = "+zoneId;
|
sql+=" and z.id = "+zoneId;
|
||||||
}
|
}
|
||||||
sql+=" group by md.RELATEBILLCODE,z.name,s.LP order by mdd.ID ";
|
sql+=" group by md.RELATEBILLCODE,z.name,s.LP order by mdd.ID ";
|
||||||
// System.out.println(sql);
|
logger.info(sql);
|
||||||
Query query = session.createSQLQuery(sql);
|
Query query = session.createSQLQuery(sql);
|
||||||
List<Object[]> list= (List<Object[]>)query.list();
|
List<Object[]> list= (List<Object[]>)query.list();
|
||||||
if(list.size()>0){
|
if(list.size()>0){
|
||||||
|
|
@ -1507,7 +1510,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
long etime1 = System.currentTimeMillis();
|
long etime1 = System.currentTimeMillis();
|
||||||
System.out.printf(bigTask.getCode()+"亮灯时长:"+(etime1 - stime1));
|
logger.infof(bigTask.getCode()+"亮灯时长:"+(etime1 - stime1));
|
||||||
}
|
}
|
||||||
taskids = sb.substring(0,sb.length()-1).toString();
|
taskids = sb.substring(0,sb.length()-1).toString();
|
||||||
|
|
||||||
|
|
@ -1555,7 +1558,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
data = array.toString();
|
data = array.toString();
|
||||||
status = "1";
|
status = "1";
|
||||||
long etime2 = System.currentTimeMillis();
|
long etime2 = System.currentTimeMillis();
|
||||||
System.out.printf("料箱列表显示时长:"+(etime2 - stime2));
|
logger.infof("料箱列表显示时长:"+(etime2 - stime2));
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
msg = "找不到相应记录!";
|
msg = "找不到相应记录!";
|
||||||
|
|
@ -1632,7 +1635,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
long etime1 = System.currentTimeMillis();
|
long etime1 = System.currentTimeMillis();
|
||||||
// System.out.printf(agvTask.getRobotJobId()+"亮灯时长:"+(etime1 - stime1)+"\n");
|
logger.info(agvTask.getRobotJobId()+"亮灯时长:"+(etime1 - stime1)+"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
agvid = sb.substring(0,sb.length()-1).toString();
|
agvid = sb.substring(0,sb.length()-1).toString();
|
||||||
|
|
@ -1680,7 +1683,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
long etime2 = System.currentTimeMillis();
|
long etime2 = System.currentTimeMillis();
|
||||||
// System.out.printf("料箱列表显示时长:"+(etime2 - stime2)+"\n");
|
logger.info("料箱列表显示时长:"+(etime2 - stime2)+"\n");
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
msg = "locode参数错误或为空!";
|
msg = "locode参数错误或为空!";
|
||||||
|
|
@ -3794,7 +3797,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
msg+=",加急单";
|
msg+=",加急单";
|
||||||
data1.put("zoneName", zoneCode);
|
data1.put("zoneName", zoneCode);
|
||||||
}
|
}
|
||||||
// System.out.println(":"+jsondata1);
|
logger.info(":"+jsondata1);
|
||||||
obj.put("data1", jsondata1);
|
obj.put("data1", jsondata1);
|
||||||
status = "1";
|
status = "1";
|
||||||
}
|
}
|
||||||
|
|
@ -5446,7 +5449,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
}else{
|
}else{
|
||||||
xlh=strBill2;
|
xlh=strBill2;
|
||||||
}
|
}
|
||||||
// System.out.println("料号="+item_code+" ,序列号="+xlh);
|
logger.info("料号="+item_code+" ,序列号="+xlh);
|
||||||
|
|
||||||
String sql=" from ASNDetail ad where ad.item.code='"+item_code+"' and ad.strBill2='"+xlh+"' ";
|
String sql=" from ASNDetail ad where ad.item.code='"+item_code+"' and ad.strBill2='"+xlh+"' ";
|
||||||
List<ASNDetail> ASNDetails = commonDao.findByQuery(sql);
|
List<ASNDetail> ASNDetails = commonDao.findByQuery(sql);
|
||||||
|
|
@ -5876,7 +5879,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
}
|
}
|
||||||
|
|
||||||
sql+=" order by mdd.ID ";
|
sql+=" order by mdd.ID ";
|
||||||
// System.out.println(sql);
|
logger.info(sql);
|
||||||
Query query = session.createSQLQuery(sql);
|
Query query = session.createSQLQuery(sql);
|
||||||
List<Object[]> list= (List<Object[]>)query.list();
|
List<Object[]> list= (List<Object[]>)query.list();
|
||||||
|
|
||||||
|
|
@ -5995,7 +5998,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
|
|
||||||
if (userId > 0) {
|
if (userId > 0) {
|
||||||
if (warehouseId > 0) {
|
if (warehouseId > 0) {
|
||||||
// System.out.println("PC货架上架完成返库:DefaultQueryAppManager:submitAndPcStockPutHJ");
|
logger.info("PC货架上架完成返库:DefaultQueryAppManager:submitAndPcStockPutHJ");
|
||||||
List<Location> locs=commonDao.findByQuery(" from Location l where l.code='"+stockCode+"' and l.disabled=0 ");
|
List<Location> locs=commonDao.findByQuery(" from Location l where l.code='"+stockCode+"' and l.disabled=0 ");
|
||||||
if(locs.size()>0) {
|
if(locs.size()>0) {
|
||||||
Location loc=locs.get(0);
|
Location loc=locs.get(0);
|
||||||
|
|
@ -6009,7 +6012,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
ag.setType("货架返库");
|
ag.setType("货架返库");
|
||||||
commonDao.store(ag);
|
commonDao.store(ag);
|
||||||
boolean bo= interfaceReqManager.sendAgvTask(ag);
|
boolean bo= interfaceReqManager.sendAgvTask(ag);
|
||||||
// System.out.println(bo+"--"+ag.getClassification()+"--"+ag.getCode());
|
logger.info(bo+"--"+ag.getClassification()+"--"+ag.getCode());
|
||||||
if(bo&&ag.getClassification().equals("盘点")&&ag.getCode()!=null) {
|
if(bo&&ag.getClassification().equals("盘点")&&ag.getCode()!=null) {
|
||||||
pickTicketManager.quercountPlan(ag, userId);
|
pickTicketManager.quercountPlan(ag, userId);
|
||||||
}
|
}
|
||||||
|
|
@ -6022,7 +6025,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
System.out.println("无agvTask 任务");
|
logger.info("无agvTask 任务");
|
||||||
}
|
}
|
||||||
|
|
||||||
status="1";
|
status="1";
|
||||||
|
|
@ -6260,7 +6263,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
List<Double> invqty= commonDao.findByQuery(sql2);
|
List<Double> invqty= commonDao.findByQuery(sql2);
|
||||||
if(invqty.size()>0) {
|
if(invqty.size()>0) {
|
||||||
tqty=invqty.get(0);
|
tqty=invqty.get(0);
|
||||||
// System.out.println("灯数量"+tqty);
|
logger.info("灯数量"+tqty);
|
||||||
}
|
}
|
||||||
InterWMStask iwt=InterWMStasks.get(i);
|
InterWMStask iwt=InterWMStasks.get(i);
|
||||||
iwt.setQuant((int)tqty);
|
iwt.setQuant((int)tqty);
|
||||||
|
|
@ -6796,7 +6799,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
List<Double> invqty= commonDao.findByQuery(sql2);
|
List<Double> invqty= commonDao.findByQuery(sql2);
|
||||||
if(invqty.size()>0) {
|
if(invqty.size()>0) {
|
||||||
tqty=invqty.get(0);
|
tqty=invqty.get(0);
|
||||||
// System.out.println("打印数量"+tqty);
|
logger.info("打印数量"+tqty);
|
||||||
}
|
}
|
||||||
//打印拣货标签
|
//打印拣货标签
|
||||||
submitPrintTask( userId, number, mac, lsCode, t , ptd, pt,
|
submitPrintTask( userId, number, mac, lsCode, t , ptd, pt,
|
||||||
|
|
@ -7051,7 +7054,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
// }else {
|
// }else {
|
||||||
barcode+="/"+ymd.format(new Date());
|
barcode+="/"+ymd.format(new Date());
|
||||||
// }
|
// }
|
||||||
// System.out.println(barcode);
|
logger.info(barcode);
|
||||||
String emergent="";
|
String emergent="";
|
||||||
if(pt!=null&&bt.getName().indexOf("工单")>=0&&pt.getEquatedQuantity()!=null
|
if(pt!=null&&bt.getName().indexOf("工单")>=0&&pt.getEquatedQuantity()!=null
|
||||||
&&(pt.getEquatedQuantity().equals("H")||pt.getEquatedQuantity().equals("U")
|
&&(pt.getEquatedQuantity().equals("H")||pt.getEquatedQuantity().equals("U")
|
||||||
|
|
@ -7338,7 +7341,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
String countCode=taskcode.replace(",","','");
|
String countCode=taskcode.replace(",","','");
|
||||||
sql+=" and t.countCode in('"+countCode+"') ";
|
sql+=" and t.countCode in('"+countCode+"') ";
|
||||||
}else {
|
}else {
|
||||||
System.out.println("请选择盘点单号");
|
logger.info("请选择盘点单号");
|
||||||
becount=false;
|
becount=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7432,7 +7435,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
String countCode=taskcode.replace(",","','");
|
String countCode=taskcode.replace(",","','");
|
||||||
sql+=" and cr.count_Code in('"+countCode+"') ";
|
sql+=" and cr.count_Code in('"+countCode+"') ";
|
||||||
}else {
|
}else {
|
||||||
System.out.println("请选择盘点单号");
|
logger.info("请选择盘点单号");
|
||||||
}
|
}
|
||||||
sql+=" group by c.id,cr.count_Code,l.code,l.ID ,cr.NEED_COUNT,i.id,i.code,ik.PROP_C1,ik.PROP_D2,\r\n" +
|
sql+=" group by c.id,cr.count_Code,l.code,l.ID ,cr.NEED_COUNT,i.id,i.code,ik.PROP_C1,ik.PROP_D2,\r\n" +
|
||||||
" i.SINGLE_ITEM,i.BE_MARK_WEIGHT,i.isBOM ";
|
" i.SINGLE_ITEM,i.BE_MARK_WEIGHT,i.isBOM ";
|
||||||
|
|
@ -7893,7 +7896,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
System.out.print("连接失败");
|
logger.info("连接失败");
|
||||||
}finally{
|
}finally{
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
|
|
@ -7973,7 +7976,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
xlh=serial;
|
xlh=serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
// System.out.println("料号="+item_code+" ,序列号="+xlh);
|
// logger.info("料号="+item_code+" ,序列号="+xlh);
|
||||||
String hql=" from Inventory inv where inv.quantity>0 "
|
String hql=" from Inventory inv where inv.quantity>0 "
|
||||||
+ " and inv.itemKey.item.code='"+item_code+"'"
|
+ " and inv.itemKey.item.code='"+item_code+"'"
|
||||||
+ " and inv.status='已入库'"
|
+ " and inv.status='已入库'"
|
||||||
|
|
@ -8980,7 +8983,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
if(zone.getId()==1763) {
|
if(zone.getId()==1763) {
|
||||||
//容器返库3#料箱区
|
//容器返库3#料箱区
|
||||||
if(srcLocation.getStock()!=null) {
|
if(srcLocation.getStock()!=null) {
|
||||||
// System.out.println("容器返库1");
|
// logger.info("容器返库1");
|
||||||
Stock stock= commonDao.load(Stock.class, srcLocation.getStock().getId());
|
Stock stock= commonDao.load(Stock.class, srcLocation.getStock().getId());
|
||||||
List<Task> tsks=commonDao.findByQuery(" from Task t where 1=1 "
|
List<Task> tsks=commonDao.findByQuery(" from Task t where 1=1 "
|
||||||
+ " and t.endRegion='"+t.getEndRegion()+"'"
|
+ " and t.endRegion='"+t.getEndRegion()+"'"
|
||||||
|
|
@ -8994,7 +8997,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
AgvTask agv=commonDao.load(AgvTask.class, t.getAgvTask().getId());
|
AgvTask agv=commonDao.load(AgvTask.class, t.getAgvTask().getId());
|
||||||
if(agv.getStatus().equals("ATPICK")) {
|
if(agv.getStatus().equals("ATPICK")) {
|
||||||
interfaceReqManager.wcsNextPT(agv.getRobotJobId(), s.getLP(), WcsCSDCode.getWcsCSDCode(t.getEndRegion()));
|
interfaceReqManager.wcsNextPT(agv.getRobotJobId(), s.getLP(), WcsCSDCode.getWcsCSDCode(t.getEndRegion()));
|
||||||
// System.out.println("容器返库2");
|
// logger.info("容器返库2");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -9826,7 +9829,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
||||||
}else {
|
}else {
|
||||||
data1.put("t_count", "清点");//q
|
data1.put("t_count", "清点");//q
|
||||||
}
|
}
|
||||||
// System.out.println("-"+arrier[6].toString());
|
// logger.info("-"+arrier[6].toString());
|
||||||
}
|
}
|
||||||
data1.put("lc_code", arrier[7]==null?"":arrier[7]);//地标码
|
data1.put("lc_code", arrier[7]==null?"":arrier[7]);//地标码
|
||||||
String hx=arrier[8]==null?"":arrier[8].toString();//相差分钟
|
String hx=arrier[8]==null?"":arrier[8].toString();//相差分钟
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ import com.dev.energy.server.model.EntityFactory;
|
||||||
import com.dev.energy.server.service.pojo.DefaultBaseManager;
|
import com.dev.energy.server.service.pojo.DefaultBaseManager;
|
||||||
import com.dev.energy.server.util.LocalizedMessage;
|
import com.dev.energy.server.util.LocalizedMessage;
|
||||||
import com.dev.energy.server.web.security.UserHolder;
|
import com.dev.energy.server.web.security.UserHolder;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
/**
|
/**
|
||||||
* @author dev
|
* @author dev
|
||||||
*
|
*
|
||||||
|
|
@ -112,7 +112,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
protected final JdbcManager jdbcManager;
|
protected final JdbcManager jdbcManager;
|
||||||
protected final AgvTaskManager agvTaskManager;
|
protected final AgvTaskManager agvTaskManager;
|
||||||
protected final InterfaceReqManager interfaceReqManager;
|
protected final InterfaceReqManager interfaceReqManager;
|
||||||
|
private static Logger logger = Logger.getLogger(DefaultAutoAllocator.class);
|
||||||
|
|
||||||
|
|
||||||
public DefaultAutoAllocator(ItemManager manager,InventoryManager manager1,
|
public DefaultAutoAllocator(ItemManager manager,InventoryManager manager1,
|
||||||
|
|
@ -295,7 +295,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
//List<Inventory> inventories =sortByRule(tempInventories,moveDocDetail.getItem().getWarehouseItemStorageRule(), pickItemRule,turnOverMode);
|
//List<Inventory> inventories =sortByRule(tempInventories,moveDocDetail.getItem().getWarehouseItemStorageRule(), pickItemRule,turnOverMode);
|
||||||
//tempInventories.clear();
|
//tempInventories.clear();
|
||||||
// for(Inventory inv:inventories){
|
// for(Inventory inv:inventories){
|
||||||
// System.out.println(inv.getId()+"===="+inv.getAvaliableQuantity());
|
// logger.info(inv.getId()+"===="+inv.getAvaliableQuantity());
|
||||||
// }
|
// }
|
||||||
//拣货分配,累加已分配数量
|
//拣货分配,累加已分配数量
|
||||||
totalQty += allocateInventory(inventories, moveDocDetail);
|
totalQty += allocateInventory(inventories, moveDocDetail);
|
||||||
|
|
@ -309,7 +309,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
if((moveDocDetail.getPreAllocatedQuantity()-moveDocDetail.getAllocatedQuantity())<=0){
|
if((moveDocDetail.getPreAllocatedQuantity()-moveDocDetail.getAllocatedQuantity())<=0){
|
||||||
break;
|
break;
|
||||||
}else{
|
}else{
|
||||||
System.out.println(moveDocDetail.getItem()+"===="+moveDocDetail.getAllocatedQuantity());
|
logger.info(moveDocDetail.getItem()+"===="+moveDocDetail.getAllocatedQuantity());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -395,7 +395,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
if((DoubleUtils.format4F(moveDocDetail.getPreAllocatedQuantity())-DoubleUtils.format4F(moveDocDetail.getAllocatedQuantity()))<=0){
|
if((DoubleUtils.format4F(moveDocDetail.getPreAllocatedQuantity())-DoubleUtils.format4F(moveDocDetail.getAllocatedQuantity()))<=0){
|
||||||
return null;
|
return null;
|
||||||
}else{
|
}else{
|
||||||
System.out.println(moveDocDetail.getItem()+"===="+moveDocDetail.getAllocatedQuantity());
|
logger.info(moveDocDetail.getItem()+"===="+moveDocDetail.getAllocatedQuantity());
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
return errmsg;
|
return errmsg;
|
||||||
|
|
@ -527,10 +527,10 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
pickTicketDetails=commonDao.findByQuery(" from PickTicketDetail ptd where ptd.pickTicket.id in ("+StringUtils.strip(pickTicketId.toString(),"[]")+") "
|
pickTicketDetails=commonDao.findByQuery(" from PickTicketDetail ptd where ptd.pickTicket.id in ("+StringUtils.strip(pickTicketId.toString(),"[]")+") "
|
||||||
+ "and ptd.pickTicket.billType.code in('GPUTPTC') order by ptd.pickTicket.id,ptd.id");
|
+ "and ptd.pickTicket.billType.code in('GPUTPTC') order by ptd.pickTicket.id,ptd.id");
|
||||||
if(pickTicketDetails.size()>0) {
|
if(pickTicketDetails.size()>0) {
|
||||||
System.out.println(pickTicketDetails.size()+" 行数!");
|
logger.info(pickTicketDetails.size()+" 行数!");
|
||||||
preAllocate(pickTicketDetails);
|
preAllocate(pickTicketDetails);
|
||||||
}else {
|
}else {
|
||||||
System.out.println("今天无工单出库出库信息!");
|
logger.info("今天无工单出库出库信息!");
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
@ -1581,7 +1581,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
task.setWarehouseArea(inventory.getWarehouseArea());
|
task.setWarehouseArea(inventory.getWarehouseArea());
|
||||||
task.setBarCode(inventory.getBarCode());
|
task.setBarCode(inventory.getBarCode());
|
||||||
task.setSrcLP(inventory.getLocation().getStock());
|
task.setSrcLP(inventory.getLocation().getStock());
|
||||||
System.out.println(inventory.getLocation().getId());
|
logger.info(inventory.getLocation().getId());
|
||||||
commonDao.store(task);
|
commonDao.store(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1592,7 +1592,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
}
|
}
|
||||||
shuaXinWaveDoc(id);//刷新波次单
|
shuaXinWaveDoc(id);//刷新波次单
|
||||||
}else{
|
}else{
|
||||||
System.out.println("无波次任务!"+"\n");
|
logger.info("无波次任务!"+"\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1764,7 +1764,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
WaveDocDetail wdd = t.getWaveDocDetail();
|
WaveDocDetail wdd = t.getWaveDocDetail();
|
||||||
SeedWall sw = wdd.getSeedWall();
|
SeedWall sw = wdd.getSeedWall();
|
||||||
LocationStorage ls = sw.getLocationStorage();//工作站
|
LocationStorage ls = sw.getLocationStorage();//工作站
|
||||||
System.out.println("任务:"+t.getCode()+"\n");
|
logger.info("任务:"+t.getCode()+"\n");
|
||||||
String outsueAGVJSON = interfaceManager.outsueAGVJSON("kckq", ls.getDescription(), "QP_OUTBOUND", "", 1,0, "SI_QUICK_PICK", true, t.getCode(), 1, t.getSrcLoc().getCode(), 0);
|
String outsueAGVJSON = interfaceManager.outsueAGVJSON("kckq", ls.getDescription(), "QP_OUTBOUND", "", 1,0, "SI_QUICK_PICK", true, t.getCode(), 1, t.getSrcLoc().getCode(), 0);
|
||||||
String result = interfaceManager.doSslPost(ApiURL.issueAGV,outsueAGVJSON);
|
String result = interfaceManager.doSslPost(ApiURL.issueAGV,outsueAGVJSON);
|
||||||
JSONObject json = JSONObject.fromObject(result);
|
JSONObject json = JSONObject.fromObject(result);
|
||||||
|
|
@ -1794,19 +1794,19 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
int waveSum=(int) (inv.get(i).getQtyOfMasterPack()-inv.get(i).getQueuedQuantity());
|
int waveSum=(int) (inv.get(i).getQtyOfMasterPack()-inv.get(i).getQueuedQuantity());
|
||||||
|
|
||||||
if (sum-waveSum>=0) {
|
if (sum-waveSum>=0) {
|
||||||
System.out.println("料箱整箱:"+inv.get(i).getLocation().getCode());
|
logger.info("料箱整箱:"+inv.get(i).getLocation().getCode());
|
||||||
String outsueAGVJSON=interfaceManager.outsueAGVJSON("kckq", ls.getDescription(), "QP_OUTBOUND", "", 1, 0, "SI_QUICK_PICK", true, robotJobId, 1l,inv.get(i).getLocation().getCode(),0);
|
String outsueAGVJSON=interfaceManager.outsueAGVJSON("kckq", ls.getDescription(), "QP_OUTBOUND", "", 1, 0, "SI_QUICK_PICK", true, robotJobId, 1l,inv.get(i).getLocation().getCode(),0);
|
||||||
|
|
||||||
interfaceManager.doSslPost(ApiURL.issueAGV, outsueAGVJSON);
|
interfaceManager.doSslPost(ApiURL.issueAGV, outsueAGVJSON);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
System.out.println("料箱单拣:"+inv.get(i).getLocation().getCode());
|
logger.info("料箱单拣:"+inv.get(i).getLocation().getCode());
|
||||||
String outsueAGVJSON=interfaceManager.outsueAGVJSON("kckq", ls.getDescription(), "QP_OUTBOUND", "", 1, 0, "SI_QUICK_PICK", true, robotJobId, 1,inv.get(i).getLocation().getCode(),0);
|
String outsueAGVJSON=interfaceManager.outsueAGVJSON("kckq", ls.getDescription(), "QP_OUTBOUND", "", 1, 0, "SI_QUICK_PICK", true, robotJobId, 1,inv.get(i).getLocation().getCode(),0);
|
||||||
interfaceManager.doSslPost(ApiURL.issueAGV, outsueAGVJSON);
|
interfaceManager.doSslPost(ApiURL.issueAGV, outsueAGVJSON);
|
||||||
}
|
}
|
||||||
sum=sum-waveSum;
|
sum=sum-waveSum;
|
||||||
if (sum<=0) {
|
if (sum<=0) {
|
||||||
System.out.println("呼叫完成:");
|
logger.info("呼叫完成:");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1821,9 +1821,9 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
// .getPickTicket().getLx().getCode()
|
// .getPickTicket().getLx().getCode()
|
||||||
List<String> robotJobIds=new ArrayList<String>();
|
List<String> robotJobIds=new ArrayList<String>();
|
||||||
String returnAGVJSON=interfaceManager.returnAGVJSON(robotJobIds,1l,"", false,"RETURN_WAREHOUSE");
|
String returnAGVJSON=interfaceManager.returnAGVJSON(robotJobIds,1l,"", false,"RETURN_WAREHOUSE");
|
||||||
System.out.println("json:"+returnAGVJSON);
|
logger.info("json:"+returnAGVJSON);
|
||||||
}*/
|
}*/
|
||||||
// System.out.println("回传入库:"+inv.get(i).getLocation().getCode());
|
// logger.info("回传入库:"+inv.get(i).getLocation().getCode());
|
||||||
List<String> robotJobIds=new ArrayList<String>();
|
List<String> robotJobIds=new ArrayList<String>();
|
||||||
String returnAGVJSON=interfaceManager.returnAGVJSON(robotJobIds,1L,containerCode, false,"RETURN_WAREHOUSE");
|
String returnAGVJSON=interfaceManager.returnAGVJSON(robotJobIds,1L,containerCode, false,"RETURN_WAREHOUSE");
|
||||||
interfaceManager.doSslPost(ApiURL.returnAGV, returnAGVJSON);
|
interfaceManager.doSslPost(ApiURL.returnAGV, returnAGVJSON);
|
||||||
|
|
@ -1892,7 +1892,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
Map<String, Long> map= new HashMap<String, Long>();
|
Map<String, Long> map= new HashMap<String, Long>();
|
||||||
map.put("waveDoc.id", id);
|
map.put("waveDoc.id", id);
|
||||||
getQuantityMap(map);
|
getQuantityMap(map);
|
||||||
System.out.printf("取消分配执行时长:"+(etime - stime)+"\n");
|
logger.info("取消分配执行时长:"+(etime - stime)+"\n");
|
||||||
jdbcManager.saveExceptionLog(UserHolder.getUser().getName()+"取消分配!");
|
jdbcManager.saveExceptionLog(UserHolder.getUser().getName()+"取消分配!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1976,7 +1976,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
}
|
}
|
||||||
shuaxinPick(pt);//刷新出库单
|
shuaxinPick(pt);//刷新出库单
|
||||||
long etime = System.currentTimeMillis();
|
long etime = System.currentTimeMillis();
|
||||||
System.out.printf("取消分配执行时长:"+(etime - stime)+"\n");
|
logger.info("取消分配执行时长:"+(etime - stime)+"\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2048,7 +2048,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
// }
|
// }
|
||||||
shuaxinPick(pt);//刷新出库单
|
shuaxinPick(pt);//刷新出库单
|
||||||
long etime = System.currentTimeMillis();
|
long etime = System.currentTimeMillis();
|
||||||
System.out.printf("取消分配执行时长:"+(etime - stime)+"\n");
|
logger.info("取消分配执行时长:"+(etime - stime)+"\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2379,7 +2379,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
String bsql=" from BillTypeConfig b where b.billType.id="+pt.getBillType().getId();
|
String bsql=" from BillTypeConfig b where b.billType.id="+pt.getBillType().getId();
|
||||||
if(ptd.getNewLotInfo().getPropC9()!=null&&!ptd.getNewLotInfo().getPropC9().equals("")) {
|
if(ptd.getNewLotInfo()!=null&&ptd.getNewLotInfo().getPropC9()!=null&&!ptd.getNewLotInfo().getPropC9().equals("")) {
|
||||||
bsql+=" and b.plantCode='"+ptd.getNewLotInfo().getPropC9()+"'";
|
bsql+=" and b.plantCode='"+ptd.getNewLotInfo().getPropC9()+"'";
|
||||||
}
|
}
|
||||||
List<BillTypeConfig> bts=commonDao.findByQuery(bsql);
|
List<BillTypeConfig> bts=commonDao.findByQuery(bsql);
|
||||||
|
|
@ -2483,7 +2483,6 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
task.setPlanQuantity(allocateQty);
|
task.setPlanQuantity(allocateQty);
|
||||||
task.setPlanQuantityMU(allocateQty);
|
task.setPlanQuantityMU(allocateQty);
|
||||||
task.setInventoryStatus(inventory.getStatus());
|
task.setInventoryStatus(inventory.getStatus());
|
||||||
task.setStrBill10(inventory.getStatuss());
|
|
||||||
task.setCreateTime(new Date());
|
task.setCreateTime(new Date());
|
||||||
task.setWarehouseArea(inventory.getWarehouseArea());
|
task.setWarehouseArea(inventory.getWarehouseArea());
|
||||||
task.setBarCode(inventory.getBarCode());
|
task.setBarCode(inventory.getBarCode());
|
||||||
|
|
@ -2518,7 +2517,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
// interfaceReqManager.wmsSapZhuantaihuichuang(listtask, 0,"",1);//状态回传
|
// interfaceReqManager.wmsSapZhuantaihuichuang(listtask, 0,"",1);//状态回传
|
||||||
// }
|
// }
|
||||||
// }else {
|
// }else {
|
||||||
// System.out.println(pt.getCode()+"自动分配,无回传状态");
|
// logger.info(pt.getCode()+"自动分配,无回传状态");
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// shuaxinPick(pt);//刷新订单
|
// shuaxinPick(pt);//刷新订单
|
||||||
|
|
@ -2567,7 +2566,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
try {
|
try {
|
||||||
commonDao.store(pt);
|
commonDao.store(pt);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
System.out.println(pt.getId()+"保存失败");
|
logger.info(pt.getId()+"保存失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2689,7 +2688,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
}
|
}
|
||||||
shuaXinWaveDoc(id);//刷新波次单
|
shuaXinWaveDoc(id);//刷新波次单
|
||||||
}else{
|
}else{
|
||||||
System.out.println("无波次任务!"+"\n");
|
logger.info("无波次任务!"+"\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3131,7 +3130,6 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
task.setCreateTime(new Date());
|
task.setCreateTime(new Date());
|
||||||
task.setWarehouseArea(inventory.getWarehouseArea());
|
task.setWarehouseArea(inventory.getWarehouseArea());
|
||||||
task.setBarCode(inventory.getBarCode());
|
task.setBarCode(inventory.getBarCode());
|
||||||
task.setStrBill10(inventory.getStatuss());
|
|
||||||
task.setSrcLP(inventory.getLocation().getStock());
|
task.setSrcLP(inventory.getLocation().getStock());
|
||||||
if(UserHolder.getUser()!=null) {
|
if(UserHolder.getUser()!=null) {
|
||||||
task.setOperator(UserHolder.getUser().getName());
|
task.setOperator(UserHolder.getUser().getName());
|
||||||
|
|
@ -3195,10 +3193,10 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
WarehouseArea wa=this.load(WarehouseArea.class, Long.parseLong(obj[0].toString()));
|
WarehouseArea wa=this.load(WarehouseArea.class, Long.parseLong(obj[0].toString()));
|
||||||
if(wa.getName().equals("料箱区")){
|
if(wa.getName().equals("料箱区")){
|
||||||
createAGV(obj[1].toString(),pickTicketDetailIds, wa.getId(),ave);
|
createAGV(obj[1].toString(),pickTicketDetailIds, wa.getId(),ave);
|
||||||
System.out.println(obj[1]);
|
logger.info(obj[1]);
|
||||||
}else if(wa.getName().equals("货架区")){
|
}else if(wa.getName().equals("货架区")){
|
||||||
createAGV(obj[1].toString(),pickTicketDetailIds, wa.getId(),ave);
|
createAGV(obj[1].toString(),pickTicketDetailIds, wa.getId(),ave);
|
||||||
System.out.println(obj[1]);
|
logger.info(obj[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3355,7 +3353,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
System.out.println("无出库单明细");
|
logger.info("无出库单明细");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -3442,7 +3440,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
if(zone.getId()==1763) {
|
if(zone.getId()==1763) {
|
||||||
//容器返库
|
//容器返库
|
||||||
if(srcLocation.getStock()!=null) {
|
if(srcLocation.getStock()!=null) {
|
||||||
System.out.println("容器返库1");
|
logger.info("容器返库1");
|
||||||
Stock stock= commonDao.load(Stock.class, srcLocation.getStock().getId());
|
Stock stock= commonDao.load(Stock.class, srcLocation.getStock().getId());
|
||||||
List<Task> tsks=commonDao.findByQuery(" from Task t where 1=1 "
|
List<Task> tsks=commonDao.findByQuery(" from Task t where 1=1 "
|
||||||
+ " and t.endRegion='"+t.getEndRegion()+"'"
|
+ " and t.endRegion='"+t.getEndRegion()+"'"
|
||||||
|
|
@ -3455,7 +3453,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
AgvTask agv=commonDao.load(AgvTask.class, t.getAgvTask().getId());
|
AgvTask agv=commonDao.load(AgvTask.class, t.getAgvTask().getId());
|
||||||
if(agv.getStatus().equals("ATPICK")) {
|
if(agv.getStatus().equals("ATPICK")) {
|
||||||
interfaceReqManager.wcsNextPT(agv.getRobotJobId(), s.getLP(), WcsCSDCode.getWcsCSDCode(t.getEndRegion()));
|
interfaceReqManager.wcsNextPT(agv.getRobotJobId(), s.getLP(), WcsCSDCode.getWcsCSDCode(t.getEndRegion()));
|
||||||
System.out.println("容器返库2");
|
logger.info("容器返库2");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3508,7 +3506,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
||||||
//未回传的
|
//未回传的
|
||||||
List<Long> tasks2 = commonDao.findByQuery("select p.id from Task p where p.billCode='" + billCode
|
List<Long> tasks2 = commonDao.findByQuery("select p.id from Task p where p.billCode='" + billCode
|
||||||
+ "' and p.popular=0 " + " and p.pickTicketDetail.pickTicket.id=" + pt.getId());
|
+ "' and p.popular=0 " + " and p.pickTicketDetail.pickTicket.id=" + pt.getId());
|
||||||
System.out.println(tasks1.size() + "-----" + tasks2.size());
|
logger.info(tasks1.size() + "-----" + tasks2.size());
|
||||||
// 是否回传SAP,其他出库不出WMS仓,出库完成不用回传,自动生成入库单,入库完成后在回传。
|
// 是否回传SAP,其他出库不出WMS仓,出库完成不用回传,自动生成入库单,入库完成后在回传。
|
||||||
BillType bt = commonDao.load(BillType.class, pt.getBillType().getId());
|
BillType bt = commonDao.load(BillType.class, pt.getBillType().getId());
|
||||||
if (tasks1.size() > 0 && tasks1.size() == tasks2.size()) {
|
if (tasks1.size() > 0 && tasks1.size() == tasks2.size()) {
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,6 @@ public interface ASNManager extends BaseManager{
|
||||||
@Transactional
|
@Transactional
|
||||||
void asnBatch(Map map,String taskCode,Long print);
|
void asnBatch(Map map,String taskCode,Long print);
|
||||||
@Transactional
|
@Transactional
|
||||||
void printOrderAll(List<Long> ids,Long print);
|
|
||||||
@Transactional
|
|
||||||
void storeASN(ASN asn);
|
void storeASN(ASN asn);
|
||||||
//任务转移
|
//任务转移
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|
|
||||||
|
|
@ -309,9 +309,6 @@ public interface MoveDocManager extends BaseManager {
|
||||||
/** 出空托*/
|
/** 出空托*/
|
||||||
@Transactional
|
@Transactional
|
||||||
void stockCk(List<Long> ids);
|
void stockCk(List<Long> ids);
|
||||||
/** 出空托*/
|
|
||||||
@Transactional
|
|
||||||
void stockCk(List<Long> ids,String gzz);
|
|
||||||
/** 呼叫托盘*/
|
/** 呼叫托盘*/
|
||||||
@Transactional
|
@Transactional
|
||||||
void byLibrartTask(String sls,String dlp,String lp,String type,String classification) ;
|
void byLibrartTask(String sls,String dlp,String lp,String type,String classification) ;
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ import com.dev.energy.server.web.security.UserHolder;
|
||||||
import com.sun.corba.se.spi.orbutil.threadpool.Work;
|
import com.sun.corba.se.spi.orbutil.threadpool.Work;
|
||||||
import com.sun.org.apache.bcel.internal.generic.NEW;
|
import com.sun.org.apache.bcel.internal.generic.NEW;
|
||||||
import com.thoughtworks.xstream.alias.ClassMapper.Null;
|
import com.thoughtworks.xstream.alias.ClassMapper.Null;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
/**
|
/**
|
||||||
* @author dev
|
* @author dev
|
||||||
*
|
*
|
||||||
|
|
@ -155,6 +155,7 @@ public class DefaultASNManager extends DefaultBaseManager implements ASNManager
|
||||||
protected final InterfaceManager interfaceManager;
|
protected final InterfaceManager interfaceManager;
|
||||||
protected final InterfaceReqManager interfaceReqManager;
|
protected final InterfaceReqManager interfaceReqManager;
|
||||||
protected final UserManager userManager;
|
protected final UserManager userManager;
|
||||||
|
private static Logger logger = Logger.getLogger(DefaultASNManager.class);
|
||||||
protected final WmsOperationHisManager wmsOperationHisManager;
|
protected final WmsOperationHisManager wmsOperationHisManager;
|
||||||
public DefaultASNManager(ItemManager manager, InventoryManager manager2, BussinessCodeManager manager3,
|
public DefaultASNManager(ItemManager manager, InventoryManager manager2, BussinessCodeManager manager3,
|
||||||
PutawayAllocator putawayAllocator, WarehouseManager manager4, InterfaceLogManager manager5,
|
PutawayAllocator putawayAllocator, WarehouseManager manager4, InterfaceLogManager manager5,
|
||||||
|
|
@ -256,7 +257,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// System.out.println("----");
|
// logger.info("----");
|
||||||
}
|
}
|
||||||
|
|
||||||
asnDetail.setAsn(asn);
|
asnDetail.setAsn(asn);
|
||||||
|
|
@ -615,11 +616,11 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
}
|
}
|
||||||
// 单一明细收货确认
|
// 单一明细收货确认
|
||||||
public BoxLabel confirmReceivingBar(Long asn_detail_id, BoxLabel b,String type,Long loc_id,Long workerId,Long wId,String receive_subset) {
|
public BoxLabel confirmReceivingBar(Long asn_detail_id, BoxLabel b,String type,Long loc_id,Long workerId,Long wId,String receive_subset) {
|
||||||
System.out.println("---0 "+asn_detail_id);
|
logger.info("---0 "+asn_detail_id);
|
||||||
ASNDetail asnDetail =this.commonDao.get(ASNDetail.class, asn_detail_id);//b.getAsnDetail();
|
ASNDetail asnDetail =this.commonDao.get(ASNDetail.class, asn_detail_id);//b.getAsnDetail();
|
||||||
System.out.println("---1 ");
|
logger.info("---1 ");
|
||||||
ASN asn = this.commonDao.get(ASN.class, asnDetail.getAsn().getId());//asnDetail.getAsn();
|
ASN asn = this.commonDao.get(ASN.class, asnDetail.getAsn().getId());//asnDetail.getAsn();
|
||||||
System.out.println("---2 "+asn.getId());
|
logger.info("---2 "+asn.getId());
|
||||||
Location location = commonDao.load(Location.class, loc_id);
|
Location location = commonDao.load(Location.class, loc_id);
|
||||||
if(!b.isBeInput()){
|
if(!b.isBeInput()){
|
||||||
Worker worker = this.load(Worker.class, workerId);
|
Worker worker = this.load(Worker.class, workerId);
|
||||||
|
|
@ -638,22 +639,22 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
}
|
}
|
||||||
|
|
||||||
commonDao.store(itemKey);
|
commonDao.store(itemKey);
|
||||||
System.out.println("---3 "+itemKey.getId());
|
logger.info("---3 "+itemKey.getId());
|
||||||
ReceivedRecord receivedRecord=this.receive(asn, asnDetail, itemKey, b, location, worker);
|
ReceivedRecord receivedRecord=this.receive(asn, asnDetail, itemKey, b, location, worker);
|
||||||
commonDao.store(receivedRecord);
|
commonDao.store(receivedRecord);
|
||||||
System.out.println("---4 ");
|
logger.info("---4 ");
|
||||||
b.setBeInput(Boolean.TRUE);
|
b.setBeInput(Boolean.TRUE);
|
||||||
b.setReceivedRecordId(receivedRecord.getId());
|
b.setReceivedRecordId(receivedRecord.getId());
|
||||||
b.setReceiveDate(new Date());
|
b.setReceiveDate(new Date());
|
||||||
b.setWorker(worker);
|
b.setWorker(worker);
|
||||||
this.commonDao.store(b);
|
this.commonDao.store(b);
|
||||||
System.out.println("---5 "+receivedRecord.getId());
|
logger.info("---5 "+receivedRecord.getId());
|
||||||
// if(itemKey.getLotInfo()!=null){
|
// if(itemKey.getLotInfo()!=null){
|
||||||
// LotInfo newLot=itemKey.getLotInfo();
|
// LotInfo newLot=itemKey.getLotInfo();
|
||||||
// newLot.setPropL3(receivedRecord.getId());
|
// newLot.setPropL3(receivedRecord.getId());
|
||||||
// itemKey.setLotInfo(newLot);
|
// itemKey.setLotInfo(newLot);
|
||||||
// this.commonDao.store(itemKey);
|
// this.commonDao.store(itemKey);
|
||||||
// System.out.println(itemKey.getId()+"==="+itemKey.getLotInfo().getPropC9());
|
// logger.info(itemKey.getId()+"==="+itemKey.getLotInfo().getPropC9());
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
return b;
|
return b;
|
||||||
|
|
@ -743,9 +744,9 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
String aString=jsonStrs.toString().replace(" ", "");
|
String aString=jsonStrs.toString().replace(" ", "");
|
||||||
JSONObject jsonStr = JSONObject.fromObject(aString);
|
JSONObject jsonStr = JSONObject.fromObject(aString);
|
||||||
jsonArray = JSONArray.fromObject(jsonStr.getString("header_list"));
|
jsonArray = JSONArray.fromObject(jsonStr.getString("header_list"));
|
||||||
System.out.println("解密后:"+jsonArray);
|
logger.info("解密后:"+jsonArray);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("错误"+e.getMessage());
|
logger.info("错误"+e.getMessage());
|
||||||
}
|
}
|
||||||
return jsonArray;
|
return jsonArray;
|
||||||
}
|
}
|
||||||
|
|
@ -1191,7 +1192,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
commonDao.store(moveDoc);
|
commonDao.store(moveDoc);
|
||||||
// }
|
// }
|
||||||
for (ReceivedRecord record : asn.getReceivedRecords()) {
|
for (ReceivedRecord record : asn.getReceivedRecords()) {
|
||||||
System.out.println(record.getId());
|
logger.info(record.getId());
|
||||||
// 直接收货上架的记录不再加入上架计划明细A
|
// 直接收货上架的记录不再加入上架计划明细A
|
||||||
if (!LocationType.RECEIVE.equals(record.getLocation().getType())||
|
if (!LocationType.RECEIVE.equals(record.getLocation().getType())||
|
||||||
record.getWarehouseArea().getId()==1766) {
|
record.getWarehouseArea().getId()==1766) {
|
||||||
|
|
@ -1789,7 +1790,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
new String[] { "id"},new Object[] {WarehouseHolder.getWarehouse().getId()});
|
new String[] { "id"},new Object[] {WarehouseHolder.getWarehouse().getId()});
|
||||||
Location l =ls.get(0);
|
Location l =ls.get(0);
|
||||||
for (int i = 1; i <sheet.getRows(); i++) {
|
for (int i = 1; i <sheet.getRows(); i++) {
|
||||||
System.out.println("======"+i);
|
logger.info("======"+i);
|
||||||
//订单号(ASN) 货品自编码 货品名称 规格 单位 数量 重量 批号 生产日期 备注
|
//订单号(ASN) 货品自编码 货品名称 规格 单位 数量 重量 批号 生产日期 备注
|
||||||
String relatedBill1=sheet.getCell(0,i).getContents().trim();
|
String relatedBill1=sheet.getCell(0,i).getContents().trim();
|
||||||
if(relatedBill1==null||relatedBill1.equals("")){
|
if(relatedBill1==null||relatedBill1.equals("")){
|
||||||
|
|
@ -2069,7 +2070,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
log.setLogID(d.getId());
|
log.setLogID(d.getId());
|
||||||
log.setStatus("OPEN");
|
log.setStatus("OPEN");
|
||||||
commonDao.store(log);
|
commonDao.store(log);
|
||||||
System.out.println("xmlContent====="+xmlContent);
|
logger.info("xmlContent====="+xmlContent);
|
||||||
try {
|
try {
|
||||||
HttpClient httpclient = new DefaultHttpClient();
|
HttpClient httpclient = new DefaultHttpClient();
|
||||||
HttpPost httpPost = new HttpPost(wsdl);
|
HttpPost httpPost = new HttpPost(wsdl);
|
||||||
|
|
@ -2078,10 +2079,10 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
stringEntity.setContentType("text/xml");
|
stringEntity.setContentType("text/xml");
|
||||||
httpPost.setEntity(stringEntity);
|
httpPost.setEntity(stringEntity);
|
||||||
HttpResponse response = httpclient.execute(httpPost);
|
HttpResponse response = httpclient.execute(httpPost);
|
||||||
System.out.println(response.getStatusLine().getStatusCode());
|
logger.info(response.getStatusLine().getStatusCode());
|
||||||
HttpEntity entity = response.getEntity();
|
HttpEntity entity = response.getEntity();
|
||||||
String xml = new String(EntityUtils.toByteArray(entity), "UTF8");
|
String xml = new String(EntityUtils.toByteArray(entity), "UTF8");
|
||||||
System.out.println("response========" + xml);
|
logger.info("response========" + xml);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
@ -2538,13 +2539,13 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
printName=printEquipment.getPrintName();
|
printName=printEquipment.getPrintName();
|
||||||
ma=printEquipment.getMac();
|
ma=printEquipment.getMac();
|
||||||
}else {
|
}else {
|
||||||
// System.out.println("无打印机");
|
// logger.info("无打印机");
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
// System.out.println("无设备");
|
// logger.info("无设备");
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
// System.out.println("无设备");
|
// logger.info("无设备");
|
||||||
}
|
}
|
||||||
if(item.isBOM()) {
|
if(item.isBOM()) {
|
||||||
JSONObject json=new JSONObject();
|
JSONObject json=new JSONObject();
|
||||||
|
|
@ -2580,7 +2581,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
barcode+=asnDetail.getStrBill2()+"/"+ymd.format(new Date());
|
barcode+=asnDetail.getStrBill2()+"/"+ymd.format(new Date());
|
||||||
}
|
}
|
||||||
String cent=contentJson(asn.getRelatedBill1(), item.getName(), item.getCode(), receivedQuantity, item.getUnit(), ymd.format(new Date()), opertion_name, barcode);
|
String cent=contentJson(asn.getRelatedBill1(), item.getName(), item.getCode(), receivedQuantity, item.getUnit(), ymd.format(new Date()), opertion_name, barcode);
|
||||||
// System.out.println(cent);
|
// logger.info(cent);
|
||||||
// createPrintTask("3",pqty, cent, workerId, ma, printName, asn.getCode());
|
// createPrintTask("3",pqty, cent, workerId, ma, printName, asn.getCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2712,7 +2713,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateStock(Long stockId) {
|
public void updateStock(Long stockId) {
|
||||||
System.out.println("");
|
logger.info("");
|
||||||
Stock s =commonDao.load(Stock.class, stockId);
|
Stock s =commonDao.load(Stock.class, stockId);
|
||||||
List<Inventory> invs =commonDao.findByQuery(" from Inventory i where i.location.stock.id="+stockId);
|
List<Inventory> invs =commonDao.findByQuery(" from Inventory i where i.location.stock.id="+stockId);
|
||||||
double saleTime=0D;
|
double saleTime=0D;
|
||||||
|
|
@ -2724,7 +2725,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
s.setSaleTime((int)Math.ceil(saleTime));
|
s.setSaleTime((int)Math.ceil(saleTime));
|
||||||
s.setStatus(WarehouseAreaStatus.OCCUPY);
|
s.setStatus(WarehouseAreaStatus.OCCUPY);
|
||||||
commonDao.store(s);
|
commonDao.store(s);
|
||||||
System.out.println("热度值:"+s.getSaleTime());
|
logger.info("热度值:"+s.getSaleTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -3379,7 +3380,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
ReceivedRecord rr=this.load(ReceivedRecord.class, id);
|
ReceivedRecord rr=this.load(ReceivedRecord.class, id);
|
||||||
ASNDetail ad=rr.getAsnDetail();
|
ASNDetail ad=rr.getAsnDetail();
|
||||||
String param="";
|
String param="";
|
||||||
System.out.println(param);
|
logger.info(param);
|
||||||
// interfaceManager.doSslPost("http://192.168.109.12/wstoptst/ws/r/awsp920",param);
|
// interfaceManager.doSslPost("http://192.168.109.12/wstoptst/ws/r/awsp920",param);
|
||||||
interfaceManager.doSslPost("",param);
|
interfaceManager.doSslPost("",param);
|
||||||
}
|
}
|
||||||
|
|
@ -3409,7 +3410,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
@Override
|
@Override
|
||||||
public List<ASN> scanASN(JSONArray jsonArray) {
|
public List<ASN> scanASN(JSONArray jsonArray) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
System.out.println("jsonArray:"+jsonArray.getJSONObject(0).getString("wms_order_no"));
|
logger.info("jsonArray:"+jsonArray.getJSONObject(0).getString("wms_order_no"));
|
||||||
ASN asn=new ASN();
|
ASN asn=new ASN();
|
||||||
asn.setCode(jsonArray.getJSONObject(0).getString("wms_order_no"));
|
asn.setCode(jsonArray.getJSONObject(0).getString("wms_order_no"));
|
||||||
|
|
||||||
|
|
@ -3637,7 +3638,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
LocationStorage ls =this.load(LocationStorage.class, LocationStorageId);//工作站
|
LocationStorage ls =this.load(LocationStorage.class, LocationStorageId);//工作站
|
||||||
for(int i=0;i<quantity;i++){
|
for(int i=0;i<quantity;i++){
|
||||||
String robotJobId=TimeNumberUtils.getAGVCode();
|
String robotJobId=TimeNumberUtils.getAGVCode();
|
||||||
System.out.println(robotJobId);
|
logger.info(robotJobId);
|
||||||
String issueAGVJSON=interfaceManager.issueAGVJSON("kckq", ls.getDescription(), "QP_INBOUND", 1l, 1, 0, "SI_QUICK_PICK", true, robotJobId, 1);
|
String issueAGVJSON=interfaceManager.issueAGVJSON("kckq", ls.getDescription(), "QP_INBOUND", 1l, 1, 0, "SI_QUICK_PICK", true, robotJobId, 1);
|
||||||
interfaceManager.doSslPost(ApiURL.issueAGV, issueAGVJSON);
|
interfaceManager.doSslPost(ApiURL.issueAGV, issueAGVJSON);
|
||||||
}
|
}
|
||||||
|
|
@ -3883,7 +3884,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
if(agv){
|
if(agv){
|
||||||
//容器入库
|
//容器入库
|
||||||
if(statusDes.equals(StatusDes.BOX_IN)){
|
if(statusDes.equals(StatusDes.BOX_IN)){
|
||||||
System.out.println("发送AGV搬运命令");
|
logger.info("发送AGV搬运命令");
|
||||||
SeedWall seedWall=null;
|
SeedWall seedWall=null;
|
||||||
List<SeedWall> SeedWalls = commonDao.findByQuery(" from SeedWall s where s.locationStorage.id=:id ",
|
List<SeedWall> SeedWalls = commonDao.findByQuery(" from SeedWall s where s.locationStorage.id=:id ",
|
||||||
new String[] { "id"},new Object[] {ls.getId()});
|
new String[] { "id"},new Object[] {ls.getId()});
|
||||||
|
|
@ -4562,7 +4563,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
// obj.put("propC1",sdf.format(new Date()));
|
// obj.put("propC1",sdf.format(new Date()));
|
||||||
obj.put("propC1",ad.getLotInfo().getPropC1());
|
obj.put("propC1",ad.getLotInfo().getPropC1());
|
||||||
obj.put("workName",UserHolder.getUser().getName());
|
obj.put("workName",UserHolder.getUser().getName());
|
||||||
System.out.println(obj.toString());
|
logger.info(obj.toString());
|
||||||
PrintTask pt=new PrintTask();
|
PrintTask pt=new PrintTask();
|
||||||
pt.setType("3");
|
pt.setType("3");
|
||||||
pt.setStatus("0");
|
pt.setStatus("0");
|
||||||
|
|
@ -4577,54 +4578,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
public void printOrderAll(List<Long> ids,Long print){
|
|
||||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMdd");
|
|
||||||
|
|
||||||
double allocatedQuantity = 0;
|
|
||||||
for (Long id: ids) {
|
|
||||||
ASN asn=commonDao.load(ASN.class, id);
|
|
||||||
List<ASNDetail> ads=commonDao.findByQuery(" from ASNDetail ad where ad.asn.id="
|
|
||||||
+id+" and ad.expectedQuantity>0");
|
|
||||||
for(ASNDetail ad:ads) {
|
|
||||||
Long quantity =1L;
|
|
||||||
Item item=commonDao.load(Item.class, ad.getItem().getId());
|
|
||||||
PrintEquipment pe=commonDao.load(PrintEquipment.class, print);
|
|
||||||
String qrcode="QAR/"+asn.getRelatedBill1()+"/"+ad.getStrBill8()+"/"+item.getCode()+"/"+item.getUnit();
|
|
||||||
if(ad.getStrBill2()!=null&&!ad.getStrBill2().equals("")) {
|
|
||||||
qrcode+="/"+ad.getStrBill2()+"/"+sdf.format(new Date());
|
|
||||||
}else {
|
|
||||||
qrcode+="//"+sdf.format(new Date());
|
|
||||||
}
|
|
||||||
JSONObject obj=new JSONObject();
|
|
||||||
obj.put("itemName", item.getName());
|
|
||||||
obj.put("unit", item.getUnit());
|
|
||||||
obj.put("quantity", ad.getExpectedQtyOfMasterUnit());
|
|
||||||
obj.put("taskCode", asn.getRelatedBill1());
|
|
||||||
obj.put("qrcode", qrcode);
|
|
||||||
obj.put("barCode", ad.getStrBill2()==null?"":ad.getStrBill2());
|
|
||||||
obj.put("loc", ad.getLotInfo().getPropC2());
|
|
||||||
obj.put("itemCode", item.getCode());
|
|
||||||
// obj.put("propC1",sdf.format(new Date()));
|
|
||||||
obj.put("propC1",ad.getLotInfo().getPropC1());
|
|
||||||
obj.put("workName",UserHolder.getUser().getName());
|
|
||||||
System.out.println(obj.toString());
|
|
||||||
PrintTask pt=new PrintTask();
|
|
||||||
pt.setType("3");
|
|
||||||
pt.setStatus("0");
|
|
||||||
pt.setQuantity(quantity);
|
|
||||||
pt.setContent(obj.toString());
|
|
||||||
pt.setCreateName(UserHolder.getUser().getName());
|
|
||||||
pt.setCreateDate(new Date());
|
|
||||||
pt.setMac(pe.getMac());
|
|
||||||
pt.setPrintName(pe.getPrintName());
|
|
||||||
pt.setPrintTitle(asn.getRelatedBill1()+"/"+item.getCode());
|
|
||||||
commonDao.store(pt);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
public boolean checkLoc(ASNDetail ad ,long stockId){
|
public boolean checkLoc(ASNDetail ad ,long stockId){
|
||||||
boolean cheak=true;
|
boolean cheak=true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ import com.dev.energy.server.service.pojo.DefaultBaseManager;
|
||||||
import com.dev.energy.server.util.DateUtil;
|
import com.dev.energy.server.util.DateUtil;
|
||||||
import com.dev.energy.server.util.LocalizedMessage;
|
import com.dev.energy.server.util.LocalizedMessage;
|
||||||
import com.dev.energy.server.web.security.UserHolder;
|
import com.dev.energy.server.web.security.UserHolder;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDocManager {
|
public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDocManager {
|
||||||
protected final InventoryManager inventoryManager;
|
protected final InventoryManager inventoryManager;
|
||||||
protected final PutawayAllocator putawayAllocator;
|
protected final PutawayAllocator putawayAllocator;
|
||||||
|
|
@ -111,6 +111,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
protected final LocationManager locationManager;
|
protected final LocationManager locationManager;
|
||||||
protected final AgvTaskManager agvTaskManager;
|
protected final AgvTaskManager agvTaskManager;
|
||||||
|
|
||||||
|
private static Logger logger = Logger.getLogger(DefaultMoveDocManager.class);
|
||||||
public DefaultMoveDocManager(InventoryManager manager, PutawayAllocator allocator, BussinessCodeManager manager2,
|
public DefaultMoveDocManager(InventoryManager manager, PutawayAllocator allocator, BussinessCodeManager manager2,
|
||||||
InterfaceLogManager manager3, ItemManager manager4, AutoAllocator autoAllocator,
|
InterfaceLogManager manager3, ItemManager manager4, AutoAllocator autoAllocator,
|
||||||
InterfaceManager interfaceManager, InterfaceReqManager interfaceReqManager,
|
InterfaceManager interfaceManager, InterfaceReqManager interfaceReqManager,
|
||||||
|
|
@ -1095,7 +1096,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
commonDao.store(dstloc);
|
commonDao.store(dstloc);
|
||||||
}
|
}
|
||||||
//加急订单生成出库任务
|
//加急订单生成出库任务
|
||||||
// System.out.println(adlist1.size());
|
// logger.info(adlist1.size());
|
||||||
if(adlist1.size()>0) {
|
if(adlist1.size()>0) {
|
||||||
for(Long asnid:adlist1) {
|
for(Long asnid:adlist1) {
|
||||||
autoAllocator.addPickTicketTask(asnid, userId);
|
autoAllocator.addPickTicketTask(asnid, userId);
|
||||||
|
|
@ -1164,7 +1165,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
.findByQuery("select inv.itemKey.item.id from Inventory inv where inv.qtyOfMasterPack>0 and inv.location.id="
|
.findByQuery("select inv.itemKey.item.id from Inventory inv where inv.qtyOfMasterPack>0 and inv.location.id="
|
||||||
+ deslocation.getId());
|
+ deslocation.getId());
|
||||||
if (invs1.size() >= 1) {
|
if (invs1.size() >= 1) {
|
||||||
System.out.println(invs1.get(0) + "-------" + item.getId());
|
logger.info(invs1.get(0) + "-------" + item.getId());
|
||||||
if (invs1.get(0).intValue() == item.getId().intValue()) {
|
if (invs1.get(0).intValue() == item.getId().intValue()) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1345,10 +1346,10 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
+ md.getId() + " and m.planQuantityOfMU=m.moveQuantity");
|
+ md.getId() + " and m.planQuantityOfMU=m.moveQuantity");
|
||||||
md.setAccomplish(mdids.size());
|
md.setAccomplish(mdids.size());
|
||||||
commonDao.store(md);
|
commonDao.store(md);
|
||||||
// System.out.println("1----");
|
// logger.info("1----");
|
||||||
if (detail.getReceivedRecordId() != null) {
|
if (detail.getReceivedRecordId() != null) {
|
||||||
ReceivedRecord r = commonDao.load(ReceivedRecord.class, detail.getReceivedRecordId());
|
ReceivedRecord r = commonDao.load(ReceivedRecord.class, detail.getReceivedRecordId());
|
||||||
// System.out.println("2----");
|
// logger.info("2----");
|
||||||
if (r != null) {
|
if (r != null) {
|
||||||
if (r.getSrcLP() != null) {
|
if (r.getSrcLP() != null) {
|
||||||
Stock s = commonDao.load(Stock.class, r.getSrcLP().getId());
|
Stock s = commonDao.load(Stock.class, r.getSrcLP().getId());
|
||||||
|
|
@ -1359,7 +1360,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
r.setSrcLPCode(s.getLP());
|
r.setSrcLPCode(s.getLP());
|
||||||
commonDao.store(r);
|
commonDao.store(r);
|
||||||
}
|
}
|
||||||
// System.out.println("3----");
|
// logger.info("3----");
|
||||||
inventoryManager.createReceivingInventory(r,deslocation);
|
inventoryManager.createReceivingInventory(r,deslocation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1670,7 +1671,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
MoveDoc moveDoc = commonDao.load(MoveDoc.class, id);
|
MoveDoc moveDoc = commonDao.load(MoveDoc.class, id);
|
||||||
interfaceManager.doSslPost("http://192.168.109.12/wtoptst/ws/r/awsp920", "");
|
interfaceManager.doSslPost("http://192.168.109.12/wtoptst/ws/r/awsp920", "");
|
||||||
System.out.println("");
|
logger.info("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2287,15 +2288,12 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
srcInv.setStatuss("T");
|
srcInv.setStatuss("T");
|
||||||
}
|
}
|
||||||
commonDao.store(srcInv);
|
commonDao.store(srcInv);
|
||||||
locst.setStatus(WarehouseAreaStatus.OCCUPY);
|
|
||||||
commonDao.store(locst);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
inventoryManager.addInventoryLog(InventoryLogType.RECEIVING, 1, ad.getAsn().getRelatedBill1(),
|
inventoryManager.addInventoryLog(InventoryLogType.RECEIVING, 1, ad.getAsn().getRelatedBill1(),
|
||||||
srcInv.getLocation(), (rd.getSrcLP() == null ? null : rd.getSrcLP().getLP()), rd.getItemKey(),
|
rd.getLocation(), (rd.getSrcLP() == null ? null : rd.getSrcLP().getLP()), rd.getItemKey(),
|
||||||
rd.getReceiveDate(), null, rd.getReceivedQuantity(), null,
|
rd.getReceiveDate(), null, rd.getReceivedQuantity(), null,
|
||||||
srcInv == null ? "" : srcInv.getStatus(), srcInv == null ? 0L : srcInv.getId(), null,
|
srcInv == null ? "" : srcInv.getStatus(), srcInv == null ? 0L : srcInv.getId(), null,
|
||||||
asn.getBillType(), 0, rd.getBarCode(), null,asn.getSourceType());
|
asn.getBillType(), 0, rd.getBarCode(), null,asn.getSourceType());
|
||||||
|
|
@ -2321,13 +2319,13 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
List<Long> list=new ArrayList<Long>();
|
List<Long> list=new ArrayList<Long>();
|
||||||
list.add(locationStorage.getId());
|
list.add(locationStorage.getId());
|
||||||
locationManager.kuwei(list);*/
|
locationManager.kuwei(list);*/
|
||||||
System.out.println(st.getLP()+"有上架信息");
|
logger.info(st.getLP()+"有上架信息");
|
||||||
rd.setBeMoved(Boolean.TRUE);
|
rd.setBeMoved(Boolean.TRUE);
|
||||||
this.commonDao.store(rd);
|
this.commonDao.store(rd);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(inventorys.size()>0) {
|
}else if(inventorys.size()>0) {
|
||||||
System.out.println(st.getLP()+"有库存信息");
|
logger.info(st.getLP()+"有库存信息");
|
||||||
locationStorage.setStatus(WarehouseAreaStatus.OCCUPY);
|
locationStorage.setStatus(WarehouseAreaStatus.OCCUPY);
|
||||||
this.commonDao.store(locationStorage);
|
this.commonDao.store(locationStorage);
|
||||||
// st.setLocationStorage(locationStorage);
|
// st.setLocationStorage(locationStorage);
|
||||||
|
|
@ -2450,7 +2448,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
}
|
}
|
||||||
String cs="01";
|
String cs="01";
|
||||||
String lsString=as+"-"+bs+"-"+cs;
|
String lsString=as+"-"+bs+"-"+cs;
|
||||||
System.out.println("行:"+as+" ,列:"+bs+ ";层" +cs);
|
logger.info("行:"+as+" ,列:"+bs+ ";层" +cs);
|
||||||
String cd="3";
|
String cd="3";
|
||||||
if(lStorage.getGdType().equals("1")) {
|
if(lStorage.getGdType().equals("1")) {
|
||||||
cd="'1','2','3'";
|
cd="'1','2','3'";
|
||||||
|
|
@ -2923,10 +2921,10 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
t.setLibraryTask(tprw.get(0));
|
t.setLibraryTask(tprw.get(0));
|
||||||
t.setAgvStatus(2);
|
t.setAgvStatus(2);
|
||||||
this.commonDao.store(t);
|
this.commonDao.store(t);
|
||||||
// System.out.println("已存在:" + st.getLP());
|
// logger.info("已存在:" + st.getLP());
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
// System.out.println("不存在:" + st.getLP());
|
// logger.info("不存在:" + st.getLP());
|
||||||
}
|
}
|
||||||
// List<LibraryTask> librarys = this.commonDao.findByQuery(hql);
|
// List<LibraryTask> librarys = this.commonDao.findByQuery(hql);
|
||||||
// if (librarys.size() > 0) {
|
// if (librarys.size() > 0) {
|
||||||
|
|
@ -3317,7 +3315,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
if(t.getPickTicketDetail().getSOI()!=null) {
|
if(t.getPickTicketDetail().getSOI()!=null) {
|
||||||
relatedBill4="2";
|
relatedBill4="2";
|
||||||
}
|
}
|
||||||
System.out.println(st.getLP());
|
logger.info(st.getLP());
|
||||||
LocationStorage ls = st.getLocationStorage();
|
LocationStorage ls = st.getLocationStorage();
|
||||||
String hql = "from LibraryTask t where t.status='OPEN' and t.fromCellCode='" + ls.getCode()
|
String hql = "from LibraryTask t where t.status='OPEN' and t.fromCellCode='" + ls.getCode()
|
||||||
+ "' and t.type=" + LibraryTaskType.ck;
|
+ "' and t.type=" + LibraryTaskType.ck;
|
||||||
|
|
@ -3663,10 +3661,10 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
// hql += " and t.toCellCode in ('"+endRegion+"')";
|
// hql += " and t.toCellCode in ('"+endRegion+"')";
|
||||||
List<LibraryTask> tprw = this.commonDao.findByQuery(tp_hql);
|
List<LibraryTask> tprw = this.commonDao.findByQuery(tp_hql);
|
||||||
if (tprw.size() > 0) {
|
if (tprw.size() > 0) {
|
||||||
System.out.println("已有任务存在:" + st.getLP());
|
logger.info("已有任务存在:" + st.getLP());
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
System.out.println("新任务:" + st.getLP());
|
logger.info("新任务:" + st.getLP());
|
||||||
}
|
}
|
||||||
|
|
||||||
String gzz = gzzCode;
|
String gzz = gzzCode;
|
||||||
|
|
@ -3713,10 +3711,10 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
hql += " and t.toCellCode in ('"+endRegion+"')";
|
hql += " and t.toCellCode in ('"+endRegion+"')";
|
||||||
List<LibraryTask> tprw = this.commonDao.findByQuery(tp_hql);
|
List<LibraryTask> tprw = this.commonDao.findByQuery(tp_hql);
|
||||||
if (tprw.size() > 0) {
|
if (tprw.size() > 0) {
|
||||||
System.out.println("已存在:" + st.getLP());
|
logger.info("已存在:" + st.getLP());
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
System.out.println("不存在:" + st.getLP());
|
logger.info("不存在:" + st.getLP());
|
||||||
}
|
}
|
||||||
|
|
||||||
String gzz = gzzCode;
|
String gzz = gzzCode;
|
||||||
|
|
@ -3860,17 +3858,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void stockCk(List<Long> ids,String gzz) {
|
|
||||||
// int gzz=602;
|
|
||||||
// TODO 自动生成的方法存根
|
|
||||||
for (Long id : ids) {
|
|
||||||
Inventory inventory=this.load(Inventory.class, id);
|
|
||||||
inventory.setQueuedQuantity(inventory.getQuantity());
|
|
||||||
commonDao.store(inventory);
|
|
||||||
stockCk(inventory,gzz+"");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@Override
|
@Override
|
||||||
public void byLibrartTask(String sls, String dlp) {
|
public void byLibrartTask(String sls, String dlp) {
|
||||||
// TODO 自动生成的方存根
|
// TODO 自动生成的方存根
|
||||||
|
|
@ -3885,7 +3873,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
LocationStorage ls1=stock.getLocationStorage();
|
LocationStorage ls1=stock.getLocationStorage();
|
||||||
LocationStorage ls2=null;
|
LocationStorage ls2=null;
|
||||||
// if (stock.getRdType().equals(ls1.getRdType())) {
|
// if (stock.getRdType().equals(ls1.getRdType())) {
|
||||||
// System.out.println("无需移位");
|
// logger.info("无需移位");
|
||||||
// continue;
|
// continue;
|
||||||
// }else {
|
// }else {
|
||||||
ls2 = findLocationStorageFor7(stock);
|
ls2 = findLocationStorageFor7(stock);
|
||||||
|
|
@ -3959,12 +3947,12 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
public void stockPickTicket(List<Long> ids) {
|
public void stockPickTicket(List<Long> ids) {
|
||||||
//创建一个 Calendar 实例
|
//创建一个 Calendar 实例
|
||||||
Calendar calendar = Calendar.getInstance();//获取当前日期
|
Calendar calendar = Calendar.getInstance();//获取当前日期
|
||||||
Date currentDate = new Date();System.out.println("当前日期:"+ currentDate);
|
Date currentDate = new Date();logger.info("当前日期:"+ currentDate);
|
||||||
//将 Calendar 设置为当前日期
|
//将 Calendar 设置为当前日期
|
||||||
calendar.setTime(currentDate);//为 Calendar 增加一天
|
calendar.setTime(currentDate);//为 Calendar 增加一天
|
||||||
calendar.add(Calendar.DATE,1);//获取增加一天后的日期
|
calendar.add(Calendar.DATE,1);//获取增加一天后的日期
|
||||||
Date nextDate = calendar.getTime();
|
Date nextDate = calendar.getTime();
|
||||||
System.out.print("增加一天后的日期: " + nextDate);
|
logger.info("增加一天后的日期: " + nextDate);
|
||||||
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String sql =" from PickTicketDetail ptd where 1=1 ";
|
String sql =" from PickTicketDetail ptd where 1=1 ";
|
||||||
sql+=" and CONVERT(varchar(100),ptd.pickTicket.orderDate, 23)='"+sdf.format(nextDate)+"'"
|
sql+=" and CONVERT(varchar(100),ptd.pickTicket.orderDate, 23)='"+sdf.format(nextDate)+"'"
|
||||||
|
|
@ -4073,7 +4061,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
//获取目标点
|
//获取目标点
|
||||||
ls2 = findLocationStorageFor7(stock);
|
ls2 = findLocationStorageFor7(stock);
|
||||||
if (ls2!=null) {
|
if (ls2!=null) {
|
||||||
System.out.println("起点:"+ls1.getName()+" 目标点:"+ls2.getName()+"----"+stock.getLP());
|
logger.info("起点:"+ls1.getName()+" 目标点:"+ls2.getName()+"----"+stock.getLP());
|
||||||
try {
|
try {
|
||||||
LibraryTask t2 = interfaceReqManager.storeLibraryTask(LibraryTaskType.byzl,
|
LibraryTask t2 = interfaceReqManager.storeLibraryTask(LibraryTaskType.byzl,
|
||||||
LibraryTaskType.yk, stock.getLP(), ls1.getName(),ls2.getName(), "", 1,
|
LibraryTaskType.yk, stock.getLP(), ls1.getName(),ls2.getName(), "", 1,
|
||||||
|
|
@ -4095,7 +4083,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
|
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
System.out.println("无库存记录");
|
logger.info("无库存记录");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4153,6 +4141,8 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
+ " and l.type='存储点' and l.status='" + WarehouseAreaStatus.FREE + "' "
|
+ " and l.type='存储点' and l.status='" + WarehouseAreaStatus.FREE + "' "
|
||||||
+ " and l.disabled=false and l.id not in("+sql4+")";
|
+ " and l.disabled=false and l.id not in("+sql4+")";
|
||||||
|
|
||||||
|
|
||||||
|
String px_sql = " order by l.gdType asc ";
|
||||||
//库位高度
|
//库位高度
|
||||||
if (st.getGdType().equals(TranType.gd_d)) {
|
if (st.getGdType().equals(TranType.gd_d)) {
|
||||||
sql += " and 1=1";
|
sql += " and 1=1";
|
||||||
|
|
@ -4162,16 +4152,9 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
sql += " and l.gdType =3";
|
sql += " and l.gdType =3";
|
||||||
}
|
}
|
||||||
if (st!=null) {
|
if (st!=null) {
|
||||||
/**容器已经在仓库内 只能 做单巷道移位 查询同巷道库位*/
|
/**容器已经在仓库内 只能 做单巷道移位 查询同巷道库位*/
|
||||||
sql+=" and l.agvZone='"+st.getAgvZone()+"'";
|
sql+=" and l.agvZone='"+st.getAgvZone()+"'";
|
||||||
}
|
}
|
||||||
String px_sql = " order by l.gdType asc,l.sqType asc ";
|
|
||||||
//深浅位
|
|
||||||
// if (st.getRdType().equals(TranType.rd_g)) {
|
|
||||||
// px_sql += " ,l.sqType desc";
|
|
||||||
// } else {
|
|
||||||
// px_sql += " ,l.sqType asc";
|
|
||||||
// }
|
|
||||||
//判断热度值
|
//判断热度值
|
||||||
if (st.getRdType().equals(TranType.rd_d)) {
|
if (st.getRdType().equals(TranType.rd_d)) {
|
||||||
px_sql += " ,l.rdType desc";
|
px_sql += " ,l.rdType desc";
|
||||||
|
|
@ -4180,7 +4163,12 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
} else if (st.getRdType().equals(TranType.rd_g)) {
|
} else if (st.getRdType().equals(TranType.rd_g)) {
|
||||||
px_sql += " , l.rdType asc";
|
px_sql += " , l.rdType asc";
|
||||||
}
|
}
|
||||||
|
//深浅位
|
||||||
|
if (st.getRdType().equals(TranType.rd_g)) {
|
||||||
|
px_sql += " ,l.sqType desc";
|
||||||
|
} else {
|
||||||
|
px_sql += " ,l.sqType asc";
|
||||||
|
}
|
||||||
px_sql += " ,substring(l.code,4,2) asc,substring(l.code,7,2) desc ";
|
px_sql += " ,substring(l.code,4,2) asc,substring(l.code,7,2) desc ";
|
||||||
List<LocationStorage> ls =new ArrayList<LocationStorage>();
|
List<LocationStorage> ls =new ArrayList<LocationStorage>();
|
||||||
String hql1="";
|
String hql1="";
|
||||||
|
|
@ -4221,17 +4209,17 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
public void autoInLibraryTask() {
|
public void autoInLibraryTask() {
|
||||||
//查询入库任务
|
//查询入库任务
|
||||||
List<LibraryTaskView1> libraryTaskView1s2 = commonDao.findByQuery(" from LibraryTaskView1 ltask "
|
List<LibraryTaskView1> libraryTaskView1s2 = commonDao.findByQuery(" from LibraryTaskView1 ltask "
|
||||||
+ " where ltask.classification in ('入库','入空托') ");
|
+ " where ltask.classification='入库' ");
|
||||||
for(LibraryTaskView1 libraryTaskView2 : libraryTaskView1s2) {
|
for(LibraryTaskView1 libraryTaskView2 : libraryTaskView1s2) {
|
||||||
List<LibraryTask> libraryTasks2 = commonDao.findByQuery(" from LibraryTask ltask where "
|
List<LibraryTask> libraryTasks2 = commonDao.findByQuery(" from LibraryTask ltask where "
|
||||||
+ " ltask.status='"+STATUS.UNAUDITED+"' and ltask.classification in ('入库','入空托') "
|
+ " ltask.status='"+STATUS.UNAUDITED+"' and ltask.classification='入库' "
|
||||||
+ " and ltask.relationCode='"+libraryTaskView2.getRelationCode()+"'"
|
+ " and ltask.relationCode='"+libraryTaskView2.getRelationCode()+"'"
|
||||||
+ " order by ltask.seq asc");
|
+ " order by ltask.seq asc");
|
||||||
if(libraryTasks2.size()>0) {
|
if(libraryTasks2.size()>0) {
|
||||||
LibraryTask libraryTask=libraryTasks2.get(0);
|
LibraryTask libraryTask=libraryTasks2.get(0);
|
||||||
|
|
||||||
if(libraryTask.getClassification()!=null&&
|
if(libraryTask.getClassification()!=null&&
|
||||||
(libraryTask.getClassification().equals("入库")||libraryTask.getClassification().equals("入空托"))) {
|
libraryTask.getClassification().equals("入库")) {
|
||||||
|
|
||||||
for (int i = 0; i < libraryTasks2.size(); i++) {
|
for (int i = 0; i < libraryTasks2.size(); i++) {
|
||||||
LibraryTask libraryTask1=libraryTasks2.get(i);
|
LibraryTask libraryTask1=libraryTasks2.get(i);
|
||||||
|
|
@ -4528,8 +4516,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
}
|
}
|
||||||
//下发出库、移库任务
|
//下发出库、移库任务
|
||||||
if(libraryTask.getClassification()!=null&&
|
if(libraryTask.getClassification()!=null&&
|
||||||
!libraryTask.getClassification().equals("入库")&&
|
!libraryTask.getClassification().equals("入库")) {
|
||||||
!libraryTask.getClassification().equals("入空托")) {
|
|
||||||
//查询托盘是否有正在执行的任务
|
//查询托盘是否有正在执行的任务
|
||||||
List<LibraryTask> lids= commonDao.findByQuery(" from LibraryTask ltask where "
|
List<LibraryTask> lids= commonDao.findByQuery(" from LibraryTask ltask where "
|
||||||
+ " ltask.status in('ATCALL','ATWAIT','ATWORK','ATPICK') "
|
+ " ltask.status in('ATCALL','ATWAIT','ATWORK','ATPICK') "
|
||||||
|
|
@ -4786,8 +4773,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(libraryTask.getClassification()!=null&&
|
else if(libraryTask.getClassification()!=null&&
|
||||||
(libraryTask.getClassification().equals("入库")
|
libraryTask.getClassification().equals("入库")) {
|
||||||
||libraryTask.getClassification().equals("入空托"))) {
|
|
||||||
|
|
||||||
boolean flag = agvTaskManager.sendLibraryTask(libraryTask);//下发任务
|
boolean flag = agvTaskManager.sendLibraryTask(libraryTask);//下发任务
|
||||||
if (flag) {
|
if (flag) {
|
||||||
|
|
@ -5336,17 +5322,31 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
//跳除巷道循环
|
//跳除巷道循环
|
||||||
boolean xh=false;
|
boolean xh=false;
|
||||||
//出库任务按巷道下发,每个巷道只有一个任务执行
|
//出库任务按巷道下发,每个巷道只有一个任务执行
|
||||||
|
|
||||||
|
|
||||||
|
// List<LibraryTaskView1> libraryTaskView1s = commonDao.findByQuery(" from LibraryTaskView1 ltask where ltask.agvZone='"+y+"'"
|
||||||
|
// + " and ltask.classification not in('入空托','入库') and ltask.toCellCode='"+y1+"'"
|
||||||
|
// + " order by ltask.relatedBill4 desc,ltask.relationCode asc ");
|
||||||
|
// for (LibraryTaskView1 libraryTaskView1 : libraryTaskView1s) {
|
||||||
//查询关联任务
|
//查询关联任务
|
||||||
//查询移库和出库的任务
|
//查询移库和出库的任务
|
||||||
List<LibraryTask> libraryTasks = commonDao.findByQuery(" from LibraryTask ltask where "
|
List<LibraryTask> libraryTasks = commonDao.findByQuery(" from LibraryTask ltask where "
|
||||||
+ " ltask.status='"+STATUS.UNAUDITED+"' and ltask.relatedBill5='"+y+"' "
|
+ " ltask.status='"+STATUS.UNAUDITED+"' and ltask.relatedBill5='"+y+"' "
|
||||||
|
// + " and ltask.relationCode='"+libraryTaskView1.getRelationCode()+"'"
|
||||||
+ " and ltask.classification not in('入空托','入库') and ltask.toCellCode='"+y1+"'"
|
+ " and ltask.classification not in('入空托','入库') and ltask.toCellCode='"+y1+"'"
|
||||||
+ " order by ltask.relatedBill4 desc,ltask.relationCode asc,ltask.seq asc");
|
+ " order by ltask.relatedBill4 desc,ltask.relationCode asc,ltask.seq asc");
|
||||||
|
// for(libraryTasks.size()>0) {
|
||||||
|
// LibraryTask libraryTask=libraryTasks.get(0);
|
||||||
for(LibraryTask libraryTask:libraryTasks) {
|
for(LibraryTask libraryTask:libraryTasks) {
|
||||||
//查询任务对应的容器
|
//查询任务对应的容器
|
||||||
List<Stock> sls= commonDao.findByQuery(" From Stock s where s.LP='"+libraryTask.getBarcode()+"' ");
|
List<Stock> sls= commonDao.findByQuery(" From Stock s where s.LP='"+libraryTask.getBarcode()+"' ");
|
||||||
|
|
||||||
//查询出库任务起点
|
//查询出库任务起点
|
||||||
|
// List<LocationStorage> locst=commonDao.findByQuery(" from LocationStorage l where l.code='"+libraryTask.getFromCellCode()+"'"
|
||||||
|
// + " and l.warehouseArea.id=1766 ");
|
||||||
|
// if(locst.size()>0) {
|
||||||
|
// LocationStorage lsa=locst.get(0);
|
||||||
|
|
||||||
LocationStorage lssds=null;//出库托盘的浅位单浅位点位
|
LocationStorage lssds=null;//出库托盘的浅位单浅位点位
|
||||||
if(sls.size()>0&&sls.get(0).getLocationStorage()!=null) {
|
if(sls.size()>0&&sls.get(0).getLocationStorage()!=null) {
|
||||||
Stock st=sls.get(0);
|
Stock st=sls.get(0);
|
||||||
|
|
@ -5429,6 +5429,8 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
seq=ltz.getSeq()+1;
|
seq=ltz.getSeq()+1;
|
||||||
relationCode=ltz.getRelationCode();
|
relationCode=ltz.getRelationCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 判断浅位有没有托盘
|
// 判断浅位有没有托盘
|
||||||
List<Stock> sts1 = this.commonDao
|
List<Stock> sts1 = this.commonDao
|
||||||
.findByQuery("from Stock s where s.locationStorage.sqType=1 and s.locationStorage.relevanceCode='"
|
.findByQuery("from Stock s where s.locationStorage.sqType=1 and s.locationStorage.relevanceCode='"
|
||||||
|
|
@ -5460,10 +5462,12 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
commonDao.store(libraryTask);
|
commonDao.store(libraryTask);
|
||||||
listTasks.add(libraryTask);
|
listTasks.add(libraryTask);
|
||||||
xh=true;
|
xh=true;
|
||||||
// break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
//浅库位托盘没任务
|
//浅库位托盘没任务
|
||||||
LocationStorage lq2 ;
|
LocationStorage lq2 ;
|
||||||
// 搬运到其他
|
// 搬运到其他
|
||||||
|
|
@ -5513,8 +5517,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
libraryTask.setRelationCode(t1.getRelationCode());//
|
libraryTask.setRelationCode(t1.getRelationCode());//
|
||||||
commonDao.store(libraryTask);
|
commonDao.store(libraryTask);
|
||||||
listTasks.add(libraryTask);
|
listTasks.add(libraryTask);
|
||||||
xh=true;
|
|
||||||
// break;
|
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
//目标位置浅位托盘,没有任务,产生移位到深位的任务,再将移位托盘放在浅位。
|
//目标位置浅位托盘,没有任务,产生移位到深位的任务,再将移位托盘放在浅位。
|
||||||
|
|
@ -5537,8 +5540,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
libraryTask.setRelationCode(t2.getRelationCode());//
|
libraryTask.setRelationCode(t2.getRelationCode());//
|
||||||
commonDao.store(libraryTask);
|
commonDao.store(libraryTask);
|
||||||
listTasks.add(libraryTask);
|
listTasks.add(libraryTask);
|
||||||
xh=true;
|
|
||||||
// break;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
|
|
@ -5554,8 +5556,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
libraryTask.setRelationCode(t1.getRelationCode());//
|
libraryTask.setRelationCode(t1.getRelationCode());//
|
||||||
commonDao.store(libraryTask);
|
commonDao.store(libraryTask);
|
||||||
listTasks.add(libraryTask);
|
listTasks.add(libraryTask);
|
||||||
xh=true;
|
|
||||||
// break;
|
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
|
|
@ -5570,13 +5571,20 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
libraryTask.setRelationCode(t1.getRelationCode());
|
libraryTask.setRelationCode(t1.getRelationCode());
|
||||||
commonDao.store(libraryTask);
|
commonDao.store(libraryTask);
|
||||||
listTasks.add(libraryTask);
|
listTasks.add(libraryTask);
|
||||||
xh=true;
|
|
||||||
// break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
//浅位直接下发任务
|
||||||
|
// boolean flag = agvTaskManager.sendLibraryTask(libraryTask);//下发任务
|
||||||
|
// interfaceManager.storeInterfaceLog("立库出库任务", libraryTask.getId()+libraryTask.getBarcode(), "wms", "library", flag+"",
|
||||||
|
// interfaceReqManager.jsonLibrayTask(libraryTask));
|
||||||
|
//
|
||||||
|
// if (flag) {
|
||||||
|
// libraryTask.setBeIssue(1);
|
||||||
|
// libraryTask.setStatus(STATUS.ATCALL);//料箱到传送带
|
||||||
|
// commonDao.store(libraryTask);
|
||||||
|
// }
|
||||||
xh=true;
|
xh=true;
|
||||||
listTasks.add(libraryTask);
|
listTasks.add(libraryTask);
|
||||||
break;
|
break;
|
||||||
|
|
@ -5591,6 +5599,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// }
|
||||||
return listTasks;
|
return listTasks;
|
||||||
}
|
}
|
||||||
//下发WCS立库任务
|
//下发WCS立库任务
|
||||||
|
|
@ -5598,8 +5607,8 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
||||||
for(LibraryTask slt:listTasks) {
|
for(LibraryTask slt:listTasks) {
|
||||||
if(slt.getStatus().equals(STATUS.UNAUDITED)) {
|
if(slt.getStatus().equals(STATUS.UNAUDITED)) {
|
||||||
boolean flag2 = agvTaskManager.sendLibraryTask(slt);//下发任务
|
boolean flag2 = agvTaskManager.sendLibraryTask(slt);//下发任务
|
||||||
// interfaceManager.storeInterfaceLog("立库出库任务", slt.getId()+slt.getBarcode(), "wms", "library", flag2+"",
|
interfaceManager.storeInterfaceLog("立库出库任务", slt.getId()+slt.getBarcode(), "wms", "library", flag2+"",
|
||||||
// interfaceReqManager.jsonLibrayTask(slt));
|
interfaceReqManager.jsonLibrayTask(slt));
|
||||||
if (flag2) {
|
if (flag2) {
|
||||||
slt.setStatus(STATUS.ATCALL);//料箱到传送带
|
slt.setStatus(STATUS.ATCALL);//料箱到传送带
|
||||||
slt.setBeIssue(1);
|
slt.setBeIssue(1);
|
||||||
|
|
|
||||||
|
|
@ -160,6 +160,7 @@ import com.mysql.jdbc.Connection;
|
||||||
import com.mysql.jdbc.Statement;
|
import com.mysql.jdbc.Statement;
|
||||||
import com.sun.mail.imap.protocol.Status;
|
import com.sun.mail.imap.protocol.Status;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
/**
|
/**
|
||||||
* @author dev
|
* @author dev
|
||||||
*
|
*
|
||||||
|
|
@ -180,7 +181,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
protected final String lotparam = "inventory.itemKeyInventory.itemKey.lotInfo.";
|
protected final String lotparam = "inventory.itemKeyInventory.itemKey.lotInfo.";
|
||||||
protected final MoveDocManager moveDocManager;
|
protected final MoveDocManager moveDocManager;
|
||||||
protected final CountPlanManager countPlanManager;
|
protected final CountPlanManager countPlanManager;
|
||||||
|
private static Logger logger = Logger.getLogger(DefaultPickTicketManager.class);
|
||||||
public DefaultPickTicketManager(ItemManager manager, InventoryManager manager2, AutoAllocator autoAllocator,
|
public DefaultPickTicketManager(ItemManager manager, InventoryManager manager2, AutoAllocator autoAllocator,
|
||||||
BussinessCodeManager manager3, InterfaceLogManager manager4, JdbcManager jdbcManager,
|
BussinessCodeManager manager3, InterfaceLogManager manager4, JdbcManager jdbcManager,
|
||||||
InterfaceManager interfaceManager, InterfaceReqManager interfaceReqManager, AgvTaskManager agvTaskManager,
|
InterfaceManager interfaceManager, InterfaceReqManager interfaceReqManager, AgvTaskManager agvTaskManager,
|
||||||
|
|
@ -492,7 +493,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
try {
|
try {
|
||||||
commonDao.store(pickTicket);
|
commonDao.store(pickTicket);
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
// System.out.println("pickTicket保存"+e.getMessage());
|
// logger.info("pickTicket保存"+e.getMessage());
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
commonDao.delete(pickTicket);
|
commonDao.delete(pickTicket);
|
||||||
|
|
@ -1294,7 +1295,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
interfaceReqManager.wmsSapZhuantaihuichuang(listtask, 0,"",1);//状态回传
|
interfaceReqManager.wmsSapZhuantaihuichuang(listtask, 0,"",1);//状态回传
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
System.out.println(pt.getCode()+"自动分配,无回传状态");
|
logger.info(pt.getCode()+"自动分配,无回传状态");
|
||||||
}
|
}
|
||||||
|
|
||||||
shuaxinPick(pt);//刷新订单
|
shuaxinPick(pt);//刷新订单
|
||||||
|
|
@ -2393,7 +2394,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
log.getStorageDate(), log.getSOI(), task.getWarehouseArea(), task.getBarCode());
|
log.getStorageDate(), log.getSOI(), task.getWarehouseArea(), task.getBarCode());
|
||||||
inventory.setQuantity(DoubleUtils.format4F(inventory.getQuantity() + movedQuantity));
|
inventory.setQuantity(DoubleUtils.format4F(inventory.getQuantity() + movedQuantity));
|
||||||
inventory.setQtyOfMasterPack(DoubleUtils.format4F(inventory.getQuantity()));
|
inventory.setQtyOfMasterPack(DoubleUtils.format4F(inventory.getQuantity()));
|
||||||
System.out.println(inventory.getQuantity());
|
logger.info(inventory.getQuantity());
|
||||||
if (inventory.isNew()) {
|
if (inventory.isNew()) {
|
||||||
ik.getInventories().add(inventory);
|
ik.getInventories().add(inventory);
|
||||||
}
|
}
|
||||||
|
|
@ -2877,7 +2878,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
task.setPlanQuantityMU(allocateQty);
|
task.setPlanQuantityMU(allocateQty);
|
||||||
task.setInventoryStatus(inventory.getStatus());
|
task.setInventoryStatus(inventory.getStatus());
|
||||||
task.setCreateTime(new Date());
|
task.setCreateTime(new Date());
|
||||||
task.setStrBill10(inventory.getStatuss());
|
|
||||||
task.setWarehouseArea(inventory.getLocation().getZone());
|
task.setWarehouseArea(inventory.getLocation().getZone());
|
||||||
task.setBarCode(inventory.getBarCode());
|
task.setBarCode(inventory.getBarCode());
|
||||||
task.setSrcLP(inventory.getLocation().getStock());
|
task.setSrcLP(inventory.getLocation().getStock());
|
||||||
|
|
@ -3411,7 +3412,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
PickTicketDetail pd = commonDao.load(PickTicketDetail.class, id);
|
PickTicketDetail pd = commonDao.load(PickTicketDetail.class, id);
|
||||||
String a = interfaceUtil.aa(pd);
|
String a = interfaceUtil.aa(pd);
|
||||||
interfaceUtil.doSslPost("http://192.168.1.171:80/trilink/mes/outboundResp", a);
|
interfaceUtil.doSslPost("http://192.168.1.171:80/trilink/mes/outboundResp", a);
|
||||||
// System.out.println("发送数据:"+a);
|
// logger.info("发送数据:"+a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3716,7 +3717,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
int y = jdbcManager.receiveQDCK(code);
|
int y = jdbcManager.receiveQDCK(code);
|
||||||
int i = jdbcManager.receiveQDCKD(code);
|
int i = jdbcManager.receiveQDCKD(code);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
System.out.println("成功");
|
logger.info("成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3726,7 +3727,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
PickTicket pickTicket = commonDao.load(PickTicket.class, id);
|
PickTicket pickTicket = commonDao.load(PickTicket.class, id);
|
||||||
String param = "";
|
String param = "";
|
||||||
interfaceManager.doSslPost("", param);
|
interfaceManager.doSslPost("", param);
|
||||||
System.out.println(param);
|
logger.info(param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3735,7 +3736,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
// String str=itemManager.synchroPick(id);
|
// String str=itemManager.synchroPick(id);
|
||||||
String param = "";
|
String param = "";
|
||||||
System.out.println(param);
|
logger.info(param);
|
||||||
interfaceManager.doSslPost("", param);
|
interfaceManager.doSslPost("", param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3743,7 +3744,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
public void synchroItem(List<Long> ids) {
|
public void synchroItem(List<Long> ids) {
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
String param = "";
|
String param = "";
|
||||||
System.out.println(param);
|
logger.info(param);
|
||||||
interfaceManager.doSslPost("", param);
|
interfaceManager.doSslPost("", param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3754,7 +3755,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
Task t = this.load(Task.class, id);
|
Task t = this.load(Task.class, id);
|
||||||
PickTicketDetail ptd = t.getPickTicketDetail();
|
PickTicketDetail ptd = t.getPickTicketDetail();
|
||||||
String param = "";
|
String param = "";
|
||||||
System.out.println(param);
|
logger.info(param);
|
||||||
interfaceManager.doSslPost("", param);
|
interfaceManager.doSslPost("", param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4139,11 +4140,6 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
}else {
|
}else {
|
||||||
invsql += " AND inv.itemKey.lotInfo.propD2 is null ";
|
invsql += " AND inv.itemKey.lotInfo.propD2 is null ";
|
||||||
}
|
}
|
||||||
if(task.getStrBill10() != null && task.getStrBill10().length() > 0) {
|
|
||||||
invsql += " AND inv.statuss='"+task.getStrBill10()+"' ";
|
|
||||||
}else {
|
|
||||||
invsql += " AND (inv.statuss is null or inv.statuss='' )";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
invsql+=" order by inv.queuedQuantity desc ";
|
invsql+=" order by inv.queuedQuantity desc ";
|
||||||
List<Inventory> invs = commonDao.findByQuery(invsql);
|
List<Inventory> invs = commonDao.findByQuery(invsql);
|
||||||
|
|
@ -4176,7 +4172,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (srcInv == null) {
|
if (srcInv == null) {
|
||||||
System.out.println("未找到库存记录!");
|
logger.info("未找到库存记录!");
|
||||||
} else {
|
} else {
|
||||||
task.setDstLoc(dstLoc);
|
task.setDstLoc(dstLoc);
|
||||||
task.setDstLP(dstLP);
|
task.setDstLP(dstLP);
|
||||||
|
|
@ -4432,7 +4428,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
//共拣货数
|
//共拣货数
|
||||||
List<Long> tasks2 = commonDao.findByQuery("select p.id from Task p where p.billCode='" + task.getBillCode()
|
List<Long> tasks2 = commonDao.findByQuery("select p.id from Task p where p.billCode='" + task.getBillCode()
|
||||||
+ "' and p.popular<=0 " + " and p.planQuantity>0 and p.pickTicketDetail.pickTicket.id=" + pt.getId());
|
+ "' and p.popular<=0 " + " and p.planQuantity>0 and p.pickTicketDetail.pickTicket.id=" + pt.getId());
|
||||||
// System.out.println(tasks1.size() + "-----" + tasks2.size());
|
// logger.info(tasks1.size() + "-----" + tasks2.size());
|
||||||
// 是否回传SAP,其他出库不出WMS仓,出库完成不用回传,自动生成入库单,入库完成后在回传。
|
// 是否回传SAP,其他出库不出WMS仓,出库完成不用回传,自动生成入库单,入库完成后在回传。
|
||||||
if (tasks1.size() > 0 && tasks1.size() == tasks2.size()) {
|
if (tasks1.size() > 0 && tasks1.size() == tasks2.size()) {
|
||||||
if (bt.getCode().equals("YINVENTORY")) {
|
if (bt.getCode().equals("YINVENTORY")) {
|
||||||
|
|
@ -4548,15 +4544,6 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
newTask.setWorker2(t.getWorker2());
|
newTask.setWorker2(t.getWorker2());
|
||||||
newTask.setDateBill1(t.getDateBill1());
|
newTask.setDateBill1(t.getDateBill1());
|
||||||
newTask.setStrBill1(t.getStrBill1());
|
newTask.setStrBill1(t.getStrBill1());
|
||||||
newTask.setStrBill2(t.getStrBill2());
|
|
||||||
newTask.setStrBill3(t.getStrBill3());
|
|
||||||
newTask.setStrBill4(t.getStrBill4());
|
|
||||||
newTask.setStrBill5(t.getStrBill5());
|
|
||||||
newTask.setStrBill6(t.getStrBill6());
|
|
||||||
newTask.setStrBill7(t.getStrBill7());
|
|
||||||
newTask.setStrBill8(t.getStrBill8());
|
|
||||||
newTask.setStrBill9(t.getStrBill9());
|
|
||||||
newTask.setStrBill10(t.getStrBill10());
|
|
||||||
newTask.setStrBill3(t.getStrBill3());
|
newTask.setStrBill3(t.getStrBill3());
|
||||||
commonDao.store(newTask);
|
commonDao.store(newTask);
|
||||||
t.setPlanQuantity(pickedQuantity);
|
t.setPlanQuantity(pickedQuantity);
|
||||||
|
|
@ -4648,7 +4635,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
agvTask.setStatus(STATUS.RECEIVED);
|
agvTask.setStatus(STATUS.RECEIVED);
|
||||||
agvTask.setMovedQuantityMU(agvTask.getPlanQuantity());
|
agvTask.setMovedQuantityMU(agvTask.getPlanQuantity());
|
||||||
commonDao.store(agvTask);
|
commonDao.store(agvTask);
|
||||||
System.out.printf(agvTask.getRobotJobId() + "返库成功~" + "\n");
|
logger.info(agvTask.getRobotJobId() + "返库成功~" + "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4708,7 +4695,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
for (TaskLog tl : TaskLogs) {
|
for (TaskLog tl : TaskLogs) {
|
||||||
// 查询需要出库的库存
|
// 查询需要出库的库存
|
||||||
if (tl.getMovedQuantity() == tl.getShipQuantity()) {
|
if (tl.getMovedQuantity() == tl.getShipQuantity()) {
|
||||||
System.out.println("已发运!");
|
logger.info("已发运!");
|
||||||
} else {
|
} else {
|
||||||
ItemKey ik = this.load(ItemKey.class, tl.getItemKey().getId());
|
ItemKey ik = this.load(ItemKey.class, tl.getItemKey().getId());
|
||||||
Item item = this.load(Item.class, ik.getItem().getId());
|
Item item = this.load(Item.class, ik.getItem().getId());
|
||||||
|
|
@ -4808,7 +4795,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
for (TaskLog tl : TaskLogs) {
|
for (TaskLog tl : TaskLogs) {
|
||||||
// 查询需要出库的库存
|
// 查询需要出库的库存
|
||||||
if (tl.getMovedQuantity() == tl.getShipQuantity()) {
|
if (tl.getMovedQuantity() == tl.getShipQuantity()) {
|
||||||
System.out.println("已发运!");
|
logger.info("已发运!");
|
||||||
} else {
|
} else {
|
||||||
ItemKey ik = this.load(ItemKey.class, tl.getItemKey().getId());
|
ItemKey ik = this.load(ItemKey.class, tl.getItemKey().getId());
|
||||||
Item item = this.load(Item.class, ik.getItem().getId());
|
Item item = this.load(Item.class, ik.getItem().getId());
|
||||||
|
|
@ -4886,7 +4873,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
for (TaskLog tl : TaskLogs) {
|
for (TaskLog tl : TaskLogs) {
|
||||||
// 查询需要出库的库存
|
// 查询需要出库的库存
|
||||||
if (tl.getMovedQuantity() == tl.getShipQuantity()) {
|
if (tl.getMovedQuantity() == tl.getShipQuantity()) {
|
||||||
System.out.println("已发运!");
|
logger.info("已发运!");
|
||||||
} else {
|
} else {
|
||||||
ItemKey ik = this.load(ItemKey.class, tl.getItemKey().getId());
|
ItemKey ik = this.load(ItemKey.class, tl.getItemKey().getId());
|
||||||
Item item = this.load(Item.class, ik.getItem().getId());
|
Item item = this.load(Item.class, ik.getItem().getId());
|
||||||
|
|
@ -5050,7 +5037,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// long etime2 = System.currentTimeMillis();
|
// long etime2 = System.currentTimeMillis();
|
||||||
// System.out.printf("拍灯取料时间:" + (etime2 - stime2));
|
// logger.infof("拍灯取料时间:" + (etime2 - stime2));
|
||||||
// } catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
// message = e.getMessage();
|
// message = e.getMessage();
|
||||||
// }
|
// }
|
||||||
|
|
@ -5096,7 +5083,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
} else if (pt.getShipToName().equals("ONLINE_STATION010")) {
|
} else if (pt.getShipToName().equals("ONLINE_STATION010")) {
|
||||||
agv = "AGV10";
|
agv = "AGV10";
|
||||||
}
|
}
|
||||||
System.out.printf("AGV请求:" + sdf.format(new Date()) + "\n");
|
logger.info("AGV请求:" + sdf.format(new Date()) + "\n");
|
||||||
new DefaultWDTManager(pt.getCode(), agv, 0, Integer.parseInt(pt.getExecutePlanNo()));
|
new DefaultWDTManager(pt.getCode(), agv, 0, Integer.parseInt(pt.getExecutePlanNo()));
|
||||||
String result = DefaultClient.bodys;
|
String result = DefaultClient.bodys;
|
||||||
JSONObject json = JSONObject.fromObject(result);
|
JSONObject json = JSONObject.fromObject(result);
|
||||||
|
|
@ -5105,9 +5092,9 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
String message = json.has("message") ? json.getString("message") : "";
|
String message = json.has("message") ? json.getString("message") : "";
|
||||||
jdbcManager.saveExceptionLog(pt.getCode() + "," + message + "," + pt.getExecutePlanNo());
|
jdbcManager.saveExceptionLog(pt.getCode() + "," + message + "," + pt.getExecutePlanNo());
|
||||||
}
|
}
|
||||||
System.out.printf("旺店通反馈:" + sdf.format(new Date()) + "\n");
|
logger.info("旺店通反馈:" + sdf.format(new Date()) + "\n");
|
||||||
long etime1 = System.currentTimeMillis();
|
long etime1 = System.currentTimeMillis();
|
||||||
System.out.printf("出库回传面单打印:" + (etime1 - stime1) + "\n");
|
logger.info("出库回传面单打印:" + (etime1 - stime1) + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -5395,7 +5382,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
for (PickTicket pt : PickTickets) {
|
for (PickTicket pt : PickTickets) {
|
||||||
i++;
|
i++;
|
||||||
ShipConfirm(pt.getId(), 1080);
|
ShipConfirm(pt.getId(), 1080);
|
||||||
System.out.println(i);
|
logger.info(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5535,7 +5522,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
jsonobj.put("ReturnSet", ReturnSet);
|
jsonobj.put("ReturnSet", ReturnSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println(jsonobj.toString());
|
logger.info(jsonobj.toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5877,7 +5864,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
|
|
||||||
public void huichuandItems(List<Long> ids) {
|
public void huichuandItems(List<Long> ids) {
|
||||||
// ids =commonDao.findByQuery("select id from Item i where i.volume>0 ");
|
// ids =commonDao.findByQuery("select id from Item i where i.volume>0 ");
|
||||||
System.out.println("行数" + ids.size());
|
logger.info("行数" + ids.size());
|
||||||
huichuanItems(ids);
|
huichuanItems(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5981,7 +5968,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
|
|
||||||
|
|
||||||
public void addasn(List<Long> ids) {
|
public void addasn(List<Long> ids) {
|
||||||
System.out.println("生成入库单");
|
logger.info("生成入库单");
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
PickTicket pickTicket = commonDao.load(PickTicket.class, id);
|
PickTicket pickTicket = commonDao.load(PickTicket.class, id);
|
||||||
if (pickTicket.getSourceType().equals("311")||pickTicket.getSourceType().equals("301")) {
|
if (pickTicket.getSourceType().equals("311")||pickTicket.getSourceType().equals("301")) {
|
||||||
|
|
@ -5992,7 +5979,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
boolean adnnd = false;
|
boolean adnnd = false;
|
||||||
int i = 1;
|
int i = 1;
|
||||||
ASN asn = null;
|
ASN asn = null;
|
||||||
// System.out.println(tas.size() + "----拣货行数");
|
// logger.info(tas.size() + "----拣货行数");
|
||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
for (Task t : tas) {
|
for (Task t : tas) {
|
||||||
PickTicketDetail ptd = commonDao.load(PickTicketDetail.class, t.getPickTicketDetail().getId());
|
PickTicketDetail ptd = commonDao.load(PickTicketDetail.class, t.getPickTicketDetail().getId());
|
||||||
|
|
@ -6022,7 +6009,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
commonDao.store(pickTicket);
|
commonDao.store(pickTicket);
|
||||||
list.add(pickTicket.getSourceId());
|
list.add(pickTicket.getSourceId());
|
||||||
i = 1;
|
i = 1;
|
||||||
System.out.println("创建成功" + t.getBillCode());
|
logger.info("创建成功" + t.getBillCode());
|
||||||
}
|
}
|
||||||
if (asn != null) {
|
if (asn != null) {
|
||||||
ASNDetail ad = EntityFactory.getEntity(ASNDetail.class);
|
ASNDetail ad = EntityFactory.getEntity(ASNDetail.class);
|
||||||
|
|
@ -6069,7 +6056,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
commonDao.store(ad);
|
commonDao.store(ad);
|
||||||
commonDao.store(asn);
|
commonDao.store(asn);
|
||||||
} else {
|
} else {
|
||||||
System.out.println("无入库单信息");
|
logger.info("无入库单信息");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -7033,13 +7020,13 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
if(workerId>0) {
|
if(workerId>0) {
|
||||||
Worker w = commonDao.load(Worker.class, workerId);
|
Worker w = commonDao.load(Worker.class, workerId);
|
||||||
task.setWorker1(w);
|
task.setWorker1(w);
|
||||||
|
if(task.getAgvStatus()==0) {
|
||||||
|
task.setAgvStatus(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(targetArea!=null&&targetArea.length()>0) {
|
if(targetArea!=null&&targetArea.length()>0) {
|
||||||
task.setEndRegion(targetArea);
|
task.setEndRegion(targetArea);
|
||||||
}
|
}
|
||||||
if(task.getAgvStatus()==0) {
|
|
||||||
task.setAgvStatus(1);
|
|
||||||
}
|
|
||||||
commonDao.store(task);
|
commonDao.store(task);
|
||||||
wmsOperationHisManager.storeOperationHis(task.getId(), task.getBillCode(), null, "", "拣货界面", "重新指定拣货人", null, null, 0,
|
wmsOperationHisManager.storeOperationHis(task.getId(), task.getBillCode(), null, "", "拣货界面", "重新指定拣货人", null, null, 0,
|
||||||
0, 0, 0, "", "WMS");
|
0, 0, 0, "", "WMS");
|
||||||
|
|
@ -7104,7 +7091,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
// 查询波次出库单
|
// 查询波次出库单
|
||||||
// List<Integer> waveDocs = commonDao
|
// List<Integer> waveDocs = commonDao
|
||||||
// .findByQuery("select w.id from WaveDoc w where w.status='PICKUP'");
|
// .findByQuery("select w.id from WaveDoc w where w.status='PICKUP'");
|
||||||
// System.out.println("工作站拣货任务下发:" + swName + " 开始分配播种格,剩余" + blank);
|
// logger.info("工作站拣货任务下发:" + swName + " 开始分配播种格,剩余" + blank);
|
||||||
if (true) {
|
if (true) {
|
||||||
// 查询所有含有task.agvStatus=1(未下发到工作站) 的子工单
|
// 查询所有含有task.agvStatus=1(未下发到工作站) 的子工单
|
||||||
List<Object> billListObjects = commonDao.findByQuery("select t.billCode from "
|
List<Object> billListObjects = commonDao.findByQuery("select t.billCode from "
|
||||||
|
|
@ -7113,7 +7100,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
+ " order by max(t.pickTicketDetail.SOI) desc,min(t.createTime) ,t.billCode ");
|
+ " order by max(t.pickTicketDetail.SOI) desc,min(t.createTime) ,t.billCode ");
|
||||||
|
|
||||||
String billCode = "";
|
String billCode = "";
|
||||||
// System.out.println("任务数"+billListObjects.size());
|
// logger.info("任务数"+billListObjects.size());
|
||||||
if (billListObjects.size() > 0) {
|
if (billListObjects.size() > 0) {
|
||||||
for (Object obj : billListObjects) {
|
for (Object obj : billListObjects) {
|
||||||
List<Task> taskLists = commonDao
|
List<Task> taskLists = commonDao
|
||||||
|
|
@ -7127,7 +7114,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
Location srcloc=commonDao.load(Location.class, tr.getSrcLoc().getId());
|
Location srcloc=commonDao.load(Location.class, tr.getSrcLoc().getId());
|
||||||
if(srcloc.getZone().getId()==1765L) {
|
if(srcloc.getZone().getId()==1765L) {
|
||||||
for(Object ogj:itemtypes) {
|
for(Object ogj:itemtypes) {
|
||||||
// System.out.println("大件+"+ogj.toString());
|
// logger.info("大件+"+ogj.toString());
|
||||||
if(ogj!=null&&ogj.toString().equals("大件")) {
|
if(ogj!=null&&ogj.toString().equals("大件")) {
|
||||||
dj=true;
|
dj=true;
|
||||||
}
|
}
|
||||||
|
|
@ -7204,7 +7191,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
List<AgvTask> agvTasks = commonDao.findByQuery(" from AgvTask agvTask " + " where agvTask.beIssue=true"
|
List<AgvTask> agvTasks = commonDao.findByQuery(" from AgvTask agvTask " + " where agvTask.beIssue=true"
|
||||||
+ " and agvTask.status='" + STATUS.ATWAIT + "' " + " and agvTask.type='AGV上料'");
|
+ " and agvTask.status='" + STATUS.ATWAIT + "' " + " and agvTask.type='AGV上料'");
|
||||||
for (AgvTask agvTask : agvTasks) {
|
for (AgvTask agvTask : agvTasks) {
|
||||||
System.out.println("AGV任务重送:" + agvTask.getRobotJobId());
|
logger.info("AGV任务重送:" + agvTask.getRobotJobId());
|
||||||
agvTaskManager.sendAgvTask(agvTask);
|
agvTaskManager.sendAgvTask(agvTask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -7238,7 +7225,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
// } else {
|
// } else {
|
||||||
barcode += "/" + ymd.format(new Date());
|
barcode += "/" + ymd.format(new Date());
|
||||||
// }
|
// }
|
||||||
System.out.println(barcode);
|
logger.info(barcode);
|
||||||
macs = printEquipment == null ? "" : printEquipment.getMac();
|
macs = printEquipment == null ? "" : printEquipment.getMac();
|
||||||
printName = printEquipment == null ? "" : printEquipment.getPrintName();
|
printName = printEquipment == null ? "" : printEquipment.getPrintName();
|
||||||
BillType bt = commonDao.load(BillType.class, pt.getBillType().getId());
|
BillType bt = commonDao.load(BillType.class, pt.getBillType().getId());
|
||||||
|
|
@ -7343,7 +7330,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
// 查询波次出库单
|
// 查询波次出库单
|
||||||
List<Integer> waveDocs = commonDao
|
List<Integer> waveDocs = commonDao
|
||||||
.findByQuery("select w.id from WaveDoc w where w.status='PICKUP'");
|
.findByQuery("select w.id from WaveDoc w where w.status='PICKUP'");
|
||||||
System.out.println("工作站拣货任务下发:" + swName + " 开始分配播种格,剩余" + blank);
|
logger.info("工作站拣货任务下发:" + swName + " 开始分配播种格,剩余" + blank);
|
||||||
if (true) {
|
if (true) {
|
||||||
// 查询所有含有task.agvStatus=1(未下发到工作站) 的子工单
|
// 查询所有含有task.agvStatus=1(未下发到工作站) 的子工单
|
||||||
List<Object> billListObjects = commonDao.findByQuery("select t.billCode from "
|
List<Object> billListObjects = commonDao.findByQuery("select t.billCode from "
|
||||||
|
|
@ -7402,13 +7389,13 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
sql += " order by cr.count_Code,l.CODE,cr.NEED_COUNT ";
|
sql += " order by cr.count_Code,l.CODE,cr.NEED_COUNT ";
|
||||||
Query query = session.createSQLQuery(sql);
|
Query query = session.createSQLQuery(sql);
|
||||||
List<Object> objs = query.list();// commonDao.findByQuery(sql);
|
List<Object> objs = query.list();// commonDao.findByQuery(sql);
|
||||||
System.out.println("盘点查询----" + objs.size());
|
logger.info("盘点查询----" + objs.size());
|
||||||
if (objs.size() > 0) {
|
if (objs.size() > 0) {
|
||||||
CountPlan c = null;
|
CountPlan c = null;
|
||||||
Worker w = commonDao.load(Worker.class, userId);
|
Worker w = commonDao.load(Worker.class, userId);
|
||||||
for (Object id : objs) {
|
for (Object id : objs) {
|
||||||
CountRecord cr = commonDao.load(CountRecord.class, Long.parseLong(id.toString()));
|
CountRecord cr = commonDao.load(CountRecord.class, Long.parseLong(id.toString()));
|
||||||
System.out.println("无盘点明细");
|
logger.info("无盘点明细");
|
||||||
c = cr.getCountPlan();
|
c = cr.getCountPlan();
|
||||||
cr.setCountQuantity(cr.getQuantity());
|
cr.setCountQuantity(cr.getQuantity());
|
||||||
cr.setNeedCount(true);
|
cr.setNeedCount(true);
|
||||||
|
|
@ -7429,7 +7416,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("盘点返库异常" + e.getMessage());
|
logger.info("盘点返库异常" + e.getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
session.close();
|
session.close();
|
||||||
}
|
}
|
||||||
|
|
@ -7471,7 +7458,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
|
|
||||||
public void addasnTask(List<Long> ids) {
|
public void addasnTask(List<Long> ids) {
|
||||||
|
|
||||||
// System.out.println("task生成入库单");
|
// logger.info("task生成入库单");
|
||||||
// List<Task> tas = commonDao.findByQuery(
|
// List<Task> tas = commonDao.findByQuery(
|
||||||
// "from Task t where t.pickTicketDetail.pickTicket.id=" + id + " order by t.billCode ");
|
// "from Task t where t.pickTicketDetail.pickTicket.id=" + id + " order by t.billCode ");
|
||||||
String ASNcode = "";
|
String ASNcode = "";
|
||||||
|
|
@ -7508,7 +7495,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
// commonDao.store(pickTicket);
|
// commonDao.store(pickTicket);
|
||||||
list.add(t.getBillCode());
|
list.add(t.getBillCode());
|
||||||
i = 1;
|
i = 1;
|
||||||
// System.out.println("创建成功" + t.getBillCode());
|
// logger.info("创建成功" + t.getBillCode());
|
||||||
}else {
|
}else {
|
||||||
asn=asns.get(0);
|
asn=asns.get(0);
|
||||||
}
|
}
|
||||||
|
|
@ -7540,7 +7527,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
commonDao.store(ad);
|
commonDao.store(ad);
|
||||||
commonDao.store(asn);
|
commonDao.store(asn);
|
||||||
} else {
|
} else {
|
||||||
System.out.println("无入库单信息");
|
logger.info("无入库单信息");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(asn!=null)
|
if(asn!=null)
|
||||||
|
|
@ -7819,7 +7806,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
Location loc = this.load(Location.class, task.getSrcLoc().getId());//原库位
|
Location loc = this.load(Location.class, task.getSrcLoc().getId());//原库位
|
||||||
WarehouseArea wa = this.load(WarehouseArea.class, loc.getZone().getId());
|
WarehouseArea wa = this.load(WarehouseArea.class, loc.getZone().getId());
|
||||||
if (task.getPlanQuantity() == task.getMovedQuantityMU()) {
|
if (task.getPlanQuantity() == task.getMovedQuantityMU()) {
|
||||||
System.out.println("已拣货");
|
logger.info("已拣货");
|
||||||
} else if ( task.getPlanQuantity() - task.getMovedQuantityMU()>0) {
|
} else if ( task.getPlanQuantity() - task.getMovedQuantityMU()>0) {
|
||||||
String invsql = " from Inventory inv "
|
String invsql = " from Inventory inv "
|
||||||
+ " where 1=1 "
|
+ " where 1=1 "
|
||||||
|
|
@ -7831,12 +7818,12 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
}
|
}
|
||||||
List<Inventory> invs = commonDao.findByQuery(invsql);
|
List<Inventory> invs = commonDao.findByQuery(invsql);
|
||||||
if (invs.size() == 0) {
|
if (invs.size() == 0) {
|
||||||
System.out.println("未找到库存记录!");
|
logger.info("未找到库存记录!");
|
||||||
}
|
}
|
||||||
Inventory srcInv = invs.get(0);
|
Inventory srcInv = invs.get(0);
|
||||||
if (srcInv == null) {
|
if (srcInv == null) {
|
||||||
task.setMovedQuantityMU(task.getMovedQuantityMU() + task.getPlanQuantity());
|
task.setMovedQuantityMU(task.getMovedQuantityMU() + task.getPlanQuantity());
|
||||||
System.out.println("未找到库存记录!");
|
logger.info("未找到库存记录!");
|
||||||
} else {
|
} else {
|
||||||
task.setDstLoc(dstLoc);
|
task.setDstLoc(dstLoc);
|
||||||
// 如果拣货数量等于库存占用数量则直接移位到目标库位上,否则生成新的需要出库的库存
|
// 如果拣货数量等于库存占用数量则直接移位到目标库位上,否则生成新的需要出库的库存
|
||||||
|
|
@ -7957,7 +7944,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
Inventory srcInv = invs.get(0);
|
Inventory srcInv = invs.get(0);
|
||||||
if (srcInv == null) {
|
if (srcInv == null) {
|
||||||
task.setMovedQuantityMU(task.getMovedQuantityMU() + task.getPlanQuantity());
|
task.setMovedQuantityMU(task.getMovedQuantityMU() + task.getPlanQuantity());
|
||||||
System.out.println("未找到库存记录!");
|
logger.info("未找到库存记录!");
|
||||||
} else {
|
} else {
|
||||||
task.setDstLoc(dstLoc);
|
task.setDstLoc(dstLoc);
|
||||||
// 如果拣货数量等于库存占用数量则直接移位到目标库位上,否则生成新的需要出库的库存
|
// 如果拣货数量等于库存占用数量则直接移位到目标库位上,否则生成新的需要出库的库存
|
||||||
|
|
@ -8235,7 +8222,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
obj.put("issueRemarks", issueRemarks);//下发备注(表头)
|
obj.put("issueRemarks", issueRemarks);//下发备注(表头)
|
||||||
obj.put("data", jsar.toString());
|
obj.put("data", jsar.toString());
|
||||||
content=obj.toString();
|
content=obj.toString();
|
||||||
System.out.println(content);
|
logger.info(content);
|
||||||
// 打印拣货标签
|
// 打印拣货标签
|
||||||
PrintTask pt2 = EntityFactory.getEntity(PrintTask.class);
|
PrintTask pt2 = EntityFactory.getEntity(PrintTask.class);
|
||||||
pt2.setType("4");// A4
|
pt2.setType("4");// A4
|
||||||
|
|
@ -8441,7 +8428,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
public void arrangeUrgent(List<Long> ids){
|
public void arrangeUrgent(List<Long> ids){
|
||||||
List<PickTicketDetail> list= commonDao.findByQuery(" from PickTicketDetail pd where pd.SOI in('X','U')"
|
List<PickTicketDetail> list= commonDao.findByQuery(" from PickTicketDetail pd where pd.SOI in('X','U')"
|
||||||
+ " AND pd.pickTicket.status='OPEN' and pd.strBill15 is null");
|
+ " AND pd.pickTicket.status='OPEN' and pd.strBill15 is null");
|
||||||
System.out.println(list.size());
|
logger.info(list.size());
|
||||||
for(PickTicketDetail pdt:list) {
|
for(PickTicketDetail pdt:list) {
|
||||||
String sql="select inv.id from Inventory inv where inv.itemKey.item.id="+pdt.getItem().getId()
|
String sql="select inv.id from Inventory inv where inv.itemKey.item.id="+pdt.getItem().getId()
|
||||||
+" and inv.status='已入库' ";
|
+" and inv.status='已入库' ";
|
||||||
|
|
@ -8503,9 +8490,9 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
waveDoc.setLkqQty(lkqQty);
|
waveDoc.setLkqQty(lkqQty);
|
||||||
waveDoc.setLxqQty(lxqQty);
|
waveDoc.setLxqQty(lxqQty);
|
||||||
waveDoc.setHjqQty(hjqQty);
|
waveDoc.setHjqQty(hjqQty);
|
||||||
waveDoc.setLogic(logic);
|
|
||||||
waveDoc.setLongtiem(longtiem);
|
waveDoc.setLongtiem(longtiem);
|
||||||
waveDoc.setApplyDoc(pickCode);
|
waveDoc.setApplyDoc(pickCode);
|
||||||
|
waveDoc.setLogic(logic);
|
||||||
waveDoc.setStartDate(date1);
|
waveDoc.setStartDate(date1);
|
||||||
waveDoc.setEndDate(date2);
|
waveDoc.setEndDate(date2);
|
||||||
waveDoc.setPrintCount(taskqty);//拆分行数
|
waveDoc.setPrintCount(taskqty);//拆分行数
|
||||||
|
|
@ -9672,15 +9659,15 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
for(Long tashid:tids1) {
|
for(Long tashid:tids1) {
|
||||||
countTasks.remove(tashid);
|
countTasks.remove(tashid);
|
||||||
}
|
}
|
||||||
// System.out.println("1"+countTasks.toString());
|
// logger.info("1"+countTasks.toString());
|
||||||
// System.out.println("2"+tids1.toString());
|
// logger.info("2"+tids1.toString());
|
||||||
if(countTasks.size()==0) {
|
if(countTasks.size()==0) {
|
||||||
jdwz="X";
|
jdwz="X";
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> tLocds2=commonDao.findByQuery(taskloc2);
|
List<String> tLocds2=commonDao.findByQuery(taskloc2);
|
||||||
fromaddress=tLocds2.get(0);
|
fromaddress=tLocds2.get(0);
|
||||||
System.out.println(jdwz);
|
logger.info(jdwz);
|
||||||
//位置回传
|
//位置回传
|
||||||
JSONObject bh= wmsSapWeizhihuichuang(tids1,fromaddress,dstLoc.getCode(),jdwz);
|
JSONObject bh= wmsSapWeizhihuichuang(tids1,fromaddress,dstLoc.getCode(),jdwz);
|
||||||
//更新task任务的信息
|
//更新task任务的信息
|
||||||
|
|
@ -9888,18 +9875,18 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
public void printPickTicketTask(Task ts, Long pId) {
|
public void printPickTicketTask(Task ts, Long pId) {
|
||||||
try {
|
try {
|
||||||
Task task=commonDao.load(Task.class, ts.getId());
|
Task task=commonDao.load(Task.class, ts.getId());
|
||||||
// System.out.println("A4---1");
|
// logger.info("A4---1");
|
||||||
PrintEquipment printEquipment = commonDao.load(PrintEquipment.class, pId);
|
PrintEquipment printEquipment = commonDao.load(PrintEquipment.class, pId);
|
||||||
if(printEquipment!=null) {
|
if(printEquipment!=null) {
|
||||||
String balls="";
|
String balls="";
|
||||||
// System.out.println("A4---2");
|
// logger.info("A4---2");
|
||||||
PickTicketDetail ptd1=commonDao.load(PickTicketDetail.class, task.getPickTicketDetail().getId());
|
PickTicketDetail ptd1=commonDao.load(PickTicketDetail.class, task.getPickTicketDetail().getId());
|
||||||
|
|
||||||
PickTicket pt = commonDao.load(PickTicket.class, ptd1.getPickTicket().getId());
|
PickTicket pt = commonDao.load(PickTicket.class, ptd1.getPickTicket().getId());
|
||||||
// System.out.println("A4---3");
|
// logger.info("A4---3");
|
||||||
List<Task> tasklist=commonDao.findByQuery(" from Task t where t.pickTicketDetail.pickTicket.id="+pt.getId()+
|
List<Task> tasklist=commonDao.findByQuery(" from Task t where t.pickTicketDetail.pickTicket.id="+pt.getId()+
|
||||||
" and t.planQuantity>0 order by t.billCode,t.pickTicketDetail.item.code ");
|
" and t.planQuantity>0 order by t.billCode,t.pickTicketDetail.item.code ");
|
||||||
// System.out.println("A4---3----1");
|
// logger.info("A4---3----1");
|
||||||
JSONArray jsar=new JSONArray();
|
JSONArray jsar=new JSONArray();
|
||||||
String content="";
|
String content="";
|
||||||
String macs = printEquipment.getMac();
|
String macs = printEquipment.getMac();
|
||||||
|
|
@ -9913,7 +9900,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
String handoverLocation=ptd1.getStrBill16();//交接位置(表头)
|
String handoverLocation=ptd1.getStrBill16();//交接位置(表头)
|
||||||
String issuedBy=task.getStrBill1();//下发人(表头)
|
String issuedBy=task.getStrBill1();//下发人(表头)
|
||||||
String issueRemarks=ptd1.getStrBill13();//下发备注(表头)
|
String issueRemarks=ptd1.getStrBill13();//下发备注(表头)
|
||||||
// System.out.println("A4---4");
|
// logger.info("A4---4");
|
||||||
JSONObject obj = new JSONObject();
|
JSONObject obj = new JSONObject();
|
||||||
obj.put("applicantNumber", applicantNumber);//申请号(表头)
|
obj.put("applicantNumber", applicantNumber);//申请号(表头)
|
||||||
obj.put("applicant", applicant);//申请人(表头)
|
obj.put("applicant", applicant);//申请人(表头)
|
||||||
|
|
@ -9923,7 +9910,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
obj.put("handoverLocation", handoverLocation);//交接位置(表头)
|
obj.put("handoverLocation", handoverLocation);//交接位置(表头)
|
||||||
obj.put("issuedBy", issuedBy);//下发人(表头)
|
obj.put("issuedBy", issuedBy);//下发人(表头)
|
||||||
obj.put("issueRemarks", issueRemarks);//下发备注(表头)
|
obj.put("issueRemarks", issueRemarks);//下发备注(表头)
|
||||||
// System.out.println("A4---5");
|
// logger.info("A4---5");
|
||||||
String strbill="";
|
String strbill="";
|
||||||
for (Task t :tasklist) {
|
for (Task t :tasklist) {
|
||||||
PickTicketDetail ptd = commonDao.load(PickTicketDetail.class, t.getPickTicketDetail().getId());
|
PickTicketDetail ptd = commonDao.load(PickTicketDetail.class, t.getPickTicketDetail().getId());
|
||||||
|
|
@ -9938,7 +9925,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
Location lc=commonDao.load(Location.class, t.getSrcLoc().getId());
|
Location lc=commonDao.load(Location.class, t.getSrcLoc().getId());
|
||||||
WarehouseArea zone=commonDao.load(WarehouseArea.class, lc.getZone().getId());
|
WarehouseArea zone=commonDao.load(WarehouseArea.class, lc.getZone().getId());
|
||||||
|
|
||||||
// System.out.println("A4---6");
|
// logger.info("A4---6");
|
||||||
JSONObject obj1 = new JSONObject();
|
JSONObject obj1 = new JSONObject();
|
||||||
balls=t.getEndRegion();
|
balls=t.getEndRegion();
|
||||||
if(!strbill.equals("")&&!strbill.equals(t.getBillCode())) {
|
if(!strbill.equals("")&&!strbill.equals(t.getBillCode())) {
|
||||||
|
|
@ -9965,7 +9952,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
balls=wName;
|
balls=wName;
|
||||||
}
|
}
|
||||||
obj1.put("billname", t.getBillCode());//子任务号(表明细)
|
obj1.put("billname", t.getBillCode());//子任务号(表明细)
|
||||||
// System.out.println("A4---7");
|
// logger.info("A4---7");
|
||||||
obj1.put("itemCode", item.getCode());//物料号(表明细)
|
obj1.put("itemCode", item.getCode());//物料号(表明细)
|
||||||
obj1.put("qty", t.getMovedQuantityMU());//数量(表明细)
|
obj1.put("qty", t.getMovedQuantityMU());//数量(表明细)
|
||||||
obj1.put("order_qty", ptd.getOrderQuantity());//需求数量(表明细)
|
obj1.put("order_qty", ptd.getOrderQuantity());//需求数量(表明细)
|
||||||
|
|
@ -9999,7 +9986,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
obj1.put("notes", ptd.getStrBill17());//备注(表明细)
|
obj1.put("notes", ptd.getStrBill17());//备注(表明细)
|
||||||
jsar.add(obj1.toString());
|
jsar.add(obj1.toString());
|
||||||
}
|
}
|
||||||
// System.out.println("A4---8");
|
// logger.info("A4---8");
|
||||||
obj.put("data", jsar.toString());
|
obj.put("data", jsar.toString());
|
||||||
content=obj.toString();
|
content=obj.toString();
|
||||||
// 打印拣货标签
|
// 打印拣货标签
|
||||||
|
|
@ -10014,12 +10001,12 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
||||||
pt2.setPrintName(printName);
|
pt2.setPrintName(printName);
|
||||||
pt2.setPrintTitle(billCode);
|
pt2.setPrintTitle(billCode);
|
||||||
commonDao.store(pt2);
|
commonDao.store(pt2);
|
||||||
// System.out.println("A4---9");
|
// logger.info("A4---9");
|
||||||
}else {
|
}else {
|
||||||
throw new BusinessException("A4打印编号错误");
|
throw new BusinessException("A4打印编号错误");
|
||||||
}
|
}
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
System.out.println("打印A4失败"+e.getMessage());
|
logger.info("打印A4失败"+e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void printPickTicketA4(Long taskid,Long printid) {
|
public void printPickTicketA4(Long taskid,Long printid) {
|
||||||
|
|
|
||||||
|
|
@ -81,12 +81,13 @@ import net.sf.json.JSONArray;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
import sun.security.krb5.Asn1Exception;
|
import sun.security.krb5.Asn1Exception;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
/**
|
/**
|
||||||
* Servlet implementation class LoginAppServlet
|
* Servlet implementation class LoginAppServlet
|
||||||
*/
|
*/
|
||||||
public class PlanCountServlet extends HttpServlet {
|
public class PlanCountServlet extends HttpServlet {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
private static Logger logger = Logger.getLogger(PlanCountServlet.class);
|
||||||
protected static ApplicationContext ac;
|
protected static ApplicationContext ac;
|
||||||
/**
|
/**
|
||||||
* @see HttpServlet#HttpServlet()
|
* @see HttpServlet#HttpServlet()
|
||||||
|
|
@ -113,7 +114,7 @@ public class PlanCountServlet extends HttpServlet {
|
||||||
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
|
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
|
||||||
*/
|
*/
|
||||||
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
System.out.println("==========app出库========"+new Date());
|
logger.info("==========app出库========"+new Date());
|
||||||
CommonDao commonDao = (CommonDao) ac.getBean("commonDao");
|
CommonDao commonDao = (CommonDao) ac.getBean("commonDao");
|
||||||
request.setCharacterEncoding("UTF-8");
|
request.setCharacterEncoding("UTF-8");
|
||||||
BufferedReader reader = new BufferedReader(new InputStreamReader(request.getInputStream(),"UTF-8"));//post方式传递读取字符流
|
BufferedReader reader = new BufferedReader(new InputStreamReader(request.getInputStream(),"UTF-8"));//post方式传递读取字符流
|
||||||
|
|
@ -127,7 +128,7 @@ public class PlanCountServlet extends HttpServlet {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("result:"+result.toString());
|
logger.info("result:"+result.toString());
|
||||||
JSONObject json= JSONObject.fromObject(result.toString());
|
JSONObject json= JSONObject.fromObject(result.toString());
|
||||||
QueryAppManager app = (QueryAppManager) ac.getBean("queryAppManager");
|
QueryAppManager app = (QueryAppManager) ac.getBean("queryAppManager");
|
||||||
String methodType =json.has("methodType")?json.getString("methodType"):"";
|
String methodType =json.has("methodType")?json.getString("methodType"):"";
|
||||||
|
|
@ -215,10 +216,10 @@ public class PlanCountServlet extends HttpServlet {
|
||||||
resultJson=app.queryLocList( propC2, workerId, wId);
|
resultJson=app.queryLocList( propC2, workerId, wId);
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("======"+resultJson.toString());
|
logger.info("======"+resultJson.toString());
|
||||||
PrintWriter out = null;
|
PrintWriter out = null;
|
||||||
try {
|
try {
|
||||||
// response.setContentType(resultJson.toString());
|
response.setContentType(resultJson.toString());
|
||||||
response.setCharacterEncoding("UTF-8");
|
response.setCharacterEncoding("UTF-8");
|
||||||
out = response.getWriter();
|
out = response.getWriter();
|
||||||
out.print(resultJson.toString());
|
out.print(resultJson.toString());
|
||||||
|
|
@ -370,7 +371,7 @@ public class PlanCountServlet extends HttpServlet {
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
System.out.println();
|
|
||||||
msg="料号不存在错误!";
|
msg="料号不存在错误!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,49 +30,24 @@ import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
public class SwmsExportGridServlet extends BaseHttpServlet {
|
public class SwmsExportGridServlet extends BaseHttpServlet {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private final DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd");
|
private final DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
private static Logger logger = Logger.getLogger(SwmsExportGridServlet.class);
|
||||||
public String decodeRequestURL( String queryString) {
|
|
||||||
StringBuilder urlBuilder = new StringBuilder();
|
|
||||||
|
|
||||||
if (queryString != null) {
|
|
||||||
try {
|
|
||||||
String decodedQueryString = URLDecoder.decode(queryString, "UTF-8");
|
|
||||||
urlBuilder.append('?').append(decodedQueryString);
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Handle exception if UTF-8 is not supported
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return urlBuilder.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void process(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
|
public void process(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
|
||||||
// System.out.println("export join.....");
|
logger.info("export join.....");
|
||||||
res.setContentType("text/html; charset=UTF-8");
|
res.setContentType("text/html; charset=UTF-8");
|
||||||
req.setCharacterEncoding("UTF-8");
|
req.setCharacterEncoding("UTF-8");
|
||||||
res.setCharacterEncoding("UTF-8");
|
res.setCharacterEncoding("UTF-8");
|
||||||
|
|
||||||
// String queryString = req.getQueryString();
|
|
||||||
// System.out.println("------------------------------------------------");
|
|
||||||
// System.out.println(queryString);
|
|
||||||
// System.out.println("-----------------decodeRequestURL-------------------------------");
|
|
||||||
// queryString=decodeRequestURL(queryString);
|
|
||||||
// System.out.println(queryString);
|
|
||||||
// System.out.println("-----------------decodeRequestURL2-------------------------------");
|
|
||||||
// queryString=decodeRequestURL(queryString);
|
|
||||||
// System.out.println(queryString);
|
|
||||||
|
|
||||||
UniConfig uniConfig = (UniConfig)this.ac.getBean("uniConfig");
|
UniConfig uniConfig = (UniConfig)this.ac.getBean("uniConfig");
|
||||||
String exportExcelType = req.getParameter("exportType");
|
String exportExcelType = req.getParameter("exportType");
|
||||||
if(StringUtils.isNotEmpty(exportExcelType)) {
|
if(StringUtils.isNotEmpty(exportExcelType)) {
|
||||||
exportExcelType = URLDecoder.decode(StringUtils.substring(exportExcelType, 0, exportExcelType.length() - 3),"utf-8");
|
exportExcelType = URLDecoder.decode(StringUtils.substring(exportExcelType, 0, exportExcelType.length() - 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
Map map = req.getParameterMap();
|
Map map = req.getParameterMap();
|
||||||
HashMap params = new HashMap();
|
HashMap params = new HashMap();
|
||||||
Iterator sf = map.keySet().iterator();
|
Iterator sf = map.keySet().iterator();
|
||||||
|
|
@ -86,20 +61,18 @@ public class SwmsExportGridServlet extends BaseHttpServlet {
|
||||||
ids = null;
|
ids = null;
|
||||||
if(dataSourceType != null && dataSourceType.length > 0) {
|
if(dataSourceType != null && dataSourceType.length > 0) {
|
||||||
ids = dataSourceType[0];
|
ids = dataSourceType[0];
|
||||||
// System.out.println("parameter:"+ids);
|
// logger.info("parameter:"+ids);
|
||||||
// System.out.println("parameter2:");
|
// logger.info("parameter2:");
|
||||||
if(ids != null) {
|
if(ids != null) {
|
||||||
ids = URLDecoder.decode(ids,"utf-8");
|
ids = URLDecoder.decode(ids);
|
||||||
// System.out.println("----ids----:"+ids);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ids == null) {
|
if(ids == null) {
|
||||||
|
|
||||||
params.put(pageId, ids);
|
params.put(pageId, ids);
|
||||||
} else {
|
} else {
|
||||||
String page = "^\\[\\w+(,\\w+)*\\]\\w*$";
|
String page = "^\\[\\w+(,\\w+)*\\]\\w*$";
|
||||||
System.out.println("===="+ids);
|
// logger.info("===="+ids);
|
||||||
String gc;
|
String gc;
|
||||||
ArrayList tableConfig;
|
ArrayList tableConfig;
|
||||||
int dataSourceParamUtil;
|
int dataSourceParamUtil;
|
||||||
|
|
@ -148,7 +121,6 @@ public class SwmsExportGridServlet extends BaseHttpServlet {
|
||||||
Float var30 = new Float(ids.substring(0, ids.length() - 3));
|
Float var30 = new Float(ids.substring(0, ids.length() - 3));
|
||||||
params.put(pageId, var30);
|
params.put(pageId, var30);
|
||||||
} else {
|
} else {
|
||||||
// System.out.println("ids:"+ids);
|
|
||||||
params.put(pageId, ids);
|
params.put(pageId, ids);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -163,6 +135,7 @@ public class SwmsExportGridServlet extends BaseHttpServlet {
|
||||||
hql = var17[dataSourceParamUtil];
|
hql = var17[dataSourceParamUtil];
|
||||||
tableConfig.add(Long.valueOf(hql));
|
tableConfig.add(Long.valueOf(hql));
|
||||||
}
|
}
|
||||||
|
|
||||||
params.put(pageId, tableConfig);
|
params.put(pageId, tableConfig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import com.dev.energy.server.util.LocalizedMessage;
|
||||||
import com.dev.swms.server.utils.ConvertEnumName;
|
import com.dev.swms.server.utils.ConvertEnumName;
|
||||||
import com.dev.swms.server.web.servlet.export.ExportExcelGenerator;
|
import com.dev.swms.server.web.servlet.export.ExportExcelGenerator;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
|
@ -18,7 +17,6 @@ import java.util.Date;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
@ -49,20 +47,7 @@ public class XLSExportGenerator implements ExportExcelGenerator, ApplicationCont
|
||||||
private static final WritableCellFormat detFormat = new WritableCellFormat(detFont);
|
private static final WritableCellFormat detFormat = new WritableCellFormat(detFont);
|
||||||
private SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
|
private SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||||
|
|
||||||
// public static String convertToUTF8(String inputString) {
|
|
||||||
// try {
|
|
||||||
// // 将字符串转换为字节数组
|
|
||||||
// byte[] inputBytes = inputString.getBytes("UTF-8");
|
|
||||||
//
|
|
||||||
// // 将字节数组转换回字符串
|
|
||||||
// String utf8EncodedString = new String(inputBytes, "UTF-8");
|
|
||||||
//
|
|
||||||
// return utf8EncodedString;
|
|
||||||
// } catch (UnsupportedEncodingException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
public void exportExcel(ApplicationContext ac,String hql, Map params, TableConfig tableConfig, HttpServletResponse res, String referenceModel, String locale) throws Exception {
|
public void exportExcel(ApplicationContext ac,String hql, Map params, TableConfig tableConfig, HttpServletResponse res, String referenceModel, String locale) throws Exception {
|
||||||
String pagingNumberPer="40000";
|
String pagingNumberPer="40000";
|
||||||
String pageName = this.sdf.format(new Date());
|
String pageName = this.sdf.format(new Date());
|
||||||
|
|
@ -70,27 +55,12 @@ public class XLSExportGenerator implements ExportExcelGenerator, ApplicationCont
|
||||||
Matcher matcher = pattern.matcher(pageName);
|
Matcher matcher = pattern.matcher(pageName);
|
||||||
pageName = matcher.replaceAll("");
|
pageName = matcher.replaceAll("");
|
||||||
String header = "attachment; filename=" + pageName + ".xls";
|
String header = "attachment; filename=" + pageName + ".xls";
|
||||||
res.setCharacterEncoding("UTF-8");
|
res.setCharacterEncoding("GBK");
|
||||||
res.setContentType("application/ms-excel; charset=UTF-8");
|
res.setContentType("application/ms-excel; charset=GBK");
|
||||||
res.setHeader("content-disposition", header);
|
res.setHeader("content-disposition", header);
|
||||||
// res.setContentType("text/html;charset=UTF-8");
|
|
||||||
WritableWorkbook workbook = Workbook.createWorkbook(res.getOutputStream());
|
WritableWorkbook workbook = Workbook.createWorkbook(res.getOutputStream());
|
||||||
params.put("pagingNumberPer", pagingNumberPer);
|
params.put("pagingNumberPer", pagingNumberPer);
|
||||||
params.put("pagingPage", "1");
|
params.put("pagingPage", "1");
|
||||||
// Set<Map.Entry<String, String>> itor = params.entrySet();
|
|
||||||
// int y=0;
|
|
||||||
// for (Map.Entry<String, String> me : itor) {
|
|
||||||
// y++;
|
|
||||||
// System.out.println(y+"--"+me.getKey().toString());
|
|
||||||
// if(me.getValue()!=null) {
|
|
||||||
// try {
|
|
||||||
// System.out.println(convertToUTF8(me.getValue()+""));
|
|
||||||
// }catch (Exception e) {
|
|
||||||
// System.out.println(me.getValue());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
ValueListQueryManager gridQueryManager = (ValueListQueryManager)ac.getBean("valueListQueryManager");
|
ValueListQueryManager gridQueryManager = (ValueListQueryManager)ac.getBean("valueListQueryManager");
|
||||||
int s1=hql.indexOf("where");
|
int s1=hql.indexOf("where");
|
||||||
if(s1<0){
|
if(s1<0){
|
||||||
|
|
@ -104,8 +74,6 @@ public class XLSExportGenerator implements ExportExcelGenerator, ApplicationCont
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ValueList valueList = gridQueryManager.queryByValueList(hql, params);
|
ValueList valueList = gridQueryManager.queryByValueList(hql, params);
|
||||||
// System.out.println("hsl"+hql);
|
|
||||||
// System.out.println(valueList.getList().size());
|
|
||||||
int offset = 1;
|
int offset = 1;
|
||||||
int exportTotalPages = valueList.getValueListInfo().getTotalNumberOfPages();
|
int exportTotalPages = valueList.getValueListInfo().getTotalNumberOfPages();
|
||||||
do {
|
do {
|
||||||
|
|
@ -127,12 +95,12 @@ public class XLSExportGenerator implements ExportExcelGenerator, ApplicationCont
|
||||||
Collections.addAll(list, objs);
|
Collections.addAll(list, objs);
|
||||||
List columnProperties = tableConfig.getColumnProperties();
|
List columnProperties = tableConfig.getColumnProperties();
|
||||||
int cloSize=columnProperties.size();
|
int cloSize=columnProperties.size();
|
||||||
|
|
||||||
for(int col = 1; col <cloSize ; ++col) {
|
for(int col = 1; col <cloSize ; ++col) {
|
||||||
ColumnProperty property = (ColumnProperty)columnProperties.get(col);
|
ColumnProperty property = (ColumnProperty)columnProperties.get(col);
|
||||||
this.writeSheetByType(ac,sheet, property, list, referenceModel, locale, var27, col-1);
|
this.writeSheetByType(ac,sheet, property, list, referenceModel, locale, var27, col-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// System.out.println("打印"+offset);
|
|
||||||
} while(offset++ < exportTotalPages);
|
} while(offset++ < exportTotalPages);
|
||||||
workbook.write();
|
workbook.write();
|
||||||
workbook.close();
|
workbook.close();
|
||||||
|
|
|
||||||
|
|
@ -390,24 +390,5 @@ ALTER TABLE RECEIVED_RECORD add sap_Status varchar(20) COLLATE Chinese_PRC_
|
||||||
GO
|
GO
|
||||||
---------20241218
|
---------20241218
|
||||||
ALTER TABLE INVENTORY add description varchar(200) COLLATE Chinese_PRC_CI_AS NULL;
|
ALTER TABLE INVENTORY add description varchar(200) COLLATE Chinese_PRC_CI_AS NULL;
|
||||||
GO
|
|
||||||
---------max(inv.description) as invDes,
|
|
||||||
|
|
||||||
----------2025-01-02
|
|
||||||
ALTER TABLE SHIXIAO add efficiency tinyint NULL;
|
|
||||||
GO
|
|
||||||
|
|
||||||
update SHIXIAO set efficiency=1 where efficiency is null;
|
|
||||||
GO
|
|
||||||
ALTER TABLE SHIXIAO add gzz_d float(53) NULL;
|
|
||||||
GO
|
|
||||||
update SHIXIAO set gzz_d=1 where gzz_d is null;
|
|
||||||
GO
|
|
||||||
ALTER TABLE SHIXIAO add gzz_t float(53) NULL;
|
|
||||||
GO
|
|
||||||
update SHIXIAO set gzz_t=1 where gzz_t is null;
|
|
||||||
GO
|
|
||||||
ALTER TABLE SHIXIAO add task_d float(53) NULL;
|
|
||||||
GO
|
|
||||||
update SHIXIAO set task_d=1 where task_d is null;
|
|
||||||
GO
|
GO
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
where 1=1 order by plantInfo.name asc ]]></hql>
|
where 1=1 order by plantInfo.name asc ]]></hql>
|
||||||
</list>
|
</list>
|
||||||
<booleanList id="pl.beWave" title="是否入波" defaultValue="false" row="2" col="1" span="1" readOnly="false" required="true" reserve="true" forceOverride="true" inVisible="false"/>
|
<booleanList id="pl.beWave" title="是否入波" defaultValue="false" row="2" col="1" span="1" readOnly="false" required="true" reserve="true" forceOverride="true" inVisible="false"/>
|
||||||
<booleanList id="pl.beRegister" title="不良品登记" defaultValue="false" row="2" col="2" span="1" readOnly="false" required="true" reserve="true" forceOverride="true" inVisible="false"/>
|
<booleanList id="pl.beRegister" title="入库登记" defaultValue="false" row="2" col="2" span="1" readOnly="false" required="true" reserve="true" forceOverride="true" inVisible="false"/>
|
||||||
<booleanList id="pl.bePriorityWave" title="是否优先出库" defaultValue="false" row="3" col="1" span="1" readOnly="false" required="true" reserve="true" forceOverride="true" inVisible="false"/>
|
<booleanList id="pl.bePriorityWave" title="是否优先出库" defaultValue="false" row="3" col="1" span="1" readOnly="false" required="true" reserve="true" forceOverride="true" inVisible="false"/>
|
||||||
<text id="pl.locFloor" title="位置" row="4" width="300"
|
<text id="pl.locFloor" title="位置" row="4" width="300"
|
||||||
col="2" span="2" readOnly="false" required="false" reserve="false"
|
col="2" span="2" readOnly="false" required="false" reserve="false"
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
visible="true" horizonAlign="center" verticalAlign="middle" format="booleanFormat"
|
visible="true" horizonAlign="center" verticalAlign="middle" format="booleanFormat"
|
||||||
formatParam="disabled" />
|
formatParam="disabled" />
|
||||||
<column id="pl.locFloor" title="位置" visible="true" horizonAlign="center" />
|
<column id="pl.locFloor" title="位置" visible="true" horizonAlign="center" />
|
||||||
<column id="pl.beRegister" title="不良品登记"
|
<column id="pl.beRegister" title="入库登记"
|
||||||
visible="true" horizonAlign="center" verticalAlign="middle" format="booleanFormat"
|
visible="true" horizonAlign="center" verticalAlign="middle" format="booleanFormat"
|
||||||
formatParam="disabled" />
|
formatParam="disabled" />
|
||||||
<column id="pl.bePriorityWave" title="优先出库"
|
<column id="pl.bePriorityWave" title="优先出库"
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
<list id="zone.name" title="库区" row="3" col="2"
|
<list id="zone.name" title="库区" row="3" col="2"
|
||||||
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
||||||
forceOverride="false" manualEditable="true">
|
forceOverride="false" manualEditable="true">
|
||||||
<hql><![CDATA[ select warehouseArea.id,
|
<hql><![CDATA[ select warehouseArea.name,
|
||||||
warehouseArea.name
|
warehouseArea.name
|
||||||
from WarehouseArea warehouseArea where 1=1 order by warehouseArea.name]]></hql>
|
from WarehouseArea warehouseArea where 1=1 order by warehouseArea.name]]></hql>
|
||||||
</list>
|
</list>
|
||||||
|
|
@ -102,11 +102,11 @@
|
||||||
/~locCode: AND (location.code) like ({locCode})~/
|
/~locCode: AND (location.code) like ({locCode})~/
|
||||||
/~worker.name: AND (worker.name) like ({worker.name})~/
|
/~worker.name: AND (worker.name) like ({worker.name})~/
|
||||||
/~countRecord.countCode: AND (countRecord.countCode) like ({countRecord.countCode})~/
|
/~countRecord.countCode: AND (countRecord.countCode) like ({countRecord.countCode})~/
|
||||||
/~zone.name: AND zone.id = {zone.name}~/
|
/~zone.name: AND upper(zone.name) like upper({zone.name})~/
|
||||||
/~location.id: AND location.id = {location.id}~/
|
/~location.id: AND location.id = {location.id}~/
|
||||||
/~beaa: AND (({beaa}=true and countRecord.deltaQuantity<>0) or ( {beaa}=false and countRecord.deltaQuantity=0)) ~/
|
/~beaa: AND (({beaa}=true and countRecord.deltaQuantity<>0) or ( {beaa}=false and countRecord.deltaQuantity=0)) ~/
|
||||||
/~countRecord.needCount: AND countRecord.needCount= {countRecord.needCount} ~/
|
/~countRecord.needCount: AND countRecord.needCount= {countRecord.needCount} ~/
|
||||||
/~countRecord.targetArea: AND (countRecord.targetArea) like ({countRecord.targetArea})~/
|
/~countRecord.targetArea: AND upper(countRecord.targetArea) like upper({countRecord.targetArea})~/
|
||||||
and (1=1
|
and (1=1
|
||||||
/~beginDate: AND CONVERT(varchar(100), countRecord.issuedDate, 23) = {beginDate} ~/
|
/~beginDate: AND CONVERT(varchar(100), countRecord.issuedDate, 23) = {beginDate} ~/
|
||||||
/~endDate: or (CONVERT(varchar(100), countRecord.issuedDate, 23)>= {beginDate} and CONVERT(varchar(100), countRecord.issuedDate, 23)<= {endDate}) ~/
|
/~endDate: or (CONVERT(varchar(100), countRecord.issuedDate, 23)>= {beginDate} and CONVERT(varchar(100), countRecord.issuedDate, 23)<= {endDate}) ~/
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,9 @@
|
||||||
<text id="item.name" title="item.name" row="1" col="2"
|
<text id="item.name" title="item.name" row="1" col="2"
|
||||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||||
inVisible="false" trimSpace="false" />
|
inVisible="false" trimSpace="false" />
|
||||||
|
<text id="inventory.propC2" title="LOC" row="2" col="1"
|
||||||
<list id="inventory.propC2" title="LOC" row="2" col="1"
|
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||||
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
inVisible="false" trimSpace="false" />
|
||||||
forceOverride="false" manualEditable="true">
|
|
||||||
<hql><![CDATA[ select pl.code,
|
|
||||||
pl.code
|
|
||||||
from PlantLocation pl where 1=1 and pl.disabled=false order by pl.code]]></hql>
|
|
||||||
</list>
|
|
||||||
<text id="inventory.propC5" title="供应商代码" row="2" col="2"
|
<text id="inventory.propC5" title="供应商代码" row="2" col="2"
|
||||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||||
inVisible="false" trimSpace="false" />
|
inVisible="false" trimSpace="false" />
|
||||||
|
|
@ -44,7 +39,7 @@
|
||||||
<list id="inventory.kqName" title="库区" row="4" col="2"
|
<list id="inventory.kqName" title="库区" row="4" col="2"
|
||||||
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
||||||
forceOverride="false" manualEditable="true">
|
forceOverride="false" manualEditable="true">
|
||||||
<hql><![CDATA[ select warehouseArea.id,
|
<hql><![CDATA[ select warehouseArea.name,
|
||||||
warehouseArea.name
|
warehouseArea.name
|
||||||
from WarehouseArea warehouseArea where 1=1 order by warehouseArea.name]]></hql>
|
from WarehouseArea warehouseArea where 1=1 order by warehouseArea.name]]></hql>
|
||||||
</list>
|
</list>
|
||||||
|
|
@ -96,7 +91,7 @@
|
||||||
/~inventory.propC3: AND upper(inventory.propC3) LIKE upper({inventory.propC3})~/
|
/~inventory.propC3: AND upper(inventory.propC3) LIKE upper({inventory.propC3})~/
|
||||||
/~inventory.propC5: AND upper(inventory.propC5) LIKE upper({inventory.propC5})~/
|
/~inventory.propC5: AND upper(inventory.propC5) LIKE upper({inventory.propC5})~/
|
||||||
/~inventory.status: AND upper(inventory.status) LIKE upper({inventory.status})~/
|
/~inventory.status: AND upper(inventory.status) LIKE upper({inventory.status})~/
|
||||||
/~inventory.kqName: and inventory.zone.id = {inventory.kqName}~/
|
/~inventory.kqName: and inventory.kqName = {inventory.kqName}~/
|
||||||
/~inventory.lock : and inventory.lock = {inventory.lock} ~/
|
/~inventory.lock : and inventory.lock = {inventory.lock} ~/
|
||||||
/~inventory.singleItem : and inventory.singleItem = {inventory.singleItem} ~/
|
/~inventory.singleItem : and inventory.singleItem = {inventory.singleItem} ~/
|
||||||
order by inventory.locCode,inventory.propC1
|
order by inventory.locCode,inventory.propC1
|
||||||
|
|
|
||||||
|
|
@ -76,22 +76,6 @@
|
||||||
<!-- <date id="inventoryLog.occurTime" title="发生时间" row="4" span="1" readOnly="false" required="false" reserve="true" forceOverride="false" inVisible="true" showTime="false" manualEditable="false" defaultCurrentDate="true"/> -->
|
<!-- <date id="inventoryLog.occurTime" title="发生时间" row="4" span="1" readOnly="false" required="false" reserve="true" forceOverride="false" inVisible="true" showTime="false" manualEditable="false" defaultCurrentDate="true"/> -->
|
||||||
<!-- <checkbox id="ordersAll" title="ordersAll" row="6" col="1" defaultValue="false" -->
|
<!-- <checkbox id="ordersAll" title="ordersAll" row="6" col="1" defaultValue="false" -->
|
||||||
<!-- span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false" /> -->
|
<!-- span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false" /> -->
|
||||||
<list id="inventory.kqName" title="库区" row="6" col="1"
|
|
||||||
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
|
||||||
forceOverride="false" manualEditable="true">
|
|
||||||
<hql><![CDATA[ select warehouseArea.id,
|
|
||||||
warehouseArea.name
|
|
||||||
from WarehouseArea warehouseArea where 1=1 and warehouseArea.disabled=false
|
|
||||||
order by warehouseArea.name]]></hql>
|
|
||||||
</list>
|
|
||||||
<list id="propC9" title="工厂" row="6" col="2" width="120px"
|
|
||||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
|
||||||
enumType="PickTicketStatus">
|
|
||||||
<hql><![CDATA[ SELECT
|
|
||||||
commonCode.code,
|
|
||||||
commonCode.code From PlantInfo commonCode
|
|
||||||
where commonCode.disabled = false]]></hql>
|
|
||||||
</list>
|
|
||||||
</inputUIs>
|
</inputUIs>
|
||||||
</search>
|
</search>
|
||||||
<datasource type="hql"><![CDATA[SELECT
|
<datasource type="hql"><![CDATA[SELECT
|
||||||
|
|
@ -122,7 +106,6 @@
|
||||||
left join inventoryLog.billType
|
left join inventoryLog.billType
|
||||||
left join inventoryLog.location
|
left join inventoryLog.location
|
||||||
left join inventoryLog.srcLoc
|
left join inventoryLog.srcLoc
|
||||||
left join inventoryLog.srcLoc.zone
|
|
||||||
left join inventoryLog.itemKey
|
left join inventoryLog.itemKey
|
||||||
left join inventoryLog.itemKey.item
|
left join inventoryLog.itemKey.item
|
||||||
WHERE 1=1
|
WHERE 1=1
|
||||||
|
|
@ -136,9 +119,7 @@
|
||||||
/~soi: AND inventoryLog.SOI LIKE {soi}~/
|
/~soi: AND inventoryLog.SOI LIKE {soi}~/
|
||||||
/~inventoryLog.itemKey.item.code: AND upper(inventoryLog.itemKey.item.code) LIKE upper({inventoryLog.itemKey.item.code})~/
|
/~inventoryLog.itemKey.item.code: AND upper(inventoryLog.itemKey.item.code) LIKE upper({inventoryLog.itemKey.item.code})~/
|
||||||
/~LOC: AND inventoryLog.itemKey.lotInfo.propC2 LIKE {LOC}~/
|
/~LOC: AND inventoryLog.itemKey.lotInfo.propC2 LIKE {LOC}~/
|
||||||
/~propC9: AND inventoryLog.itemKey.lotInfo.propC9 LIKE {propC9}~/
|
|
||||||
/~operator: AND inventoryLog.operator LIKE {operator}~/
|
/~operator: AND inventoryLog.operator LIKE {operator}~/
|
||||||
/~inventory.kqName: and inventoryLog.srcLoc.zone.id = {inventory.kqName}~/
|
|
||||||
and (1=1
|
and (1=1
|
||||||
/~beginDate: AND CONVERT(varchar(100), inventoryLog.occurTime, 23) >= {beginDate} ~/
|
/~beginDate: AND CONVERT(varchar(100), inventoryLog.occurTime, 23) >= {beginDate} ~/
|
||||||
/~endDate: AND CONVERT(varchar(100), inventoryLog.occurTime, 23)>= {beginDate} and CONVERT(varchar(100), inventoryLog.occurTime, 23)<= {endDate} ~/
|
/~endDate: AND CONVERT(varchar(100), inventoryLog.occurTime, 23)>= {beginDate} and CONVERT(varchar(100), inventoryLog.occurTime, 23)<= {endDate} ~/
|
||||||
|
|
|
||||||
|
|
@ -44,27 +44,23 @@
|
||||||
<list id="wa.name" title="库区" row="3" col="1"
|
<list id="wa.name" title="库区" row="3" col="1"
|
||||||
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
||||||
forceOverride="false" manualEditable="true">
|
forceOverride="false" manualEditable="true">
|
||||||
<hql><![CDATA[ select warehouseArea.id,
|
<hql><![CDATA[ select warehouseArea.name,
|
||||||
warehouseArea.name
|
warehouseArea.name
|
||||||
from WarehouseArea warehouseArea where 1=1 and warehouseArea.disabled=false order by warehouseArea.name]]></hql>
|
from WarehouseArea warehouseArea where 1=1 and warehouseArea.disabled=false order by warehouseArea.name]]></hql>
|
||||||
</list>
|
</list>
|
||||||
|
<text id="propC2" title="LOC" row="3" col="2"
|
||||||
<list id="propC2" title="LOC" row="3" col="2"
|
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||||
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
inVisible="false" trimSpace="false" />
|
||||||
forceOverride="false" manualEditable="true">
|
|
||||||
<hql><![CDATA[ select pl.code,
|
|
||||||
pl.code
|
|
||||||
from PlantLocation pl where 1=1 and pl.disabled=false order by pl.code]]></hql>
|
|
||||||
</list>
|
|
||||||
<text id="propC3" title="特殊标记" row="4" col="1"
|
<text id="propC3" title="特殊标记" row="4" col="1"
|
||||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||||
inVisible="false" trimSpace="false" />
|
inVisible="false" trimSpace="false" />
|
||||||
<list id="propC9" title="工厂" row="4" col="2" width="120px"
|
<list id="propC9" title="工厂" row="4" col="2" width="120px"
|
||||||
readOnly="false" required="false" reserve="false" forceOverride="false">
|
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||||
|
>
|
||||||
<hql><![CDATA[ SELECT
|
<hql><![CDATA[ SELECT
|
||||||
commonCode.code,
|
commonCode.code,
|
||||||
commonCode.code From PlantInfo commonCode
|
commonCode.name From CommonCode commonCode
|
||||||
where commonCode.disabled = false ]]></hql>
|
where commonCode.codeType = '工厂' ]]></hql>
|
||||||
</list>
|
</list>
|
||||||
<text id="propC5" title="供应商代码" row="5" col="1"
|
<text id="propC5" title="供应商代码" row="5" col="1"
|
||||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||||
|
|
@ -116,7 +112,7 @@
|
||||||
LEFT JOIN inventory.itemKey.item item
|
LEFT JOIN inventory.itemKey.item item
|
||||||
LEFT JOIN inventory.location loc
|
LEFT JOIN inventory.location loc
|
||||||
LEFT JOIN loc.locations ls
|
LEFT JOIN loc.locations ls
|
||||||
LEFT JOIN inventory.location.zone wa
|
LEFT JOIN inventory.warehouseArea wa
|
||||||
WHERE 1=1
|
WHERE 1=1
|
||||||
and inventory.quantity>0
|
and inventory.quantity>0
|
||||||
and loc.type not in ('RECEIVE','SHIP')
|
and loc.type not in ('RECEIVE','SHIP')
|
||||||
|
|
@ -126,7 +122,7 @@
|
||||||
/~location.id: AND inventory.location.id = {location.id}~/
|
/~location.id: AND inventory.location.id = {location.id}~/
|
||||||
/~item.code: AND upper(item.code) LIKE upper({item.code})~/
|
/~item.code: AND upper(item.code) LIKE upper({item.code})~/
|
||||||
/~item.name: AND item.name LIKE {item.name}~/
|
/~item.name: AND item.name LIKE {item.name}~/
|
||||||
/~wa.name: AND wa.id = {wa.name}~/
|
/~wa.name: AND wa.name LIKE {wa.name}~/
|
||||||
/~inventory.status: AND upper(inventory.status) LIKE upper({inventory.status})~/
|
/~inventory.status: AND upper(inventory.status) LIKE upper({inventory.status})~/
|
||||||
/~propC1: AND inventory.itemKey.lotInfo.propC1 LIKE {propC1}~/
|
/~propC1: AND inventory.itemKey.lotInfo.propC1 LIKE {propC1}~/
|
||||||
/~propC2: AND inventory.itemKey.lotInfo.propC2 LIKE {propC2}~/
|
/~propC2: AND inventory.itemKey.lotInfo.propC2 LIKE {propC2}~/
|
||||||
|
|
@ -135,6 +131,7 @@
|
||||||
/~propC9: AND inventory.itemKey.lotInfo.propC9 LIKE {propC9}~/
|
/~propC9: AND inventory.itemKey.lotInfo.propC9 LIKE {propC9}~/
|
||||||
/~inventory.SOI: AND inventory.SOI LIKE {inventory.SOI}~/
|
/~inventory.SOI: AND inventory.SOI LIKE {inventory.SOI}~/
|
||||||
/~inventory.propC1: AND inventory.itemKeyInventory.itemKey.lotInfo.propC1 LIKE {inventory.propC1}~/
|
/~inventory.propC1: AND inventory.itemKeyInventory.itemKey.lotInfo.propC1 LIKE {inventory.propC1}~/
|
||||||
|
/~inventory.location.zone.id: AND inventory.location.zone.id= {inventory.location.zone.id}~/
|
||||||
/~quantity: AND inventory.quantity <= {quantity}~/
|
/~quantity: AND inventory.quantity <= {quantity}~/
|
||||||
/~LP: AND inventory.LP.LP LIKE {LP}~/
|
/~LP: AND inventory.LP.LP LIKE {LP}~/
|
||||||
/~inventory.counPlan : and ((inventory.counPlan is not null AND {inventory.counPlan}=true) OR (inventory.counPlan is null AND {inventory.counPlan}=false)) ~/
|
/~inventory.counPlan : and ((inventory.counPlan is not null AND {inventory.counPlan}=true) OR (inventory.counPlan is null AND {inventory.counPlan}=false)) ~/
|
||||||
|
|
|
||||||
|
|
@ -38,17 +38,13 @@
|
||||||
from CommonCode commonCode
|
from CommonCode commonCode
|
||||||
where commonCode.codeType = '库存状态']]></hql>
|
where commonCode.codeType = '库存状态']]></hql>
|
||||||
</list>
|
</list>
|
||||||
<list id="inventory.propC2" title="LOC" row="2" col="1"
|
<text id="inventory.propC2" title="LOC" row="2" col="1"
|
||||||
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||||
forceOverride="false" manualEditable="true">
|
inVisible="false" trimSpace="false" />
|
||||||
<hql><![CDATA[ select pl.code,
|
|
||||||
pl.code
|
|
||||||
from PlantLocation pl where 1=1 and pl.disabled=false order by pl.code]]></hql>
|
|
||||||
</list>
|
|
||||||
<list id="inventory.kqName" title="库区" row="2" col="2"
|
<list id="inventory.kqName" title="库区" row="2" col="2"
|
||||||
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
||||||
forceOverride="false" manualEditable="true">
|
forceOverride="false" manualEditable="true">
|
||||||
<hql><![CDATA[ select warehouseArea.id,
|
<hql><![CDATA[ select warehouseArea.name,
|
||||||
warehouseArea.name
|
warehouseArea.name
|
||||||
from WarehouseArea warehouseArea where 1=1 order by warehouseArea.name]]></hql>
|
from WarehouseArea warehouseArea where 1=1 order by warehouseArea.name]]></hql>
|
||||||
</list>
|
</list>
|
||||||
|
|
@ -62,10 +58,11 @@
|
||||||
|
|
||||||
<list id="inventory.propC9" title="工厂" row="4" col="1" width="120px"
|
<list id="inventory.propC9" title="工厂" row="4" col="1" width="120px"
|
||||||
readOnly="false" required="false" reserve="false" forceOverride="false" >
|
readOnly="false" required="false" reserve="false" forceOverride="false" >
|
||||||
<hql><![CDATA[ SELECT
|
<hql><![CDATA[ select
|
||||||
commonCode.code,
|
commonCode.code,
|
||||||
commonCode.code From PlantInfo commonCode
|
commonCode.name
|
||||||
where commonCode.disabled=0 ]]></hql>
|
from CommonCode commonCode
|
||||||
|
where commonCode.codeType = '工厂']]></hql>
|
||||||
</list>
|
</list>
|
||||||
<!-- <numberText id="quantity" title="库存低于数量" row="3" col="1" span="1" readOnly="false" required="false" reserve="true" forceOverride="true" inVisible="false" validator="number" returnType="Double" decimal="0" /> -->
|
<!-- <numberText id="quantity" title="库存低于数量" row="3" col="1" span="1" readOnly="false" required="false" reserve="true" forceOverride="true" inVisible="false" validator="number" returnType="Double" decimal="0" /> -->
|
||||||
<booleanList id="inventory.lock" title="盘点是否锁定" row="4" col="2" span="1" readOnly="false"
|
<booleanList id="inventory.lock" title="盘点是否锁定" row="4" col="2" span="1" readOnly="false"
|
||||||
|
|
@ -129,7 +126,7 @@ where commonCode.disabled=0 ]]></hql>
|
||||||
/~inventory.propC5: AND upper(inventory.propC5) LIKE upper({inventory.propC5})~/
|
/~inventory.propC5: AND upper(inventory.propC5) LIKE upper({inventory.propC5})~/
|
||||||
/~inventory.propC6: AND upper(inventory.propC6) LIKE upper({inventory.propC6})~/
|
/~inventory.propC6: AND upper(inventory.propC6) LIKE upper({inventory.propC6})~/
|
||||||
/~inventory.status: AND upper(inventory.status) LIKE upper({inventory.status})~/
|
/~inventory.status: AND upper(inventory.status) LIKE upper({inventory.status})~/
|
||||||
/~inventory.kqName: and inventory.zone.id = {inventory.kqName}~/
|
/~inventory.kqName: and inventory.kqName = {inventory.kqName}~/
|
||||||
/~inventory.propC9 : and inventory.propC9 = {inventory.propC9} ~/
|
/~inventory.propC9 : and inventory.propC9 = {inventory.propC9} ~/
|
||||||
/~inventory.lock : and inventory.lock = {inventory.lock} ~/
|
/~inventory.lock : and inventory.lock = {inventory.lock} ~/
|
||||||
and (1=1
|
and (1=1
|
||||||
|
|
|
||||||
|
|
@ -132,19 +132,18 @@
|
||||||
<popup id="modify" title="查看" enableType="single" invisible="false"
|
<popup id="modify" title="查看" enableType="single" invisible="false"
|
||||||
containId="true" pageId="modifyXLinfoPage">
|
containId="true" pageId="modifyXLinfoPage">
|
||||||
</popup>
|
</popup>
|
||||||
<popup id="chukongtuo" title="出空托" enableType="multi" invisible="false" containId="false" pageId="editNullNewStockPage" />
|
<commit id="chukongtuo" title="出空托" enableType="none" invisible="false" >
|
||||||
<!-- <commit id="chukongtuo" title="出空托" enableType="none" invisible="false" > -->
|
<mappings>
|
||||||
<!-- <mappings> -->
|
<mapping id="ids" className="list" />
|
||||||
<!-- <mapping id="ids" className="list" /> -->
|
</mappings>
|
||||||
<!-- </mappings> -->
|
<actions>
|
||||||
<!-- <actions> -->
|
<action managerName="moveDocManager" methodName="stockCk" parameter="ids" />
|
||||||
<!-- <action managerName="moveDocManager" methodName="stockCk" parameter="ids" /> -->
|
</actions>
|
||||||
<!-- </actions> -->
|
<forwards>
|
||||||
<!-- <forwards> -->
|
<forward name="refreshWindow" newEnabled="false"
|
||||||
<!-- <forward name="refreshWindow" newEnabled="false" -->
|
editEnabled="false" />
|
||||||
<!-- editEnabled="false" /> -->
|
</forwards>
|
||||||
<!-- </forwards> -->
|
</commit>
|
||||||
<!-- </commit> -->
|
|
||||||
</buttons>
|
</buttons>
|
||||||
</maintainPage>
|
</maintainPage>
|
||||||
</pages>
|
</pages>
|
||||||
|
|
|
||||||
|
|
@ -94,13 +94,6 @@
|
||||||
AND lc.disabled = false
|
AND lc.disabled = false
|
||||||
]]></hql>
|
]]></hql>
|
||||||
</remote>
|
</remote>
|
||||||
<list id="propC9" title="工厂" row="24" col="1" width="120px"
|
|
||||||
readOnly="false" required="false" reserve="false" forceOverride="false">
|
|
||||||
<hql><![CDATA[ SELECT
|
|
||||||
commonCode.code,
|
|
||||||
commonCode.code From PlantInfo commonCode
|
|
||||||
where commonCode.disabled = false ]]></hql>
|
|
||||||
</list>
|
|
||||||
</inputUIs>
|
</inputUIs>
|
||||||
</search>
|
</search>
|
||||||
<datasource type="hql"><![CDATA[SELECT
|
<datasource type="hql"><![CDATA[SELECT
|
||||||
|
|
@ -144,7 +137,6 @@
|
||||||
/~inventory.propC2: AND upper(inventory.propC2) LIKE upper({inventory.propC2})~/
|
/~inventory.propC2: AND upper(inventory.propC2) LIKE upper({inventory.propC2})~/
|
||||||
/~inventory.propC3: AND upper(inventory.propC3) LIKE upper({inventory.propC3})~/
|
/~inventory.propC3: AND upper(inventory.propC3) LIKE upper({inventory.propC3})~/
|
||||||
/~inventory.propC5: AND upper(inventory.propC5) LIKE upper({inventory.propC5})~/
|
/~inventory.propC5: AND upper(inventory.propC5) LIKE upper({inventory.propC5})~/
|
||||||
/~propC9: AND upper(inventory.propC9) LIKE upper({propC9})~/
|
|
||||||
/~inventory.status: AND upper(inventory.status) LIKE upper({inventory.status})~/
|
/~inventory.status: AND upper(inventory.status) LIKE upper({inventory.status})~/
|
||||||
/~inventory.kqName: and inventory.zone.id = {inventory.kqName}~/
|
/~inventory.kqName: and inventory.zone.id = {inventory.kqName}~/
|
||||||
/~pickTicketDetail.location.id: and inventory.location.id = {pickTicketDetail.location.id}~/
|
/~pickTicketDetail.location.id: and inventory.location.id = {pickTicketDetail.location.id}~/
|
||||||
|
|
|
||||||
|
|
@ -45,14 +45,9 @@
|
||||||
warehouseArea.name
|
warehouseArea.name
|
||||||
from WarehouseArea warehouseArea where 1=1 and warehouseArea.disabled=false order by warehouseArea.name]]></hql>
|
from WarehouseArea warehouseArea where 1=1 and warehouseArea.disabled=false order by warehouseArea.name]]></hql>
|
||||||
</list>
|
</list>
|
||||||
|
<text id="propC2" title="LOC" row="3" col="1"
|
||||||
<list id="propC2" title="LOC" row="3" col="1"
|
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||||
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
inVisible="false" trimSpace="false" />
|
||||||
forceOverride="false" manualEditable="true">
|
|
||||||
<hql><![CDATA[ select pl.code,
|
|
||||||
pl.code
|
|
||||||
from PlantLocation pl where 1=1 and pl.disabled=false order by pl.code]]></hql>
|
|
||||||
</list>
|
|
||||||
<text id="propC3" title="特殊标记" row="3" col="2"
|
<text id="propC3" title="特殊标记" row="3" col="2"
|
||||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||||
inVisible="false" trimSpace="false" />
|
inVisible="false" trimSpace="false" />
|
||||||
|
|
@ -61,8 +56,8 @@
|
||||||
enumType="PickTicketStatus">
|
enumType="PickTicketStatus">
|
||||||
<hql><![CDATA[ SELECT
|
<hql><![CDATA[ SELECT
|
||||||
commonCode.code,
|
commonCode.code,
|
||||||
commonCode.code From PlantInfo commonCode
|
commonCode.name From CommonCode commonCode
|
||||||
where commonCode.disabled = false]]></hql>
|
where commonCode.codeType = '工厂']]></hql>
|
||||||
</list>
|
</list>
|
||||||
<text id="propC5" title="供应商代码" row="4" col="2"
|
<text id="propC5" title="供应商代码" row="4" col="2"
|
||||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||||
|
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<pages>
|
|
||||||
<editPage id="editNullNewStockPage" title="空托盘"
|
|
||||||
entityClass="com.dev.swms.server.model.inventory.Inventory" onClose="refreshParent"
|
|
||||||
width="300" height="200">
|
|
||||||
<inputUIs>
|
|
||||||
<hidden id="l.id" reserve="false" />
|
|
||||||
|
|
||||||
<!-- <text id="hj" title="工作站" row="1" col="1" readOnly="false" -->
|
|
||||||
<!-- required="false" reserve="false" forceOverride="false" inVisible="false" -->
|
|
||||||
<!-- trimSpace="false" /> -->
|
|
||||||
<!-- trimSpace="false" /> -->
|
|
||||||
<list id="hj" title="工作站" row="1" col="1" width="120px" readOnly="false" required="false" reserve="false" forceOverride="false" enumType="STATUS">
|
|
||||||
<hql><![CDATA[SELECT
|
|
||||||
ls.code,
|
|
||||||
ls.code
|
|
||||||
FROM LocationStorage ls
|
|
||||||
WHERE 1=1
|
|
||||||
and ls.name in ('602','603','604','605')
|
|
||||||
]]></hql>
|
|
||||||
</list>
|
|
||||||
<!-- <checkbox id="ordersAll" title="是否加急" row="5" col="2" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/> -->
|
|
||||||
</inputUIs>
|
|
||||||
<buttons>
|
|
||||||
<commit id="stockby122" title="搬运"
|
|
||||||
enableType="none" invisible="false">
|
|
||||||
<mappings>
|
|
||||||
<mapping id="hj" className="string" />
|
|
||||||
<mapping id="parentIds" className="list" />
|
|
||||||
</mappings>
|
|
||||||
<actions>
|
|
||||||
<action managerName="moveDocManager" methodName="stockLibrartTask" parameter="hj,parentIds,ordersAll" />
|
|
||||||
</actions>
|
|
||||||
<forwards>
|
|
||||||
<forward name="refreshParent" newEnabled="true"
|
|
||||||
editEnabled="true" />
|
|
||||||
<forward name="closeWindow" newEnabled="true" editEnabled="true" />
|
|
||||||
</forwards>
|
|
||||||
</commit>
|
|
||||||
</buttons>
|
|
||||||
</editPage>
|
|
||||||
</pages>
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<pages>
|
|
||||||
<editPage id="editPrintAsnBillPage" title="批量打印"
|
|
||||||
entityClass="com.dev.swms.server.model.receiving.ASN" width="200"
|
|
||||||
height="220">
|
|
||||||
<inputUIs>
|
|
||||||
<hidden id="task.id" reserve="false" />
|
|
||||||
<list id="print" title="打印机" row="0" span="1"
|
|
||||||
width="120" readOnly="false" required="true" reserve="true" forceOverride="true" >
|
|
||||||
<hql><![CDATA[ select
|
|
||||||
w.id,
|
|
||||||
w.printName
|
|
||||||
from PrintEquipment w
|
|
||||||
where 1=1
|
|
||||||
]]></hql>
|
|
||||||
</list>
|
|
||||||
|
|
||||||
</inputUIs>
|
|
||||||
<buttons>
|
|
||||||
<commit id="pick" title="0013D4FC457C1190272672531"
|
|
||||||
enableType="none" invisible="false">
|
|
||||||
<mappings>
|
|
||||||
<mapping id="parentIds" className="list" />
|
|
||||||
<mapping id="print" className="long" />
|
|
||||||
</mappings>
|
|
||||||
<actions>
|
|
||||||
<action managerName="asnManager" methodName="printOrderAll"
|
|
||||||
parameter="parentIds,print" />
|
|
||||||
</actions>
|
|
||||||
<forwards>
|
|
||||||
<forward name="refreshParent" newEnabled="true"
|
|
||||||
editEnabled="true" />
|
|
||||||
<forward name="closeWindow" newEnabled="true" editEnabled="true" />
|
|
||||||
</forwards>
|
|
||||||
</commit>
|
|
||||||
</buttons>
|
|
||||||
</editPage>
|
|
||||||
</pages>
|
|
||||||
|
|
@ -173,9 +173,6 @@
|
||||||
<popup id="print" title="标签打印" enableType="single" invisible="false"
|
<popup id="print" title="标签打印" enableType="single" invisible="false"
|
||||||
containId="true" pageId="maintainASNprintPage">
|
containId="true" pageId="maintainASNprintPage">
|
||||||
</popup>
|
</popup>
|
||||||
<popup id="printOrderAll" title="批量打印" enableType="multi" invisible="false"
|
|
||||||
containId="true" pageId="editPrintAsnBillPage">
|
|
||||||
</popup>
|
|
||||||
|
|
||||||
</buttons>
|
</buttons>
|
||||||
</maintainPage>
|
</maintainPage>
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
<list id="inventory.kqName" title="库区" row="1" col="2"
|
<list id="inventory.kqName" title="库区" row="1" col="2"
|
||||||
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
||||||
forceOverride="false" manualEditable="true">
|
forceOverride="false" manualEditable="true">
|
||||||
<hql><![CDATA[ select warehouseArea.id,
|
<hql><![CDATA[ select warehouseArea.name,
|
||||||
warehouseArea.name
|
warehouseArea.name
|
||||||
from WarehouseArea warehouseArea where 1=1 and warehouseArea.disabled=false order by warehouseArea.name]]></hql>
|
from WarehouseArea warehouseArea where 1=1 and warehouseArea.disabled=false order by warehouseArea.name]]></hql>
|
||||||
</list>
|
</list>
|
||||||
|
|
@ -146,7 +146,7 @@
|
||||||
/~rs.id : and rs.id = {rs.id}~/
|
/~rs.id : and rs.id = {rs.id}~/
|
||||||
/~ad.lotInfo.propC9: AND ad.lotInfo.propC9 like {ad.lotInfo.propC9} ~/
|
/~ad.lotInfo.propC9: AND ad.lotInfo.propC9 like {ad.lotInfo.propC9} ~/
|
||||||
/~beInput: AND ad.beInput= {beInput} ~/
|
/~beInput: AND ad.beInput= {beInput} ~/
|
||||||
/~inventory.kqName: and rd.warehouseArea.id like {inventory.kqName} ~/
|
/~inventory.kqName: and rd.warehouseArea.name like {inventory.kqName} ~/
|
||||||
/~rd.itemKey.lotInfo.propC1: AND rd.itemKey.lotInfo.propC1 like {rd.itemKey.lotInfo.propC1} ~/
|
/~rd.itemKey.lotInfo.propC1: AND rd.itemKey.lotInfo.propC1 like {rd.itemKey.lotInfo.propC1} ~/
|
||||||
/~rd.itemKey.lotInfo.propC2: AND rd.itemKey.lotInfo.propC2 like {rd.itemKey.lotInfo.propC2} ~/
|
/~rd.itemKey.lotInfo.propC2: AND rd.itemKey.lotInfo.propC2 like {rd.itemKey.lotInfo.propC2} ~/
|
||||||
/~rd.itemKey.lotInfo.propC3: AND rd.itemKey.lotInfo.propC3 like {rd.itemKey.lotInfo.propC3} ~/
|
/~rd.itemKey.lotInfo.propC3: AND rd.itemKey.lotInfo.propC3 like {rd.itemKey.lotInfo.propC3} ~/
|
||||||
|
|
|
||||||
|
|
@ -18,14 +18,9 @@
|
||||||
<text id="loc.code" title="库位号" row="1" col="3" readOnly="false"
|
<text id="loc.code" title="库位号" row="1" col="3" readOnly="false"
|
||||||
required="false" reserve="false" forceOverride="false" inVisible="false"
|
required="false" reserve="false" forceOverride="false" inVisible="false"
|
||||||
trimSpace="false" />
|
trimSpace="false" />
|
||||||
|
<text id="rd.itemKey.lotInfo.propC2" title="LOC" row="2" col="2" readOnly="false"
|
||||||
<list id="rd.itemKey.lotInfo.propC2" title="LOC" row="2" col="2"
|
required="false" reserve="false" forceOverride="false" inVisible="false"
|
||||||
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
trimSpace="false" />
|
||||||
forceOverride="false" manualEditable="true">
|
|
||||||
<hql><![CDATA[ select pl.code,
|
|
||||||
pl.code
|
|
||||||
from PlantLocation pl where 1=1 and pl.disabled=false order by pl.code]]></hql>
|
|
||||||
</list>
|
|
||||||
<text id="rd.itemKey.lotInfo.propC3" title="特殊标记" row="2" col="3" readOnly="false"
|
<text id="rd.itemKey.lotInfo.propC3" title="特殊标记" row="2" col="3" readOnly="false"
|
||||||
required="false" reserve="false" forceOverride="false" inVisible="false"
|
required="false" reserve="false" forceOverride="false" inVisible="false"
|
||||||
trimSpace="false" />
|
trimSpace="false" />
|
||||||
|
|
@ -34,8 +29,8 @@
|
||||||
enumType="PickTicketStatus">
|
enumType="PickTicketStatus">
|
||||||
<hql><![CDATA[ SELECT
|
<hql><![CDATA[ SELECT
|
||||||
commonCode.code,
|
commonCode.code,
|
||||||
commonCode.code From PlantInfo commonCode
|
commonCode.name From CommonCode commonCode
|
||||||
where commonCode.disabled = false ]]></hql>
|
where commonCode.codeType = '工厂']]></hql>
|
||||||
</list>
|
</list>
|
||||||
|
|
||||||
<checkbox id="ordersAll" title="ordersAll" row="6" col="1" defaultValue="false" span="1" readOnly="false"
|
<checkbox id="ordersAll" title="ordersAll" row="6" col="1" defaultValue="false" span="1" readOnly="false"
|
||||||
|
|
@ -75,7 +70,7 @@
|
||||||
/~ad.strBill7: AND (rd.strBill2) like ({ad.strBill7}) ~/
|
/~ad.strBill7: AND (rd.strBill2) like ({ad.strBill7}) ~/
|
||||||
/~item.code: AND (item.code) like ({item.code}) ~/
|
/~item.code: AND (item.code) like ({item.code}) ~/
|
||||||
/~barcode: AND (item.barcode) like ({barcode}) ~/
|
/~barcode: AND (item.barcode) like ({barcode}) ~/
|
||||||
/~ad.lotInfo.propC9: AND rd.itemKey.lotInfo.propC9 like {ad.lotInfo.propC9} ~/
|
/~ad.lotInfo.propC9: AND ad.lotInfo.propC9 like {ad.lotInfo.propC9} ~/
|
||||||
/~rd.itemKey.lotInfo.propC1: AND rd.itemKey.lotInfo.propC1 like {rd.itemKey.lotInfo.propC1} ~/
|
/~rd.itemKey.lotInfo.propC1: AND rd.itemKey.lotInfo.propC1 like {rd.itemKey.lotInfo.propC1} ~/
|
||||||
/~rd.itemKey.lotInfo.propC2: AND rd.itemKey.lotInfo.propC2 like {rd.itemKey.lotInfo.propC2} ~/
|
/~rd.itemKey.lotInfo.propC2: AND rd.itemKey.lotInfo.propC2 like {rd.itemKey.lotInfo.propC2} ~/
|
||||||
/~rd.itemKey.lotInfo.propC3: AND rd.itemKey.lotInfo.propC3 like {rd.itemKey.lotInfo.propC3} ~/
|
/~rd.itemKey.lotInfo.propC3: AND rd.itemKey.lotInfo.propC3 like {rd.itemKey.lotInfo.propC3} ~/
|
||||||
|
|
|
||||||
|
|
@ -107,12 +107,7 @@
|
||||||
row="9" col="2" readOnly="false" required="false" reserve="false"
|
row="9" col="2" readOnly="false" required="false" reserve="false"
|
||||||
forceOverride="false" inVisible="false" showTime="false"
|
forceOverride="false" inVisible="false" showTime="false"
|
||||||
manualEditable="true" defaultCurrentDate="false" />
|
manualEditable="true" defaultCurrentDate="false" />
|
||||||
<list id="billType.name" title="单据类型" row="10" col="1" width="120px" readOnly="false" required="false" reserve="false" forceOverride="false" enumType="BillType">
|
<checkbox id="ordersAll" title="ordersAll" row="10" col="1" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||||
<hql><![CDATA[ SELECT
|
|
||||||
billType.id,
|
|
||||||
billType.name From BillType billType]]></hql>
|
|
||||||
</list>
|
|
||||||
<checkbox id="ordersAll" title="ordersAll" row="11" col="1" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
|
||||||
|
|
||||||
</inputUIs>
|
</inputUIs>
|
||||||
</search>
|
</search>
|
||||||
|
|
@ -154,7 +149,6 @@
|
||||||
FROM Task task
|
FROM Task task
|
||||||
LEFT JOIN task.pickTicketDetail as pickTicketDetail
|
LEFT JOIN task.pickTicketDetail as pickTicketDetail
|
||||||
LEFT JOIN task.pickTicketDetail.pickTicket as pickTicket
|
LEFT JOIN task.pickTicketDetail.pickTicket as pickTicket
|
||||||
left join pickTicket.billType as billType
|
|
||||||
LEFT JOIN task.itemKey as itemKey
|
LEFT JOIN task.itemKey as itemKey
|
||||||
left join task.waveDoc as waveDoc
|
left join task.waveDoc as waveDoc
|
||||||
LEFT JOIN task.itemKey.item as item
|
LEFT JOIN task.itemKey.item as item
|
||||||
|
|
@ -195,7 +189,6 @@
|
||||||
/~task.strBill4: AND task.strBill4 LIKE {task.strBill4}~/
|
/~task.strBill4: AND task.strBill4 LIKE {task.strBill4}~/
|
||||||
/~propC2: AND itemKey.lotInfo.propC2 like {propC2} ~/)
|
/~propC2: AND itemKey.lotInfo.propC2 like {propC2} ~/)
|
||||||
/~szone.id: AND szone.id = {szone.id}~/
|
/~szone.id: AND szone.id = {szone.id}~/
|
||||||
/~billType.name: AND billType.id = {billType.name}~/
|
|
||||||
order by task.pickTicketDetail.pickTicket.orderDate,task.id desc
|
order by task.pickTicketDetail.pickTicket.orderDate,task.id desc
|
||||||
]]></datasource>
|
]]></datasource>
|
||||||
<columns>
|
<columns>
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
<columns>
|
<columns>
|
||||||
<column id="pickTicket.id" title="pickTicket" visible="false" />
|
<column id="pickTicket.id" title="pickTicket" visible="false" />
|
||||||
<column id="pickTicket.collectNo" width="140" title="预留号"
|
<column id="pickTicket.collectNo" width="140" title="预留号"
|
||||||
visible="true" horizonAlign="center" />
|
visible="true" horizonAlign="center" format="colourPickTicket"/>
|
||||||
<column id="pickTicket.sourceType" width="80" title="出库类型"
|
<column id="pickTicket.sourceType" width="80" title="出库类型"
|
||||||
visible="true" horizonAlign="center" />
|
visible="true" horizonAlign="center" />
|
||||||
<column id="pickTicket.orderDate1" width="120" title="需求日期"
|
<column id="pickTicket.orderDate1" width="120" title="需求日期"
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,6 @@
|
||||||
agv.dateTime3,
|
agv.dateTime3,
|
||||||
agv.dateTime3,
|
agv.dateTime3,
|
||||||
agv.jobPriorityType,
|
agv.jobPriorityType,
|
||||||
agv.agvStartSlotCode,
|
|
||||||
szone.name,
|
szone.name,
|
||||||
pickTicket.sourceType,
|
pickTicket.sourceType,
|
||||||
billType.name,
|
billType.name,
|
||||||
|
|
@ -174,7 +173,6 @@
|
||||||
pickTicket.equatedQuantity,
|
pickTicket.equatedQuantity,
|
||||||
t.barCode,
|
t.barCode,
|
||||||
t.inventoryStatus,
|
t.inventoryStatus,
|
||||||
t.strBill10,
|
|
||||||
pickTicketDetail.lineNumber,
|
pickTicketDetail.lineNumber,
|
||||||
pickTicket.updateTime,
|
pickTicket.updateTime,
|
||||||
pickTicket.updateTime,
|
pickTicket.updateTime,
|
||||||
|
|
@ -261,7 +259,9 @@
|
||||||
/~pickTicket.equatedQuantity: AND (({pickTicket.equatedQuantity}=true and pickTicket.equatedQuantity>'A' ) or ({pickTicket.equatedQuantity}=false and pickTicket.equatedQuantity<'A' )) ~/
|
/~pickTicket.equatedQuantity: AND (({pickTicket.equatedQuantity}=true and pickTicket.equatedQuantity>'A' ) or ({pickTicket.equatedQuantity}=false and pickTicket.equatedQuantity<'A' )) ~/
|
||||||
/~billType.name: AND billType.id = {billType.name}~/
|
/~billType.name: AND billType.id = {billType.name}~/
|
||||||
/~dLzone.name: AND dLzone.name = {dLzone.name}~/
|
/~dLzone.name: AND dLzone.name = {dLzone.name}~/
|
||||||
|
|
||||||
/~agv.status: AND agv.status ={agv.status} ~/
|
/~agv.status: AND agv.status ={agv.status} ~/
|
||||||
|
|
||||||
/~billCode: AND (t.billCode) LIKE ({billCode})~/
|
/~billCode: AND (t.billCode) LIKE ({billCode})~/
|
||||||
/~t.strBill1: AND t.strBill1 LIKE {t.strBill1}~/
|
/~t.strBill1: AND t.strBill1 LIKE {t.strBill1}~/
|
||||||
/~warehouseArea.id: AND szone.id = {warehouseArea.id}~/
|
/~warehouseArea.id: AND szone.id = {warehouseArea.id}~/
|
||||||
|
|
@ -288,7 +288,6 @@
|
||||||
<column id="agv.dateTime3234" title="到输送线日期" visible="false" horizonAlign="center" format="dateFormatter" />
|
<column id="agv.dateTime3234" title="到输送线日期" visible="false" horizonAlign="center" format="dateFormatter" />
|
||||||
<column id="agv.dateTime3314" title="到输送线时间" visible="false" horizonAlign="center" format="dateTiemFormatter" />
|
<column id="agv.dateTime3314" title="到输送线时间" visible="false" horizonAlign="center" format="dateTiemFormatter" />
|
||||||
<column id="agv.jobPriorityType" title="AGV等级" width="80" visible="false" horizonAlign="center" />
|
<column id="agv.jobPriorityType" title="AGV等级" width="80" visible="false" horizonAlign="center" />
|
||||||
<column id="agv.agvStartSlotCode" title="料箱位置编码" width="80" visible="false" horizonAlign="center" />
|
|
||||||
<column id="szone.name" title="拣货库区" visible="true" horizonAlign="center" />
|
<column id="szone.name" title="拣货库区" visible="true" horizonAlign="center" />
|
||||||
<column id="pickTicket.sourceType" title="SAP类型" width="100" visible="true" horizonAlign="center" />
|
<column id="pickTicket.sourceType" title="SAP类型" width="100" visible="true" horizonAlign="center" />
|
||||||
<column id="billType.name" title="单据类型" width="100" visible="true" horizonAlign="center" />
|
<column id="billType.name" title="单据类型" width="100" visible="true" horizonAlign="center" />
|
||||||
|
|
@ -315,7 +314,6 @@
|
||||||
<column id="pickTicket.equatedQuantity" title="加急标记" visible="true" horizonAlign="center" />
|
<column id="pickTicket.equatedQuantity" title="加急标记" visible="true" horizonAlign="center" />
|
||||||
<column id="t.barCode" title="序列号" visible="true" horizonAlign="center" />
|
<column id="t.barCode" title="序列号" visible="true" horizonAlign="center" />
|
||||||
<column id="t.inventoryStatus" title="库存状态" visible="true" horizonAlign="center" />
|
<column id="t.inventoryStatus" title="库存状态" visible="true" horizonAlign="center" />
|
||||||
<column id="t.strBill10" title="是否退料" visible="true" horizonAlign="center" />
|
|
||||||
<column id="pickTicketDetail.lineNumber" title="项号" visible="true" horizonAlign="center" />
|
<column id="pickTicketDetail.lineNumber" title="项号" visible="true" horizonAlign="center" />
|
||||||
<column id="pickTicket.updateTime1" title="创建日期" visible="true"
|
<column id="pickTicket.updateTime1" title="创建日期" visible="true"
|
||||||
horizonAlign="center" format="dateFormatter" />
|
horizonAlign="center" format="dateFormatter" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue