no message
parent
5189398d66
commit
771ce18c17
|
|
@ -126,6 +126,7 @@ import com.dev.energy.server.util.LocalizedMessage;
|
|||
import com.dev.energy.server.web.security.UserHolder;
|
||||
import com.sun.mail.util.MailSSLSocketFactory;
|
||||
import com.sun.org.apache.xpath.internal.operations.And;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
/**
|
||||
* @author dev
|
||||
|
|
@ -3706,6 +3707,8 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven
|
|||
}
|
||||
}
|
||||
|
||||
/*输送线上的库存*/
|
||||
private static List<Long> invIds =new ArrayList<Long>();
|
||||
//添加整理库存
|
||||
public void createReceivingInventory(ReceivedRecord receivedRecord,Location dstloc) {
|
||||
|
||||
|
|
@ -3743,5 +3746,4 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -16,6 +16,7 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
|
|
@ -97,6 +98,7 @@ import com.dev.energy.server.model.EntityFactory;
|
|||
import com.dev.energy.server.service.pojo.DefaultBaseManager;
|
||||
import com.dev.energy.server.util.LocalizedMessage;
|
||||
import com.dev.energy.server.web.security.UserHolder;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
/**
|
||||
* @author dev
|
||||
|
|
@ -1524,7 +1526,6 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void allocateWaveDoc(List<Long> WaveDocIds) {
|
||||
for(Long id:WaveDocIds){
|
||||
|
|
@ -1535,10 +1536,21 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
|||
new String[] { "id"},new Object[] {wd.getId()});
|
||||
if(PickTicketDetails.size()>0){
|
||||
for(PickTicketDetail ptd :PickTicketDetails){
|
||||
StringBuffer sqlBuffer=new StringBuffer();
|
||||
sqlBuffer.append(" from Inventory i where i.itemKey.item.id=:id and i.status='已入库' and i.location.type not in ('RECEIVE','SHIP') and i.quantity-i.queuedQuantity>0 "
|
||||
+" order by ");
|
||||
if (invIds.size()>0) {
|
||||
sqlBuffer.append(" CASE "
|
||||
+" WHEN i.id IN ("+invIds.stream()
|
||||
.map(String::valueOf)
|
||||
.collect(Collectors.joining(","))+") THEN 1 "
|
||||
+" ELSE 0 "
|
||||
+" END, ");
|
||||
}
|
||||
sqlBuffer.append("i.itemKey.lotInfo.propC3,i.itemKey.lotInfo.propC1,i.quantity");
|
||||
//分配库存
|
||||
List<Inventory> Inventorys = commonDao.findByQuery(
|
||||
" from Inventory i where i.itemKey.item.id=:id and i.status='已入库' and i.location.type not in ('RECEIVE','SHIP') and i.quantity-i.queuedQuantity>0 "
|
||||
+" order by i.itemKey.lotInfo.propC3,i.itemKey.lotInfo.propC1,i.quantity",
|
||||
sqlBuffer.toString(),
|
||||
new String[] { "id" },new Object[] { ptd.getItem().getId() });
|
||||
if (Inventorys.size() > 0) {
|
||||
double allocatedQuantity = 0;
|
||||
|
|
@ -1573,6 +1585,17 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
|||
task.setItemKey(inventory.getItemKey());
|
||||
task.setStorageDate(inventory.getStorageDate());
|
||||
task.setSrcLoc(inventory.getLocation());
|
||||
if (inventory.getLocation().getStock()!=null) {
|
||||
task.setStrBill7(inventory.getLocation().getStock().getLP());
|
||||
}
|
||||
String tItemCode=item.getCode().substring(0, 9);
|
||||
String ptCode = ptd.getPickTicket().getCode();
|
||||
char lastChar = ptCode.charAt(ptCode.length() - 1);
|
||||
if (Character.isUpperCase(lastChar)) {
|
||||
//System.out.println("最后一位是大写字母");
|
||||
task.setStrBill8(tItemCode+lastChar);
|
||||
}
|
||||
|
||||
task.setSOI(inventory.getSOI());
|
||||
task.setPlanQuantity(allocateQty);
|
||||
task.setPlanQuantityMU(allocateQty);
|
||||
|
|
@ -1595,7 +1618,6 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
|||
logger.info("无波次任务!"+"\n");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public void allocatePlanAll(List<Long> WaveDocIds) {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue