提交图片查询代和接口优化
parent
cf33668c79
commit
70b7f48778
|
|
@ -119,5 +119,9 @@
|
|||
<classpathentry kind="var" path="MAVEN_REPO/commons-fileupload/jars/commons-fileupload-1.2.1.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/commons-io/jars/commons-io-1.3.2.jar"/>
|
||||
<classpathentry kind="var" path="MAVEN_REPO/poi/jars/poi-3.0.1.jar"/>
|
||||
<classpathentry kind="lib" path="D:/maven-1.0.2/repository/ant/jars/ant-1.6.2.jar"/>
|
||||
<classpathentry kind="lib" path="D:/maven-1.0.2/repository/commons-el/jars/commons-el.jar"/>
|
||||
<classpathentry kind="lib" path="D:/maven-1.0.2/repository/jstl/jars/jstl.jar"/>
|
||||
<classpathentry kind="lib" path="D:/maven-1.0.2/repository/jstl/jars/standard.jar"/>
|
||||
<classpathentry kind="output" path="target/zwwms/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
|||
|
|
@ -48,10 +48,16 @@ public class PostTest {
|
|||
// }fe80::2db:5cff:feea:c24f%wlan0
|
||||
// String str= getMacByIP("192.168.2.88");
|
||||
// "10-12-04".substring(2, 3);
|
||||
|
||||
|
||||
String ts="10-11-02";
|
||||
logger.info(ts.substring(6, 2));
|
||||
Date date=new Date();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
int month = calendar.get(Calendar.MONTH)+1;
|
||||
int year=calendar.get(Calendar.YEAR);
|
||||
logger.info("date---"+date);
|
||||
logger.info("month---"+month);
|
||||
logger.info("year---"+year);
|
||||
// String ts="10-11-02";
|
||||
// logger.info(ts.substring(6, 2));
|
||||
// String input = "hello123456";
|
||||
// String encrypted = encryptMD5(input);
|
||||
// logger.info("MD5加密后的字符串为: " + encrypted);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
package com.dev.swms.server.action.formatter;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.List;
|
||||
|
||||
import com.dev.energy.server.format.Formatter;
|
||||
|
||||
public class LookSignFileFormatter implements Formatter{
|
||||
|
||||
public String format(String property, Object cellValue, List origenData,
|
||||
String referenceModel, String locale) {
|
||||
//String type = cellValue == null ? "" : cellValue.toString();
|
||||
String result = "";
|
||||
String IP="";
|
||||
try {
|
||||
//获取IP地址
|
||||
InetAddress addr = InetAddress.getLocalHost();
|
||||
IP=addr.getHostAddress();
|
||||
} catch (UnknownHostException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
// System.out.println("IP:"+IP);
|
||||
String id = String.valueOf(origenData.get(0));
|
||||
String type ="D";// String.valueOf(origenData.get(8));
|
||||
result="<a href=\"http://"+IP+":8080/zwwms/iqs?aorptid="+id+"&type="+type+"\" target=\"_Blank\" style=\"color: blue;\">"+"照片查看"+"</a>";
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -43,6 +43,9 @@ public class ItemKey extends Entity {
|
|||
/** 包含库存 */
|
||||
private Set<Inventory> inventories = new HashSet<Inventory>();
|
||||
|
||||
private boolean beMarkWeight=false;//是否序列号
|
||||
|
||||
|
||||
public Set<Inventory> getInventories() {
|
||||
return inventories;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ public class SignFile extends Entity{
|
|||
/**备注*/
|
||||
private String remark;//下载路径
|
||||
|
||||
private String viewfileUrl;//查询地址
|
||||
|
||||
private double length=0;//长
|
||||
private double width=0;//宽
|
||||
private double height=0;//高
|
||||
|
|
@ -34,6 +36,12 @@ public class SignFile extends Entity{
|
|||
private int packNumber=0;//规格数量
|
||||
|
||||
|
||||
public String getViewfileUrl() {
|
||||
return viewfileUrl;
|
||||
}
|
||||
public void setViewfileUrl(String viewfileUrl) {
|
||||
this.viewfileUrl = viewfileUrl;
|
||||
}
|
||||
public double getLength() {
|
||||
return length;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,5 +53,6 @@
|
|||
<property name="weight" column="WEIGHT" type="double" />
|
||||
<property name="volume" column="VOLUME" type="double" />
|
||||
<property name="packNumber" type="integer" column="PACK_NUMBER" />
|
||||
<property name="viewfileUrl" type="string" length="200" column="viewfileUrl"/>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
|
|
@ -64,7 +64,7 @@ public class InventoryLog extends Entity {
|
|||
private String strbill1;//移动类型
|
||||
private String strbill2;//-LOC
|
||||
private String strbill3;//工厂
|
||||
|
||||
private String itemCode;//料号
|
||||
|
||||
public String getStrbill1() {
|
||||
return strbill1;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,257 @@
|
|||
package com.dev.swms.server.model.inventory;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.dev.energy.server.model.Entity;
|
||||
import com.dev.swms.server.model.base.Location;
|
||||
import com.dev.swms.server.model.base.WarehouseArea;
|
||||
|
||||
public class InventoryQueryView extends Entity{
|
||||
|
||||
private Long id;//序号
|
||||
private String locCode;//库位
|
||||
private String itemCode;//物料号
|
||||
private String UNIT;//单位
|
||||
private String itemName;//物料描述
|
||||
private String status;//库存状态
|
||||
private double quantity;//库存数量
|
||||
private double queuedQuantity;//占用数量
|
||||
private String propC1;//批号
|
||||
private String propC2;//LOC
|
||||
private String propC3;//特殊标记-箱号
|
||||
private String propC4;//序列号
|
||||
private String propC5;//特殊库存业务编号
|
||||
private String propC6;//需求人
|
||||
private String propC7;//
|
||||
private String propC8;//
|
||||
private String propC9;//工厂
|
||||
private String propLC1;//OA暂存库存标记
|
||||
private String propLC2;//成品标记/扩展2
|
||||
private String propLC3;//元值/扩展1
|
||||
private String propLC4;//币种
|
||||
private String propLC5;//用途
|
||||
private Date propD1;//生产日期
|
||||
private Date propD2;//失效日期
|
||||
private Date propD3;//预计取回日期
|
||||
private String kqName;//库区
|
||||
private Date storageDate;//存货日期
|
||||
private boolean lock;//盘点锁定
|
||||
private boolean beSAPItem;////是否SAP料号
|
||||
private Location location;////
|
||||
private boolean validity=false;//是否有效期
|
||||
private String statuss;//库存状态
|
||||
private WarehouseArea zone;//库区
|
||||
private String moveStatus;//移动工作站
|
||||
private String invDes;//冻结备注
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getLocCode() {
|
||||
return locCode;
|
||||
}
|
||||
public void setLocCode(String locCode) {
|
||||
this.locCode = locCode;
|
||||
}
|
||||
public String getItemCode() {
|
||||
return itemCode;
|
||||
}
|
||||
public void setItemCode(String itemCode) {
|
||||
this.itemCode = itemCode;
|
||||
}
|
||||
public String getUNIT() {
|
||||
return UNIT;
|
||||
}
|
||||
public void setUNIT(String uNIT) {
|
||||
UNIT = uNIT;
|
||||
}
|
||||
public String getItemName() {
|
||||
return itemName;
|
||||
}
|
||||
public void setItemName(String itemName) {
|
||||
this.itemName = itemName;
|
||||
}
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
public double getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
public void setQuantity(double quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
public double getQueuedQuantity() {
|
||||
return queuedQuantity;
|
||||
}
|
||||
public void setQueuedQuantity(double queuedQuantity) {
|
||||
this.queuedQuantity = queuedQuantity;
|
||||
}
|
||||
public String getPropC1() {
|
||||
return propC1;
|
||||
}
|
||||
public void setPropC1(String propC1) {
|
||||
this.propC1 = propC1;
|
||||
}
|
||||
public String getPropC2() {
|
||||
return propC2;
|
||||
}
|
||||
public void setPropC2(String propC2) {
|
||||
this.propC2 = propC2;
|
||||
}
|
||||
public String getPropC3() {
|
||||
return propC3;
|
||||
}
|
||||
public void setPropC3(String propC3) {
|
||||
this.propC3 = propC3;
|
||||
}
|
||||
public String getPropC4() {
|
||||
return propC4;
|
||||
}
|
||||
public void setPropC4(String propC4) {
|
||||
this.propC4 = propC4;
|
||||
}
|
||||
public String getPropC5() {
|
||||
return propC5;
|
||||
}
|
||||
public void setPropC5(String propC5) {
|
||||
this.propC5 = propC5;
|
||||
}
|
||||
public String getPropC6() {
|
||||
return propC6;
|
||||
}
|
||||
public void setPropC6(String propC6) {
|
||||
this.propC6 = propC6;
|
||||
}
|
||||
public String getPropC7() {
|
||||
return propC7;
|
||||
}
|
||||
public void setPropC7(String propC7) {
|
||||
this.propC7 = propC7;
|
||||
}
|
||||
public String getPropC8() {
|
||||
return propC8;
|
||||
}
|
||||
public void setPropC8(String propC8) {
|
||||
this.propC8 = propC8;
|
||||
}
|
||||
public String getPropC9() {
|
||||
return propC9;
|
||||
}
|
||||
public void setPropC9(String propC9) {
|
||||
this.propC9 = propC9;
|
||||
}
|
||||
public String getPropLC1() {
|
||||
return propLC1;
|
||||
}
|
||||
public void setPropLC1(String propLC1) {
|
||||
this.propLC1 = propLC1;
|
||||
}
|
||||
public String getPropLC2() {
|
||||
return propLC2;
|
||||
}
|
||||
public void setPropLC2(String propLC2) {
|
||||
this.propLC2 = propLC2;
|
||||
}
|
||||
public String getPropLC3() {
|
||||
return propLC3;
|
||||
}
|
||||
public void setPropLC3(String propLC3) {
|
||||
this.propLC3 = propLC3;
|
||||
}
|
||||
public String getPropLC4() {
|
||||
return propLC4;
|
||||
}
|
||||
public void setPropLC4(String propLC4) {
|
||||
this.propLC4 = propLC4;
|
||||
}
|
||||
public String getPropLC5() {
|
||||
return propLC5;
|
||||
}
|
||||
public void setPropLC5(String propLC5) {
|
||||
this.propLC5 = propLC5;
|
||||
}
|
||||
public Date getPropD1() {
|
||||
return propD1;
|
||||
}
|
||||
public void setPropD1(Date propD1) {
|
||||
this.propD1 = propD1;
|
||||
}
|
||||
public Date getPropD2() {
|
||||
return propD2;
|
||||
}
|
||||
public void setPropD2(Date propD2) {
|
||||
this.propD2 = propD2;
|
||||
}
|
||||
public Date getPropD3() {
|
||||
return propD3;
|
||||
}
|
||||
public void setPropD3(Date propD3) {
|
||||
this.propD3 = propD3;
|
||||
}
|
||||
public String getKqName() {
|
||||
return kqName;
|
||||
}
|
||||
public void setKqName(String kqName) {
|
||||
this.kqName = kqName;
|
||||
}
|
||||
public Date getStorageDate() {
|
||||
return storageDate;
|
||||
}
|
||||
public void setStorageDate(Date storageDate) {
|
||||
this.storageDate = storageDate;
|
||||
}
|
||||
public boolean isLock() {
|
||||
return lock;
|
||||
}
|
||||
public void setLock(boolean lock) {
|
||||
this.lock = lock;
|
||||
}
|
||||
public boolean isBeSAPItem() {
|
||||
return beSAPItem;
|
||||
}
|
||||
public void setBeSAPItem(boolean beSAPItem) {
|
||||
this.beSAPItem = beSAPItem;
|
||||
}
|
||||
public Location getLocation() {
|
||||
return location;
|
||||
}
|
||||
public void setLocation(Location location) {
|
||||
this.location = location;
|
||||
}
|
||||
public boolean isValidity() {
|
||||
return validity;
|
||||
}
|
||||
public void setValidity(boolean validity) {
|
||||
this.validity = validity;
|
||||
}
|
||||
public String getStatuss() {
|
||||
return statuss;
|
||||
}
|
||||
public void setStatuss(String statuss) {
|
||||
this.statuss = statuss;
|
||||
}
|
||||
public WarehouseArea getZone() {
|
||||
return zone;
|
||||
}
|
||||
public void setZone(WarehouseArea zone) {
|
||||
this.zone = zone;
|
||||
}
|
||||
public String getMoveStatus() {
|
||||
return moveStatus;
|
||||
}
|
||||
public void setMoveStatus(String moveStatus) {
|
||||
this.moveStatus = moveStatus;
|
||||
}
|
||||
public String getInvDes() {
|
||||
return invDes;
|
||||
}
|
||||
public void setInvDes(String invDes) {
|
||||
this.invDes = invDes;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC
|
||||
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
|
||||
<hibernate-mapping>
|
||||
<class name="com.dev.swms.server.model.inventory.InventoryQueryView" table="INVENTORY_QUERY_VIEW">
|
||||
<id name="id" column="ID" type="long" />
|
||||
<property name="locCode" column="locCode" type="string" length="50" />
|
||||
<property name="itemCode" column="itemCode" type="string" length="50" />
|
||||
<property name="UNIT" column="UNIT" type="string" length="50" />
|
||||
<property name="itemName" column="itemName" type="string" length="500" />
|
||||
<property name="status" column="status" type="string" length="50" />
|
||||
<property name="quantity" column="quantity" type="double" />
|
||||
<property name="queuedQuantity" column="queuedQuantity" type="double" />
|
||||
<property name="propC1" column="propC1" type="string" length="50" />
|
||||
<property name="propC2" column="propC2" type="string" length="50" />
|
||||
<property name="propC3" column="propC3" type="string" length="50" />
|
||||
<property name="propC4" column="propC4" type="string" length="50" />
|
||||
<property name="propC5" column="propC5" type="string" length="50" />
|
||||
<property name="propC6" column="propC6" type="string" length="50" />
|
||||
<property name="propC7" column="propC7" type="string" length="50" />
|
||||
<property name="propC8" column="propC8" type="string" length="50" />
|
||||
<property name="propC9" column="propC9" type="string" length="50" />
|
||||
<property name="propLC1" type="string" column="PROP_LC1" length="250" />
|
||||
<property name="propLC2" type="string" column="PROP_LC2" length="250" />
|
||||
<property name="propLC3" type="string" column="PROP_LC3" length="250" />
|
||||
<property name="propLC4" type="string" column="PROP_LC4" length="250" />
|
||||
<property name="propLC5" type="string" column="PROP_LC5" length="100" />
|
||||
<property name="lock" column="lock" type="boolean" />
|
||||
<property name="validity" column="validity" type="boolean" />
|
||||
<property name="propD1" column="propD1" type="date" />
|
||||
<property name="propD2" column="propD2" type="date" />
|
||||
<property name="propD3" column="propD3" type="date" />
|
||||
<property name="kqName" column="kqName" type="string" length="50" />
|
||||
<property name="storageDate" column="storageDate" type="date" />
|
||||
<property name="beSAPItem" type="boolean" column="Be_SAP_Item" />
|
||||
<many-to-one name="location"
|
||||
class="com.dev.swms.server.model.base.Location">
|
||||
<column name="locId" />
|
||||
</many-to-one>
|
||||
<many-to-one name="zone"
|
||||
class="com.dev.swms.server.model.base.WarehouseArea">
|
||||
<column name="zone_id" />
|
||||
</many-to-one>
|
||||
<property name="statuss" column="statuss" type="string" length="50" />
|
||||
<property name="moveStatus" column="moveStatus" type="string" length="50" />
|
||||
<property name="invDes" column="invDes" type="string" length="50" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
|
|
@ -142,8 +142,8 @@ public class PickTicket extends AbstractMoveDoc {
|
|||
private InventoryApply inventoryApply;
|
||||
private int printCount = 0;//回传标识Finished=3
|
||||
private String applyDoc;
|
||||
private Boolean beCreateBOL = Boolean.FALSE;//是否被合并订单
|
||||
private Boolean beCreateOrder = Boolean.FALSE;//是否合并
|
||||
private Boolean beCreateBOL = Boolean.FALSE;//不回传SAP
|
||||
private Boolean beCreateOrder = Boolean.FALSE;//
|
||||
private BoxModel boxModel;
|
||||
|
||||
private Long executePlan;//采购订单项次号
|
||||
|
|
|
|||
|
|
@ -2298,6 +2298,7 @@ public class DefaultAgvTaskManager extends DefaultBaseManager implements AgvTask
|
|||
//加急接口
|
||||
public void updateUrgentAgvTask(List<Long> ids) {
|
||||
Long h=9999L;
|
||||
Map<String,List<AgvTask>> maplist=new HashedMap();
|
||||
if(ids.size()>0) {
|
||||
Date day=new Date();
|
||||
String hql="select min(agv.jobPriority) from AgvTask agv where agv.jobPriorityType=1 and agv.jobPriority>100 "
|
||||
|
|
@ -2305,8 +2306,27 @@ public class DefaultAgvTaskManager extends DefaultBaseManager implements AgvTask
|
|||
DateUtil.formatDateYMDToStr(day)+"' group by CONVERT(varchar(100), agv.createTime, 23) ";
|
||||
List<Long> list=commonDao.findByQuery(hql);
|
||||
if(list.size()>0) {
|
||||
h=list.get(0)-50;
|
||||
h=list.get(0)-99;
|
||||
}
|
||||
List<AgvTask> listcode=new ArrayList<AgvTask>();
|
||||
String hql2=" from AgvTask agv where "
|
||||
+ " agv.status='ATCALL' and agv.targetArea in('214','215') ";
|
||||
listcode=commonDao.findByQuery(hql2);
|
||||
if(listcode.size()>0) {
|
||||
for(AgvTask ash:listcode) {
|
||||
List<AgvTask> lsy=new ArrayList<AgvTask>();
|
||||
if(maplist.containsKey(ash.getContainerCode())) {
|
||||
lsy=maplist.get(ash.getContainerCode());
|
||||
lsy.add(ash);
|
||||
maplist.put(ash.getContainerCode(), lsy);
|
||||
}else {
|
||||
lsy.add(ash);
|
||||
maplist.put(ash.getContainerCode(), lsy);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
for(Long id:ids) {
|
||||
boolean flag=false;
|
||||
|
|
@ -2339,6 +2359,15 @@ public class DefaultAgvTaskManager extends DefaultBaseManager implements AgvTask
|
|||
agv.setRemarks("超时加急任务");
|
||||
agv.setUrgentTime(new Date());
|
||||
commonDao.store(agv);
|
||||
if(maplist.size()>0&&maplist.containsKey(agv.getContainerCode())) {
|
||||
List<AgvTask> listasv=maplist.get(agv.getContainerCode());
|
||||
for(AgvTask agv2:listasv) {
|
||||
//取消214、215的任务
|
||||
// AgvTask agvTask=commonDao.load(AgvTask.class, id);
|
||||
cancellationAgvTask(agv2);
|
||||
}
|
||||
}
|
||||
|
||||
}else {
|
||||
agv.setJobPriorityType(0L);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -406,7 +406,8 @@ public class DefaultItemManager extends DefaultBaseManager implements
|
|||
}
|
||||
dbKey.setSOI(itemKey.getSOI());
|
||||
dbKey.setContent(itemKey.getContent());
|
||||
dbKey.setItem(commonDao.load(Item.class, itemKey.getItem().getId()));
|
||||
Item item=commonDao.load(Item.class, itemKey.getItem().getId());
|
||||
dbKey.setItem(item);
|
||||
commonDao.store(dbKey);
|
||||
}
|
||||
return dbKey;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ public interface InterfaceRespManager extends BaseManager{
|
|||
//OA库存查询接口
|
||||
@Transactional
|
||||
JSONObject storeOAPERSONNEL(DataInterfaceLog log,String data);
|
||||
|
||||
@Transactional
|
||||
JSONObject storeADILFIT(DataInterfaceLog log,String data);
|
||||
|
||||
//WCS传送带回传接口
|
||||
void test();
|
||||
|
|
|
|||
|
|
@ -506,8 +506,10 @@ public interface QueryAppManager extends BaseManager {
|
|||
JSONObject queryLoc(String taskIds,long userId,long warehouseId);
|
||||
|
||||
//查询合单完成的任务
|
||||
JSONObject exchangeOrder(String pickCode,String zone_code,long userId,long warehouseId);
|
||||
JSONObject exchangeOrder(String pickCode,String zone_name,String zone,String orderType,long userId,long warehouseId);
|
||||
//查询合单完成的任务
|
||||
JSONObject queryNCR(String ncrCode,String locId,String itemCode,long userId,long warehouseId);
|
||||
|
||||
JSONObject queryOrderDetails(String BILLCODE,Long workerId,Long wId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,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 com.dev.swms.server.utils.DateUtil;
|
||||
import com.dev.swms.server.utils.PicUtils;
|
||||
import com.dev.swms.server.model.base.Item;
|
||||
import com.dev.swms.server.model.base.SignFile;
|
||||
|
|
@ -273,14 +274,20 @@ public class DefaultImageFileManager extends DefaultBaseManager implements Image
|
|||
if (signFile != null) {
|
||||
commonDao.delete(signFile);
|
||||
} else {
|
||||
throw new BusinessException("寰呭垹闄ゆ枃浠朵笉瀛樺湪锛<E6B9AA>");
|
||||
throw new BusinessException("无记录");
|
||||
}
|
||||
// 获取图片路径
|
||||
// String fileUrl = GlobalParamUtils
|
||||
// .getGloableStringValue("imageTarget")
|
||||
// + signFile.getFileName();
|
||||
String fileUrl =signFile.getViewfileUrl();
|
||||
int index=fileUrl.indexOf("=");
|
||||
if(index >0) {
|
||||
fileUrl=fileUrl.substring(index);
|
||||
}
|
||||
// 鍒犻櫎瀵瑰簲鐨勫浘鐗囪祫鏂<E7A5AB>
|
||||
String fileUrl = GlobalParamUtils
|
||||
.getGloableStringValue("imageTarget")
|
||||
+ signFile.getFileName();
|
||||
File file = new File(fileUrl);
|
||||
file.delete();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -459,8 +466,10 @@ public class DefaultImageFileManager extends DefaultBaseManager implements Image
|
|||
fileName=code+"_"+fileName;
|
||||
date = new Date();
|
||||
}
|
||||
int year=date.getYear();
|
||||
int month=date.getMonth();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
int month = calendar.get(Calendar.MONTH)+1;//获取当前月份
|
||||
int year=calendar.get(Calendar.YEAR);//获取当前年
|
||||
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String fileUrl2="zwwms/images/zwItem/"+year+"/"+month+"/";
|
||||
String fileUrl="C:/tomcat-8080/webapps/"+fileUrl2;
|
||||
|
|
@ -497,6 +506,7 @@ public class DefaultImageFileManager extends DefaultBaseManager implements Image
|
|||
// imageFile.setOrderId(objectId);
|
||||
imageFile.setViewName(code);//料号、单号
|
||||
imageFile.processFileRemark(fileName,fileUrl2);
|
||||
imageFile.setViewfileUrl("*.asnImageServlet?imageSourcePath="+fileUrl+ fileName);
|
||||
try {
|
||||
imageFile.setLength(Double.parseDouble(length));
|
||||
imageFile.setWidth(Double.parseDouble(width));
|
||||
|
|
|
|||
|
|
@ -1081,7 +1081,11 @@ public class DefaultInterfaceReqManager extends DefaultBaseManager implements In
|
|||
itemKey.getLotInfo().getPropC3() == null ? "" : itemKey.getLotInfo().getPropC3());
|
||||
jsonobj2.put("MEINS", item.getUnit());
|
||||
jsonobj2.put("TKFIQ", task.getMovedQuantityMU() + "");
|
||||
jsonobj2.put("SERIALNO", task.getBarCode() == null ? "" : task.getBarCode());
|
||||
if(item.isBeMarkWeight()) {
|
||||
jsonobj2.put("SERIALNO", task.getBarCode() == null ? "" : task.getBarCode());
|
||||
}else {
|
||||
jsonobj2.put("SERIALNO", "" );
|
||||
}
|
||||
jsonobj2.put("WMSID", task.getId());
|
||||
jsonobj2.put("WERKS", task.getItemKey().getLotInfo().getPropC9() == null ? ""
|
||||
: task.getItemKey().getLotInfo().getPropC9() + "");
|
||||
|
|
@ -1142,7 +1146,11 @@ public class DefaultInterfaceReqManager extends DefaultBaseManager implements In
|
|||
jsonobj2.put("ZSUBCONT", ptd.getStrBill11());//外协供应商
|
||||
jsonobj2.put("SGTXT", ptd.getStrExtend1()== null ? "":ptd.getStrExtend1());//
|
||||
jsonobj2.put("ZSTQTY", task.getMovedQuantityMU() + "");
|
||||
jsonobj2.put("SERNR", task.getBarCode());// 序列号
|
||||
if(item.isBeMarkWeight()) {
|
||||
jsonobj2.put("SERNR", task.getBarCode());// 序列号
|
||||
}else {
|
||||
jsonobj2.put("SERNR", "");// 序列号
|
||||
}
|
||||
jsonobj2.put("WERKS", task.getItemKey().getLotInfo().getPropC9() == null ? ""
|
||||
: task.getItemKey().getLotInfo().getPropC9() + "");
|
||||
jsonobj2.put("LGORT", task.getItemKey().getLotInfo().getPropC2() == null ? ""
|
||||
|
|
@ -1167,7 +1175,11 @@ public class DefaultInterfaceReqManager extends DefaultBaseManager implements In
|
|||
jsonobj2.put("MATNR", item.getCode());
|
||||
jsonobj2.put("ZSUBCONT", ptd.getStrBill11());//外协供应商
|
||||
jsonobj2.put("ZSTQTY", task.getMovedQuantityMU() + "");
|
||||
jsonobj2.put("SERNR", task.getBarCode());// 序列号
|
||||
if(item.isBeMarkWeight()) {
|
||||
jsonobj2.put("SERNR", task.getBarCode());// 序列号
|
||||
}else {
|
||||
jsonobj2.put("SERNR", "");// 序列号
|
||||
}
|
||||
jsonobj2.put("ZLGORTF", task.getItemKey().getLotInfo().getPropC2() == null ? ""
|
||||
: task.getItemKey().getLotInfo().getPropC2() + "");// 发出LOC
|
||||
jsonobj2.put("ZLGORTT", ptd.getLocType());// 接收LOC
|
||||
|
|
@ -1194,7 +1206,6 @@ public class DefaultInterfaceReqManager extends DefaultBaseManager implements In
|
|||
if(pickTicket!=null&&pickTicket.getCode().indexOf("CP")==-1
|
||||
&&((pickTicket.getSourceId()!=null&&pickTicket.getSourceId().indexOf("OT")== -1)
|
||||
|| pickTicket.getSourceId()==null )) {
|
||||
|
||||
String bs=doWmsReqSap(getPropertiesParm("ldxt.SAP")+ApiURL.doWmsReqSap, jsonobj.toString(),"数据"+pickTicket.getCode());
|
||||
|
||||
if(bs!=null&&!bs.equals("")&&OUTPUT(bs)) {
|
||||
|
|
|
|||
|
|
@ -287,7 +287,6 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
|||
String relatedBill3=pickTicket.has("MATNR_H") ? pickTicket.getString("MATNR_H") : ""; //头物料
|
||||
String MAKTX=pickTicket.has("MAKTX_H") ? pickTicket.getString("MAKTX_H") : ""; //抬头物料描
|
||||
String CY_SEQNR=pickTicket.has("CY_SEQNR") ? pickTicket.getString("CY_SEQNR") : ""; //抬头物料描
|
||||
|
||||
String TKCDA=pickTicket.has("TKCDA") ? pickTicket.getString("TKCDA") : ""; //任务下发日期
|
||||
String TKCTI=pickTicket.has("TKCTI") ? pickTicket.getString("TKCTI") : ""; //任务下发时间
|
||||
String strBill2=pickTicket.has("UPAIN") ? pickTicket.getString("UPAIN") : ""; //X=更新,Q=取消,update indicator(在task号码为Active时,可以修改需求数量,SAP以同task号传递给WMS,并且附上更新标识X给WMS)
|
||||
|
|
@ -3497,7 +3496,145 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
|||
return json11;
|
||||
}
|
||||
|
||||
|
||||
public JSONObject storeADILFIT(DataInterfaceLog log, String data) {
|
||||
JSONObject json0 = new JSONObject();
|
||||
JSONArray resultInfo = new JSONArray();
|
||||
// TODO 自动生成的方法存根
|
||||
String msg="";
|
||||
Long pid=null;
|
||||
PickTicket pTicket=null;
|
||||
JSONObject json = jsonDataPT(data);
|
||||
for(int j=0;j<json.size();j++){
|
||||
JSONArray jsonDate =json.getJSONArray("header");
|
||||
for( int i=0;i<jsonDate.size();i++ ) {
|
||||
JSONObject pickTicket=jsonDate.getJSONObject(i);
|
||||
System.out.println(pickTicket);
|
||||
String btCode="QPUTPTC";
|
||||
String sourceId=pickTicket.has("ZTKALI") ? pickTicket.getString("ZTKALI") : ""; //任务号
|
||||
String strBill7=pickTicket.has("MBLNR") ? pickTicket.getString("MBLNR") : ""; //凭证号
|
||||
String lineNumber=pickTicket.has("ZTALIN") ? pickTicket.getString("ZTALIN") : ""; //任务项次号
|
||||
String SOI=pickTicket.has("ZBPNUM") ? pickTicket.getString("ZBPNUM") : ""; //序列号顺序
|
||||
String icode=pickTicket.has("MATNR") ? pickTicket.getString("MATNR") : ""; //物料号
|
||||
String ptSourceType=pickTicket.has("BWART") ? pickTicket.getString("BWART") : ""; //移动类型
|
||||
String orderQuantity=pickTicket.has("ZCHWMG") ? pickTicket.getString("ZCHWMG") : "0"; //订单采购数量
|
||||
String MEINS=pickTicket.has("MEINS") ? pickTicket.getString("MEINS") : ""; //单位
|
||||
String workerName1=pickTicket.has("WERKS") ? pickTicket.getString("WERKS") : ""; //工厂
|
||||
String locationName=pickTicket.has("ZWERKST") ? pickTicket.getString("ZWERKST") : ""; //发出库存地
|
||||
String DATUM=pickTicket.has("DATUM") ? pickTicket.getString("DATUM") : ""; //日期 年-月-日
|
||||
String UZEIT=pickTicket.has("UZEIT") ? pickTicket.getString("UZEIT") : ""; //时间 时:分:秒
|
||||
String ZOUTWMS=pickTicket.has("ZOUTWMS") ? pickTicket.getString("ZOUTWMS") : ""; //出wms
|
||||
String strBill8=pickTicket.has("ZOUTWMS") ? pickTicket.getString("ZOUTWMS") : ""; //是否出WMS仓 X表示”是“;空表示”否”
|
||||
|
||||
BillType billType=null;
|
||||
List<BillType> BillTypes = commonDao.findByQuery(" from BillType bt where bt.code=:code",
|
||||
new String[] { "code"},new Object[] {btCode});
|
||||
if (BillTypes.size()>0) {
|
||||
billType=BillTypes.get(0);
|
||||
}else{
|
||||
billType=this.load(BillType.class, 1020L);
|
||||
}
|
||||
Date orderDate=null;
|
||||
try {
|
||||
orderDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(DATUM+" "+UZEIT);
|
||||
} catch (ParseException e1) {
|
||||
// TODO 自动生成的 catch 块
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
Warehouse warehouse=this.load(Warehouse.class, 1L);
|
||||
Item item=null;
|
||||
List<Item> Items = commonDao.findByQuery(" from Item item where item.code=:code",
|
||||
new String[] { "code"},new Object[] {icode});
|
||||
if (Items.size()==0) {
|
||||
JSONObject objectItem=new JSONObject();
|
||||
objectItem.put("ZTKALI", sourceId);
|
||||
objectItem.put("ZTALIN", lineNumber);
|
||||
objectItem.put("MATNR", icode);
|
||||
objectItem.put("errorcode", "205");
|
||||
objectItem.put("errordescr", "料号不存在!");
|
||||
resultInfo.add(objectItem);
|
||||
continue;
|
||||
}else{
|
||||
item=Items.get(0);
|
||||
}
|
||||
|
||||
if(msg==null || msg.length()<=0){
|
||||
|
||||
List<PickTicket> pTickets = commonDao.findByQuery(" from PickTicket pt where pt.sourceId=:sourceId ",
|
||||
new String[] { "sourceId"},new Object[] {sourceId});
|
||||
try {
|
||||
if (pTickets.size()>0) {
|
||||
pTicket=pTickets.get(0);
|
||||
}else {
|
||||
pTicket=EntityFactory.getEntity(PickTicket.class);
|
||||
// pTicket.setCode(bussinessCodeManager.getCodeForYm("CP", 5));
|
||||
pTicket.setCode("CP"+strBill7);
|
||||
pTicket.setSourceId(sourceId);
|
||||
// pTicket.setDeliveryMode(deliveryMode);
|
||||
pTicket.setWorkerName1(workerName1);//工厂
|
||||
pTicket.setRelatedBill1(strBill7);
|
||||
pTicket.setUpdateTime(new Date());
|
||||
pTicket.setBeCreateBOL(true);//不回传SAP
|
||||
pTicket.setCollectNo(pTicket.getCode());
|
||||
if (true) {
|
||||
pTicket.setBillType(billType);
|
||||
pTicket.setOrderDate(orderDate);
|
||||
pTicket.setWarehouse(warehouse);
|
||||
pTicket.setSourceType(ptSourceType);
|
||||
Structure company=this.load(Structure.class, 1L);
|
||||
pTicket.setCompany(company);
|
||||
pTicket.setStatus(PickTicketStatus.OPEN);
|
||||
}
|
||||
commonDao.store(pTicket);
|
||||
pid=pTicket.getId();
|
||||
}
|
||||
PickTicketDetail ptd =null;
|
||||
List<PickTicketDetail> PickTicketDetails = commonDao.findByQuery(" from PickTicketDetail ptd where ptd.pickTicket.id=:id and ptd.lineNumber=:lineNumber ",
|
||||
new String[] { "id","lineNumber"},new Object[] {pTicket.getId(),lineNumber});
|
||||
//
|
||||
if (PickTicketDetails.size()>0) {
|
||||
ptd=PickTicketDetails.get(0);
|
||||
}else{
|
||||
ptd=EntityFactory.getEntity(PickTicketDetail.class);
|
||||
}
|
||||
ptd.setLineNumber(lineNumber);
|
||||
ptd.setSOI(SOI);
|
||||
ptd.setStrBill7(strBill7);
|
||||
ptd.setItem(item);
|
||||
ptd.setLocationName(locationName);//库存地点
|
||||
ptd.setOrderQuantity(Double.parseDouble(orderQuantity));
|
||||
NewLotInfo newLotInfo=new NewLotInfo();
|
||||
newLotInfo.setPropC2(locationName);
|
||||
newLotInfo.setPropC9(workerName1);
|
||||
ptd.setStrBill8(strBill8);
|
||||
ptd.setStrBill5(MEINS);
|
||||
ptd.setNewLotInfo(newLotInfo);
|
||||
ptd.setPickTicket(pTicket);
|
||||
commonDao.store(ptd);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(pTicket!=null) {
|
||||
pickTicketManager.refreshOrderQuantity(pTicket);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
json0.accumulate("returnCode", "200");
|
||||
json0.accumulate("returnFlag", "1");
|
||||
json0.accumulate("returnDesc", "成功");
|
||||
json0.accumulate("resultInfo", resultInfo);
|
||||
|
||||
JSONObject json1 = new JSONObject();
|
||||
json1.put("return", json0);
|
||||
JSONObject json11 = new JSONObject();
|
||||
json11.put("Response", json1);
|
||||
interfaceManager.updateDataInterfaceLog(log, null,json11.toString());
|
||||
return json11;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2131,7 +2131,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
"left join ITEM_KEY ik on t.ITEM_KEY_ID=ik.id "+
|
||||
"left join item i on i.ID=ik.ITEM_ID "+
|
||||
"left join Seed_Wall sw on sw.id=t.Seed_Wall_ID"+
|
||||
" where t.PLAN_QUANTITY_MU-t.MOVED_QUANTITY_MU>0 and t.PLAN_QUANTITY_MU>0"
|
||||
" where t.PLAN_QUANTITY_MU>t.MOVED_QUANTITY_MU and t.PLAN_QUANTITY_MU>0"
|
||||
+ " and t.END_REGION='"+gzzCode+"'";
|
||||
|
||||
zgz_sql +=" group by t.BILLCODE,pt.id,wd.id,t.END_REGION ";
|
||||
|
|
@ -2172,14 +2172,15 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
}
|
||||
billCodeqty=bilzte+"";
|
||||
}
|
||||
//子任务拣货完成,需要释放曹格
|
||||
if(gzzCode!=null&&!gzzCode.equals("601")&&!gzzCode.equals("602")&&!gzzCode.equals("603")
|
||||
&&!gzzCode.equals("604")&&!gzzCode.equals("605")) {
|
||||
String g_sql="select t.BILLCODE,S.code,"
|
||||
+"sum(t.PLAN_QUANTITY),sum(t.MOVED_QUANTITY_MU) "
|
||||
+" from task t LEFT JOIN Seed_Wall S ON S.ID=T.Seed_Wall_ID "
|
||||
+" where t.Seed_Wall_ID is not null and t.END_REGION='"+gzzCode+"'"
|
||||
+" where t.END_REGION='"+gzzCode+"'"
|
||||
+" and t.popular>0 and t.INVENTORY_STATUS in('已入库','已出库') "
|
||||
+ " and t.PLAN_QUANTITY>0 "
|
||||
+ " and t.PLAN_QUANTITY>0 and t.Seed_Wall_ID is not null "
|
||||
+" group by t.BILLCODE,t.END_REGION,S.code "
|
||||
+" order by t.BILLCODE,t.END_REGION,S.code ";
|
||||
Query query2 = session.createSQLQuery(g_sql.toString());
|
||||
|
|
@ -2207,10 +2208,10 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
+ " left join LOCATION loc2 on loc2.id=b.SRC_LOC_ID "
|
||||
+ " left join ITEM_KEY ik2 on ik2.id=b.ITEM_KEY_ID "
|
||||
+ " left join item item2 on item2.id=ik2.ITEM_ID "
|
||||
+ " where 1=1 and b.PLAN_QUANTITY_MU-b.MOVED_QUANTITY_MU>0 "
|
||||
+ " where 1=1 and b.PLAN_QUANTITY_MU>b.MOVED_QUANTITY_MU "
|
||||
+ " and b.BILLCODE=t.BILLCODE "
|
||||
+ " and loc2.id=loc.id and t.END_REGION=b.END_REGION "
|
||||
+ " and item2.id=item.id AND b.PLAN_QUANTITY_MU-b.MOVED_QUANTITY_MU>0 "
|
||||
+ " and item2.id=item.id AND b.PLAN_QUANTITY_MU>b.MOVED_QUANTITY_MU "
|
||||
+ " for xml Path('')),1,1,'') as tId,item.code as itemCode ,max(item.name) as itemName ,"
|
||||
+ " sum(t.PLAN_QUANTITY_MU-t.MOVED_QUANTITY_MU) as quantity,max(ik.PROP_C5) as propC5,"
|
||||
+ " loc.id as locid, loc.code as locCode,ik.PROP_C1 as propC1,ik.PROP_C2 as propC2,ik.PROP_C3 as propC3,"
|
||||
|
|
@ -2237,7 +2238,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
+ " left join agvtask agvtask on agvtask.ID=t.agvTask_ID "
|
||||
+ " left join library_task lt on lt.ID=t.librarytask_id "
|
||||
|
||||
+ " where 1=1 and t.PLAN_QUANTITY_MU-t.MOVED_QUANTITY_MU>0 ");
|
||||
+ " where t.PLAN_QUANTITY_MU>t.MOVED_QUANTITY_MU ");
|
||||
|
||||
if(gzzCode.indexOf("602")>=0||gzzCode.indexOf("603")>=0){
|
||||
isLk=Boolean.TRUE;
|
||||
|
|
@ -2386,10 +2387,10 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
|
||||
//图片路径
|
||||
String url="";
|
||||
String SignFile_Sql=" from SignFile sf where 1=1 and sf.objectId="+arrier[20]+" ";
|
||||
List<SignFile> SignFiles=commonDao.findByQuery(SignFile_Sql);
|
||||
String SignFile_Sql=" select sf.remark from SignFile sf where sf.objectType='ITEM' and sf.objectId="+arrier[20]+" ";
|
||||
List<String> SignFiles=commonDao.findByQuery(SignFile_Sql);
|
||||
if(SignFiles.size()>0){
|
||||
url=SignFiles.get(0).getRemark();
|
||||
url=SignFiles.get(0);
|
||||
}
|
||||
obj.put("strExtend1", arrier[21]==null?"":arrier[21]);
|
||||
obj.put("unit", arrier[22]==null?"":arrier[22]);
|
||||
|
|
@ -3419,8 +3420,8 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
+ " , max(t.srcLoc.zone.id) as zone_id , t.srcLoc.zone.beBill as beBill,"
|
||||
+ " max(t.srcLoc.zone.levels) as levels2 ,t.srcLoc.zone.beStock as beStock "
|
||||
+ " from Task t where "
|
||||
+ " t.planQuantityMU>t.movedQuantityMU and t.agvTask.id is null and "
|
||||
+ " t.agvStatus=1 and t.srcLoc.zone.carrierType.id=3 ";
|
||||
+ " t.agvStatus=1 and t.planQuantityMU>t.movedQuantityMU and "
|
||||
+ " t.srcLoc.zone.carrierType.id=3 and t.agvTask.id is null ";
|
||||
if(z_id>0){
|
||||
sql+=" and t.srcLoc.zone.id="+z_id+" ";
|
||||
}
|
||||
|
|
@ -3693,6 +3694,13 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
Task task=this.load(Task.class, Long.parseLong(result.get(0)));
|
||||
ItemKey ik=this.load(ItemKey.class, task.getItemKey().getId());
|
||||
Item item=this.load(Item.class, ik.getItem().getId());
|
||||
String url="";//图片地址
|
||||
String SignFile_Sql=" from SignFile sf where sf.objectType='ITEM' and sf.objectId="+item.getId()+" ";
|
||||
List<SignFile> SignFiles=commonDao.findByQuery(SignFile_Sql);
|
||||
if(SignFiles.size()>0){
|
||||
url=SignFiles.get(0).getRemark();
|
||||
}
|
||||
obj.put("url", url);
|
||||
Location lc=commonDao.load(Location.class, task.getSrcLoc().getId());
|
||||
WarehouseArea zone=commonDao.load(WarehouseArea.class, lc.getZone().getId());
|
||||
String [] str=null;
|
||||
|
|
@ -8086,6 +8094,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
}
|
||||
|
||||
}else {
|
||||
status = "1";
|
||||
msg="任务未到站!";
|
||||
}
|
||||
}
|
||||
|
|
@ -10444,7 +10453,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
return resultJson;
|
||||
}
|
||||
|
||||
public JSONObject exchangeOrder(String pickCode,String zone_code,long userId,long warehouseId){
|
||||
public JSONObject exchangeOrder(String pickCode,String zone_code,String zone,String orderType,long userId,long warehouseId){
|
||||
JSONObject resultJson = new JSONObject();
|
||||
JSONArray jsondata = new JSONArray();
|
||||
String status="0";
|
||||
|
|
@ -10476,6 +10485,21 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
if(zone_code!=null&&zone_code.length()>0) {
|
||||
sql+=" and z.name = '"+zone_code.trim()+"' ";
|
||||
}
|
||||
if(zone!=null&&zone.length()>0) {
|
||||
if(zone.equals("三号")) {
|
||||
sql+=" and z.id in(1798,1773,1817,1765,1763) ";
|
||||
}else {
|
||||
sql+=" and z.id in(1813,1819,1768,1822,1783,1808,1766) ";
|
||||
}
|
||||
}
|
||||
if(orderType!=null&&orderType.length()>0) {
|
||||
if(orderType.equals("工单")) {
|
||||
sql+=" and pt.BILL_TYPE_ID = 1094 ";
|
||||
}else {
|
||||
sql+=" and pt.BILL_TYPE_ID <> 1094 ";
|
||||
}
|
||||
|
||||
}
|
||||
sql+=" group by t.BILLCODE,s.LP,lc.code,z.name,pt.equated_Quantity " +
|
||||
" order by pt.equated_Quantity desc,max(t.dateBill3),t.BILLCODE,z.name,lc.code,s.LP ";
|
||||
Query query = session.createSQLQuery(sql);
|
||||
|
|
@ -10501,11 +10525,13 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
if(soi!=null&&soi.length()>0) {
|
||||
data1.put("bgColour", "1");//1=红色加急,
|
||||
}else {
|
||||
if(Long.parseLong(ordeDate)>30) {
|
||||
if(Long.parseLong(ordeDate)>60) {
|
||||
data1.put("bgColour", "3");//3=浅蓝色,剩30分钟
|
||||
}else if(Long.parseLong(ordeDate)>60) {
|
||||
data1.put("bgColour", "2");//2=黄色,剩余60分钟
|
||||
}else {
|
||||
}
|
||||
// else if(Long.parseLong(ordeDate)>30) {
|
||||
// data1.put("bgColour", "2");//2=黄色,剩余60分钟
|
||||
// }
|
||||
else {
|
||||
data1.put("bgColour", "0");//0=无颜色,
|
||||
}
|
||||
}
|
||||
|
|
@ -10598,6 +10624,66 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
return resultJson;
|
||||
}
|
||||
|
||||
public JSONObject queryOrderDetails(String BILLCODE,Long workerId,Long wId) {
|
||||
JSONObject resultJson = new JSONObject();
|
||||
JSONArray jsondata = new JSONArray();
|
||||
String status="0";
|
||||
String msg="";
|
||||
String data="";
|
||||
Session session = ((HibernateDaoSupport) this.commonDao).getSessionFactory().openSession();
|
||||
try {
|
||||
if (workerId > 0) {
|
||||
if (wId > 0) {
|
||||
Worker worker1=commonDao.load(Worker.class, workerId);
|
||||
String sql ="select item.code as code,CONVERT(VARCHAR, t.OPERATE_TIME, 120) as OPERATE_TIME,"
|
||||
+ "t.MOVED_QUANTITY_MU as MOVED_QUANTITY_MU" +
|
||||
" from task t " +
|
||||
" left join ITEM_KEY ik on ik.id=t.ITEM_KEY_ID " +
|
||||
" left join item item on item.id=ik.ITEM_ID " +
|
||||
" where t.PLAN_QUANTITY>0";
|
||||
if(BILLCODE!=null&&BILLCODE.length()>0) {
|
||||
sql+=" and t.BILLCODE='"+BILLCODE+"' ";
|
||||
Query query = session.createSQLQuery(sql);
|
||||
List<Object []> list= (List<Object []>)query.list();
|
||||
if(list.size()>0) {
|
||||
for(Object [] obj:list) {
|
||||
JSONObject data1 = new JSONObject();
|
||||
String itemCode=obj[0]==null?"":obj[0].toString();
|
||||
String operateTime=obj[1]==null?"":obj[1].toString();
|
||||
String movedQuantityMU=obj[2]==null?"0":obj[2].toString();
|
||||
data1.put("itemCode", itemCode);
|
||||
data1.put("operateTime", operateTime);
|
||||
data1.put("movedQuantityMU", movedQuantityMU);
|
||||
jsondata.add(data1);
|
||||
}
|
||||
data=jsondata.toString();
|
||||
status = "1";
|
||||
}else {
|
||||
status = "2";
|
||||
msg = BILLCODE+"无库存!";
|
||||
}
|
||||
}else {
|
||||
status = "2";
|
||||
msg = "子任务号不能为空!";
|
||||
}
|
||||
} else {
|
||||
status = "2";
|
||||
msg = "无仓库信息!";
|
||||
}
|
||||
} else {
|
||||
status = "2";
|
||||
msg = "无用户信息!";
|
||||
}
|
||||
}catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}finally {
|
||||
session.close();
|
||||
}
|
||||
resultJson.put("status", status);
|
||||
resultJson.put("msg", msg);
|
||||
resultJson.put("data", data);
|
||||
return resultJson;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2357,7 +2357,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
// }
|
||||
}
|
||||
}
|
||||
logger.info(asnDetailIds+"--整理12+"+new Date());
|
||||
// logger.info(asnDetailIds+"--整理12+"+new Date());
|
||||
Stock stock=commonDao.load(Stock.class, stockId);
|
||||
Location location=null;
|
||||
location=this.load(Location.class, dock_id);//库位
|
||||
|
|
@ -2380,7 +2380,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
}
|
||||
}
|
||||
}
|
||||
logger.info(asnDetailIds+"--整理13+"+new Date());
|
||||
// logger.info(asnDetailIds+"--整理13+"+new Date());
|
||||
if(location==null){
|
||||
List<Location> locs=commonDao.findByQuery(" from Location l where l.type='RECEIVE' ");
|
||||
if(locs.size()>0) {
|
||||
|
|
@ -2425,13 +2425,13 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
}
|
||||
}
|
||||
}
|
||||
logger.info(asnDetailIds+"--整理14+"+new Date());
|
||||
// logger.info(asnDetailIds+"--整理14+"+new Date());
|
||||
//判断该容器已有其它库区物料
|
||||
int count=queryConWare(stockId, zone_id);
|
||||
if(count==1){
|
||||
throw new BusinessException("该容器已有其它库区物料!");
|
||||
}
|
||||
logger.info(asnDetailIds+"--整理15+"+new Date());
|
||||
// logger.info(asnDetailIds+"--整理15+"+new Date());
|
||||
//判断不同LOC不能存到一个容器里面
|
||||
/**if(asnDetail.getLotInfo().getPropC2()!=null&&asnDetail.getLotInfo().getPropC2().length()>0){
|
||||
if(!checkLoc(asnDetail, stockId)){
|
||||
|
|
@ -2457,7 +2457,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
}
|
||||
|
||||
// Inventory inv=inventoryManager.receiving(location, itemKey, receivedQuantity,null,asnDetail.getAsn().getStatus(), new Date(),asn.getCode(), LogType,opertion_name,warehouseArea,asnDetail.getStrBill2(),asn.getBillType());
|
||||
logger.info(asnDetailIds+"--整理16+"+new Date());
|
||||
// logger.info(asnDetailIds+"--整理16+"+new Date());
|
||||
ReceivedRecord receivedRecord=asnDetail.newreceiving(location, itemKey, receivedQuantity,receivedQuantity,new Date(), opertion_name,warehouseArea);
|
||||
receivedRecord.setWarehouseArea(warehouseArea);
|
||||
receivedRecord.setSrcLPCode(statusDes);
|
||||
|
|
@ -2467,12 +2467,12 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
receivedRecord.setBarCode(asnDetail.getStrBill2());
|
||||
commonDao.store(receivedRecord);
|
||||
Inventory inv = null;
|
||||
logger.info(asnDetailIds+"--整理17+"+new Date());
|
||||
// logger.info(asnDetailIds+"--整理17+"+new Date());
|
||||
List<Inventory> invs=commonDao.findByQuery(" from Inventory inv where inv.receivedRecordId="+receivedRecord.getId());
|
||||
if(invs.size()>0) {
|
||||
inv=invs.get(0);
|
||||
}
|
||||
logger.info(asnDetailIds+"--整理18+"+new Date());
|
||||
// logger.info(asnDetailIds+"--整理18+"+new Date());
|
||||
if (inv == null) {
|
||||
inv = new Inventory();//EntityFactory.getEntity(Inventory.class);
|
||||
inv.setLocation(location);
|
||||
|
|
@ -2505,7 +2505,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
inv.setLP(stock);
|
||||
inv.setReceivedRecordId(receivedRecord.getId());
|
||||
commonDao.store(inv);
|
||||
logger.info(asnDetailIds+"--整理19+"+new Date());
|
||||
// logger.info(asnDetailIds+"--整理19+"+new Date());
|
||||
InventoryLog log = new InventoryLog(LogType,asnDetail.getStrBill7(), 1, opertion_name, location, itemKey, new Date(), receivedQuantity, null, inv.getStatus(), null, inv.getStatuss());
|
||||
log.setOperator(opertion_name);
|
||||
log.setRelatedBill(asn.getRelatedBill1());
|
||||
|
|
@ -2527,7 +2527,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
asnDetail.setWarehouseArea(warehouseArea);
|
||||
asnDetail.getshaxin();
|
||||
commonDao.store(asnDetail);
|
||||
logger.info(asnDetailIds+"--整理111+"+new Date());
|
||||
// logger.info(asnDetailIds+"--整理111+"+new Date());
|
||||
if(asn.getReceivedQuantity()==0){
|
||||
asn.setStatus(ASNStatus.OPEN);
|
||||
}else if(asn.getReceivedQuantity()<asn.getExpectedQuantity()&&asn.getReceivedQuantity()!=0){
|
||||
|
|
@ -2542,9 +2542,9 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
List<ASNDetail> asnDetails = commonDao.findByQuery(" from ASNDetail ad where ad.beInput=true and ad.asn.id="+asn.getId());
|
||||
asn.setAccomplish(asnDetails.size());//完成行数
|
||||
}
|
||||
logger.info(asnDetailIds+"--整理112+"+new Date());
|
||||
// logger.info(asnDetailIds+"--整理112+"+new Date());
|
||||
updateStock(stockId);//刷新热度值
|
||||
logger.info(asnDetailIds+"--整理113+"+new Date());
|
||||
// logger.info(asnDetailIds+"--整理113+"+new Date());
|
||||
//生成打印任务
|
||||
if(item.isBOM()||item.isBeExtend1()||item.isBeExtend2()||(item.getFeeType()!=null&&item.getFeeType().equals("OA"))) {
|
||||
//设备
|
||||
|
|
@ -2607,7 +2607,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
// createPrintTask("3",pqty, cent, workerId, ma, printName, asn.getCode());
|
||||
}
|
||||
}
|
||||
logger.info(asnDetailIds+"--整理114+"+new Date());
|
||||
// logger.info(asnDetailIds+"--整理114+"+new Date());
|
||||
//上报SAP状态
|
||||
if(!asn.getCode().substring(0, 2).equals("RP")) {
|
||||
|
||||
|
|
@ -2622,7 +2622,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
}
|
||||
|
||||
}
|
||||
logger.info(asnDetailIds+"--整理116+"+new Date());
|
||||
// logger.info(asnDetailIds+"--整理116+"+new Date());
|
||||
commonDao.store(asn);
|
||||
|
||||
List<Long> asnids=new ArrayList<Long>();
|
||||
|
|
@ -2653,7 +2653,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
location.setStatus(WarehouseAreaStatus.OCCUPY);
|
||||
commonDao.store(location);
|
||||
}
|
||||
logger.info(asnDetailIds+"--整理117+"+new Date());
|
||||
// logger.info(asnDetailIds+"--整理117+"+new Date());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -825,6 +825,8 @@ public interface PickTicketManager extends BaseManager {
|
|||
void refPickHandOrder(List<Long> pickId);
|
||||
|
||||
String presentationConfirmTwo(String zone,String invIds,long locId,long userId,long warehouseId,CommonDao commonDao);
|
||||
|
||||
String presentationConfirmThree(String zone,String invIds,long locId,long userId,long warehouseId);
|
||||
//关闭未处理订单
|
||||
@Transactional
|
||||
String WmsSapposition(JSONObject bh,List<Long> tids1,Location dstLoc,Worker worker);
|
||||
|
|
|
|||
|
|
@ -9706,7 +9706,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
|||
}
|
||||
}
|
||||
|
||||
//交单完成按钮
|
||||
//交单完成按钮2
|
||||
public String presentationConfirmTwo(String zone,String invIds,long locId,long userId,long warehouseId,CommonDao commonDao) {
|
||||
String msg="";//失败信息
|
||||
String msg1="";//成功信息
|
||||
|
|
@ -9884,7 +9884,214 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
|||
return msg1;
|
||||
}
|
||||
}
|
||||
|
||||
//交单完成按钮3
|
||||
public String presentationConfirmThree(String zone,String invIds,long locId,long userId,long warehouseId) {
|
||||
String msg="";//失败信息
|
||||
String msg1="";//成功信息
|
||||
if(zone!=null && zone.length()>0){
|
||||
if(invIds!=null&&invIds.length()>0){
|
||||
if(locId>0){
|
||||
|
||||
Location dstLoc=commonDao.load(Location.class,locId);
|
||||
//交单
|
||||
String tidlist="";//需要交单的task的id
|
||||
List<String> st=new ArrayList<String>();
|
||||
String fromaddress="";
|
||||
List<Long> pickIdsList=new ArrayList<Long>();//task对应的工单id
|
||||
String jdwz="";//是否完成
|
||||
|
||||
//查询交单货架多层的全部任务
|
||||
List<Long> countTasks=new ArrayList<Long>();
|
||||
//按容器分拣货任务
|
||||
Map<String, List<Long>> mapstock=new HashMap();
|
||||
//所有交单,拣货时,没有容器码,task的id
|
||||
List<Long> lsits=new ArrayList<Long>();
|
||||
//判断是否在交单区,
|
||||
if(dstLoc.getZone().getId()==1787L){
|
||||
// List<Long> ids=new ArrayList<Long>();
|
||||
//去空格
|
||||
invIds=invIds.replace(" ","");
|
||||
List<String> result = Arrays.asList(invIds.split(","));
|
||||
//查询容器号
|
||||
String hql3="select t.dstLP.LP from Task t where t.srcLoc.zone.levels IN (3,7)"
|
||||
+ " and t.strBill5 is null and t.id in("+invIds+") group by t.dstLP.LP ";
|
||||
//查询没合单完成的容器号
|
||||
List<Long> tids=commonDao.findByQuery(hql3);
|
||||
|
||||
if(tids.size()>0) {
|
||||
throw new BusinessException("容器"+tids.toString()+"未做合单任务");
|
||||
}
|
||||
//查询所有交单任务
|
||||
String hql1=" from Task t where t.id in("+invIds+")";
|
||||
//查询所有合单完成任务
|
||||
String hql2="select t.id from Task t where t.id in("+invIds+") and t.inventoryStatus='合单完成' ";
|
||||
//查询所有拣货任务
|
||||
List<Task> tasks=commonDao.findByQuery(hql1);
|
||||
|
||||
int ka=0;
|
||||
//所有交单的容器id
|
||||
List<Long> stoskids=new ArrayList<Long>();
|
||||
|
||||
|
||||
for(Task t1:tasks) {
|
||||
PickTicketDetail ptd=commonDao.load(PickTicketDetail.class, t1.getPickTicketDetail().getId());
|
||||
if(ptd.getPickTicket()!=null&&!pickIdsList.contains(ptd.getPickTicket().getId())) {
|
||||
pickIdsList.add(ptd.getPickTicket().getId());
|
||||
}
|
||||
|
||||
//起点库位
|
||||
Location stloc=commonDao.load(Location.class, t1.getDstLoc().getId());
|
||||
if(ka==0) {
|
||||
fromaddress =stloc.getCode();//货架层码、合单位置码
|
||||
//查询交单货架多层的全部任务
|
||||
if(stloc.getStock()!=null) {
|
||||
String hqlsh=" select t.id from Task t where t.planQuantity>0 and "
|
||||
+ " t.dateBill3 is not null and t.dstLoc.stock.id= "+stloc.getStock().getId()+""
|
||||
+ " and t.inventoryStatus in('已出库','已合单','合单完成') "
|
||||
+ " and t.dstLoc.zone.id<>1787 ";
|
||||
countTasks=commonDao.findByQuery(hqlsh);
|
||||
}else {
|
||||
jdwz="X";
|
||||
}
|
||||
}
|
||||
if(ptd.getSOI()!=null&&
|
||||
(ptd.getSOI().equals("U")
|
||||
||ptd.getSOI().equals("X"))
|
||||
&&!dstLoc.isBeUrgent()) {
|
||||
throw new BusinessException("该地位不是加急交接点");
|
||||
}
|
||||
String strloc=stloc.getCode().substring(0,1);
|
||||
if(dstLoc.isBeUrgent()&&stloc.getZone().getId()==1785
|
||||
&&(strloc.equals("2")||strloc.equals("1"))){
|
||||
throw new BusinessException("加急交单位不能放货架");
|
||||
}
|
||||
|
||||
//汇总容器id ,mapstock
|
||||
if(t1.getDstLP()!=null&&!stoskids.contains(t1.getDstLP().getId())) {
|
||||
stoskids.add(t1.getDstLP().getId());
|
||||
}
|
||||
List<Long> listtaskids=new ArrayList<Long>();
|
||||
if(t1.getDstLP()!=null) {
|
||||
if(mapstock.containsKey(t1.getDstLP().getId()+"")) {
|
||||
listtaskids=mapstock.get(t1.getDstLP().getId()+"");
|
||||
}
|
||||
listtaskids.add(t1.getId());
|
||||
mapstock.put(t1.getDstLP().getId()+"", listtaskids);
|
||||
}else {
|
||||
if(t1.getPositionStatus()==null||
|
||||
(t1.getPositionStatus()!=null&&t1.getPositionStatus().equals("0"))) {
|
||||
lsits.add(t1.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
String m="";//PDA提示信息
|
||||
|
||||
if(tasks.size()>0){
|
||||
//是否回传SPA
|
||||
boolean a=false;
|
||||
Worker worker=commonDao.load(Worker.class, userId);
|
||||
List<Long> taskids=commonDao.findByQuery(hql2);
|
||||
if(taskids.size()<tasks.size()) {
|
||||
throw new BusinessException("该地标上任务,未合单完成");
|
||||
}else {
|
||||
a=true;
|
||||
if(a){
|
||||
List<Long> pickid=new ArrayList<Long>();
|
||||
//拣货任务按容器分组
|
||||
// String stolps="select t.dstLP.id from Task t where t.id in("+invIds+") and t.dstLP.id is not null group by t.dstLP.id ";
|
||||
// stoskids=commonDao.findByQuery(stolps);
|
||||
String stoskid=StringUtils.strip(stoskids.toString(),"[]");
|
||||
//按容器查询任务,拣货任务,
|
||||
String tys=" select t.dstLP.LP from Task t where t.dstLP.id in("+stoskid+") and t.id not in("+invIds+")"
|
||||
+ " and t.inventoryStatus in('已出库','已合单','合单完成') and t.planQuantity>0 "
|
||||
+ " and t.dstLoc.zone.id<>1787 ";
|
||||
List<String> tysids=commonDao.findByQuery(tys);
|
||||
if(tysids.size()>0) {
|
||||
throw new BusinessException(tysids.get(0)+"容器有其它任务");
|
||||
}
|
||||
if(stoskids.size()>0) {
|
||||
//按容器交单
|
||||
for(Long sid:stoskids) {
|
||||
//按容器查询任务
|
||||
String taskids1="select t.id from Task t where t.id in("+invIds+") and t.dstLP.id="+sid+" ";
|
||||
//查询该容器的起始位置
|
||||
String taskloc2="select t.dstLoc.code from Task t where t.id in("+invIds+") and t.dstLP.id="+sid+" ";
|
||||
// List<Long> tids1=commonDao.findByQuery(taskids1);
|
||||
List<Long> tids1=mapstock.get(sid+"");
|
||||
if(tids1.size()>0) {
|
||||
for(Long tashid:tids1) {
|
||||
countTasks.remove(tashid);
|
||||
}
|
||||
if(countTasks.size()==0) {
|
||||
jdwz="X";//完成标记
|
||||
}
|
||||
|
||||
// List<String> tLocds2=commonDao.findByQuery(taskloc2);
|
||||
// fromaddress=tLocds2.get(0);//位置信息
|
||||
|
||||
//位置回传
|
||||
JSONObject bh= wmsSapWeizhihuichuang(tids1,fromaddress,dstLoc.getCode(),jdwz);
|
||||
//更新task任务的信息
|
||||
String mes2="";
|
||||
try {
|
||||
mes2= WmsSapposition(bh, tids1, dstLoc, worker);
|
||||
}catch (Exception e) {
|
||||
try {
|
||||
mes2= WmsSapposition(bh, tids1, dstLoc, worker);
|
||||
}catch(Exception e1){
|
||||
|
||||
}
|
||||
}
|
||||
if(bh.get("ZCODE").equals("true")) {
|
||||
msg1=msg1+mes2;//成功
|
||||
}else {
|
||||
msg=msg+mes2;//失败
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
//没容器码
|
||||
// List<Long> lsits=commonDao.findByQuery("select t.id from Task t where t.id in("+invIds+") "
|
||||
// + " and t.dstLP.id is null and (t.positionStatus is null or t.positionStatus='0') ");
|
||||
for(Long isd:lsits) {
|
||||
List<Long> tasid=new ArrayList<Long>();
|
||||
tasid.add(isd);
|
||||
JSONObject bh=wmsSapWeizhihuichuang(tasid,fromaddress,dstLoc.getCode(),"X");//位置回传
|
||||
|
||||
String mes2= WmsSapposition(bh, tasid, dstLoc, worker);//更新拣货位置信息
|
||||
if(bh.get("ZCODE").equals("true")) {
|
||||
msg1=msg1+mes2;
|
||||
}else {
|
||||
msg=msg+mes2;//失败
|
||||
}
|
||||
}
|
||||
}
|
||||
//查询本次交单的工单
|
||||
// String pickidshpl="select t.pickTicketDetail.pickTicket.id from Task t where t.id in("+invIds+") "
|
||||
// + " group by t.pickTicketDetail.pickTicket.id ";
|
||||
// pickIdsList=commonDao.findByQuery(pickidshpl);
|
||||
|
||||
refPickHandOrder(pickIdsList);//刷新工单
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}else{
|
||||
msg = "请扫描库位码!";
|
||||
}
|
||||
}else{
|
||||
msg = "invIds参数错误或为null!";
|
||||
}
|
||||
}else{
|
||||
msg = "zone参数错误或为null!";
|
||||
}
|
||||
if(msg!=null&&!msg.equals("")) {
|
||||
return msg;
|
||||
}else {
|
||||
return msg1;
|
||||
}
|
||||
}
|
||||
//位置回传更新task上信息
|
||||
public String WmsSapposition(JSONObject bh,List<Long> tids1,Location dstLoc,Worker worker) {
|
||||
String msg1="";
|
||||
|
|
|
|||
|
|
@ -540,12 +540,12 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
String dstLP =json.has("dstLP")?json.getString("dstLP"):"";
|
||||
resultJson=app.scandstLP(billCode, dstLP, workerId, wId);
|
||||
}else if("scanLocationCode".equals(methodType)){
|
||||
//合单-位置码扫描
|
||||
//释放槽位格-位置码扫描
|
||||
String code =json.has("Code")?json.getString("Code"):"";
|
||||
long positionId = json.has("positionId")?Long.parseLong(json.getString("positionId").equals("")?"0":json.getString("positionId")):0;
|
||||
resultJson=app.scanLocationCode(code,positionId, workerId, wId,type);
|
||||
}else if("stockMake".equals(methodType)){
|
||||
//合单-完成按钮
|
||||
//释放槽位格-完成按钮
|
||||
String invIds =json.has("invIds")?json.getString("invIds"):"";
|
||||
long locId = json.has("locId")?Long.parseLong(json.getString("locId")):0l;
|
||||
resultJson=this.stockMake(invIds, locId, workerId, wId, commonDao);
|
||||
|
|
@ -1054,6 +1054,15 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
if(ASNDetails.size()>0){
|
||||
ASNDetail ad=ASNDetails.get(0);
|
||||
Item item=commonDao.load(Item.class, ad.getItem().getId());
|
||||
if(item.getVolume()<=0) {
|
||||
status = "2";
|
||||
msg = "料号没测量,请先测量! ";
|
||||
resultJson.put("status", status);
|
||||
resultJson.put("msg", msg);
|
||||
resultJson.put("data", data);
|
||||
return resultJson;
|
||||
}
|
||||
|
||||
|
||||
if((item.getValidPeriod()!=null&&item.getValidPeriod()>0)||item.getIsBOM()) {
|
||||
|
||||
|
|
@ -1130,10 +1139,19 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
List<ASNDetail> ASNDetails=commonDao.findByQuery(" from ASNDetail ad where ad.id in ("+asnDetailId+") ");
|
||||
if(ASNDetails.size()>0){
|
||||
for(ASNDetail ad:ASNDetails){
|
||||
Item item=commonDao.load(Item.class, ad.getItem().getId());
|
||||
quantity+=ad.getExpectedQuantity()-ad.getReceivedQuantity();
|
||||
if(ad.getLotInfo()!=null&&ad.getLotInfo().getPropC2()!=null) {
|
||||
sqt=ad.getLotInfo().getPropC2();
|
||||
}
|
||||
if(item.getVolume()<=0) {
|
||||
status = "2";
|
||||
msg = item.getCode()+"料号没测量,请先测量! ";
|
||||
resultJson.put("status", status);
|
||||
resultJson.put("msg", msg);
|
||||
resultJson.put("data", data);
|
||||
return resultJson;
|
||||
}
|
||||
}
|
||||
}
|
||||
BigDecimal bg1 = new BigDecimal(quantity);
|
||||
|
|
@ -2543,7 +2561,8 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
if (warehouseId > 0) {
|
||||
try {
|
||||
PickTicketManager pickTicketManager = (PickTicketManager) ac.getBean("pickTicketManager");
|
||||
msg=pickTicketManager.presentationConfirmTwo(zone, invIds, locId, userId, warehouseId, commonDao);
|
||||
// msg=pickTicketManager.presentationConfirmTwo(zone, invIds, locId, userId, warehouseId, commonDao);
|
||||
msg=pickTicketManager.presentationConfirmThree(zone, invIds, locId, userId, warehouseId);
|
||||
status="1";
|
||||
}catch (Exception e) {
|
||||
msg=e.getMessage();
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public class ImageQueryServlet extends HttpServlet {
|
|||
String[] t = type.split(",");
|
||||
id = StringUtils.trimToEmpty(request.getParameter("aorptid"));
|
||||
|
||||
String hql="select f.id,f.remark as FILE_URL,f.viewName as VIEW_NAME,f.fileUrl as furl,"
|
||||
String hql="select f.id,f.viewfileUrl as FILE_URL,f.viewName as VIEW_NAME,f.fileUrl as furl,"
|
||||
+ "f.imageType from SignFile f ";
|
||||
|
||||
String hql_="select count(*) from SignFile f where f.objectType='"+type+"' and f.objectId="+id;
|
||||
|
|
|
|||
|
|
@ -215,8 +215,15 @@ public class PickingServlet extends HttpServlet {
|
|||
}else if("exchangeOrder".equals(methodType)){
|
||||
//交单任务列表
|
||||
String p_code =json.has("p_code")?json.getString("p_code"):"";
|
||||
String zone_code =json.has("name")?json.getString("name"):"";
|
||||
resultJson=app.exchangeOrder(p_code,zone_code, workerId, wId);
|
||||
String zone_name =json.has("name")?json.getString("name"):"";
|
||||
String orderType =json.has("orderType")?json.getString("orderType"):"";
|
||||
String zone =json.has("zone")?json.getString("zone"):"";
|
||||
resultJson=app.exchangeOrder(p_code,zone_name, zone,orderType,workerId, wId);
|
||||
}else if("queryOrderDetails".equals(methodType)){
|
||||
//交单任务列表查询料号明细
|
||||
String BILLCODE =json.has("BILLCODE")?json.getString("BILLCODE"):"";//子任务号
|
||||
|
||||
resultJson=app.queryOrderDetails(BILLCODE,workerId, wId);
|
||||
}else if("queryNCR".equals(methodType)){
|
||||
//查询NCR
|
||||
String ncrCode =json.has("ncrCode")?json.getString("ncrCode"):"";
|
||||
|
|
|
|||
|
|
@ -130,6 +130,8 @@ public class zwSapServlet extends HttpServlet {
|
|||
resultJson=apps.storeOAQNVENTORY(log,data);
|
||||
}else if ("OAPERSONNEL".equals(method)) {//OA办公系统 人员信息同步
|
||||
resultJson=apps.storeOAPERSONNEL(log,data);
|
||||
}else if ("ADILFIT".equals(method)) {//OA办公系统 人员信息同步
|
||||
resultJson=apps.storeADILFIT(log,data);
|
||||
}
|
||||
// } catch (Exception e) {
|
||||
// JSONObject json0 = new JSONObject();
|
||||
|
|
|
|||
|
|
@ -1222,4 +1222,9 @@
|
|||
<value>com/dev/swms/server/model/base/workOrderAllocationInfo.hbm.xml</value>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
<bean id="inventoryQueryViewHibernateMappingResource" class="com.dev.energy.server.dao.hibernate.HibernateMappingResource">
|
||||
<constructor-arg>
|
||||
<value>com/dev/swms/server/model/inventory/inventoryQueryView.hbm.xml</value>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
</beans>
|
||||
|
|
@ -58,4 +58,6 @@
|
|||
<bean id="picktickCodeFormatter" class="com.dev.swms.server.action.formatter.PicktickCodeFormatter" />
|
||||
<bean id="colourPickTicket" class="com.dev.swms.server.action.formatter.ColourPickTicketFormat" />
|
||||
<bean id="colourSAPStatus" class="com.dev.swms.server.action.formatter.ColourSAPStatusFormat" />
|
||||
<bean id="lookSignFileFormatter" class="com.dev.swms.server.action.formatter.LookSignFileFormatter" />
|
||||
|
||||
</beans>
|
||||
|
|
@ -141,3 +141,14 @@ EXEC sp_rename 'ITEM_KEY.PROP_LC5', 'PROP_LC10', 'COLUMN';
|
|||
-------2025-05-23
|
||||
ALTER TABLE INVENTORY add Item_Code varchar(100) COLLATE Chinese_PRC_CI_AS NULL;
|
||||
|
||||
|
||||
-----2025-05-28
|
||||
|
||||
ALTER TABLE SIGN_FILE add viewfileUrl varchar(200) COLLATE Chinese_PRC_CI_AS NULL;
|
||||
|
||||
select * from SIGN_FILE where viewfileUrl is not null;
|
||||
update SIGN_FILE set viewfileUrl=remark where viewfileUrl is null and remark is not null;
|
||||
UPDATE SIGN_FILE
|
||||
SET viewfileUrl = REPLACE(viewfileUrl, 'http://192.168.2.88:8080', '*.asnImageServlet?imageSourcePath=C:/tomcat-8080/webapps')
|
||||
WHERE viewfileUrl is not null;
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,15 @@
|
|||
from WarehouseArea zone
|
||||
where 1=1
|
||||
and zone.warehouse = #{SESSION_WAREHOUSE}
|
||||
and zone.disabled=false]]></hql>
|
||||
</list>
|
||||
<list id="item.defaultWarehouseArea.id" title="默认库区" row="4" col="2" span="1" width="120" readOnly="false" required="false" reserve="false" forceOverride="true">
|
||||
<hql><![CDATA[select
|
||||
zone.id,
|
||||
zone.name
|
||||
from WarehouseArea zone
|
||||
where 1=1
|
||||
and zone.warehouse = #{SESSION_WAREHOUSE}
|
||||
and zone.disabled=false]]></hql>
|
||||
</list>
|
||||
<booleanList id="item.beSAPItem" title="是否SAP料号" row="11" col="1" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
|
|
@ -95,6 +104,7 @@
|
|||
where 1=1
|
||||
/~item.code: and item.code like {item.code} ~/
|
||||
/~item.warehouseArea.id: and item.warehouseArea.id = {item.warehouseArea.id} ~/
|
||||
/~item.defaultWarehouseArea.id: and item.defaultWarehouseArea.id = {item.defaultWarehouseArea.id} ~/
|
||||
/~item.smallUnit: and item.smallUnit like {item.smallUnit} ~/
|
||||
/~item.name: and item.name like {item.name} ~/
|
||||
/~item.saleTime1: and item.saleTime >= {item.saleTime1} ~/
|
||||
|
|
|
|||
|
|
@ -5,14 +5,18 @@
|
|||
autoQuery="false">
|
||||
<search>
|
||||
<inputUIs>
|
||||
<text id="position.code" title="position.code" row="1" col="1"
|
||||
span="1" readOnly="false" required="false" reserve="false"
|
||||
forceOverride="true" inVisible="false" trimSpace="true"
|
||||
isPrecision="false" />
|
||||
<text id="position.name" title="position.name" row="1" col="2"
|
||||
<text id="signFile.fileName" title="图片名称" row="1" col="1"
|
||||
span="1" readOnly="false" required="false" reserve="false"
|
||||
forceOverride="true" inVisible="false" trimSpace="true"
|
||||
isPrecision="false" />
|
||||
<date id="beginDate" title="上传日期" row="2" col="1"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" showTime="false" manualEditable="true"
|
||||
defaultCurrentDate="false" />
|
||||
<date id="endDate" title="至" row="2" col="2"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" showTime="false" manualEditable="true"
|
||||
defaultCurrentDate="false" />
|
||||
|
||||
</inputUIs>
|
||||
</search>
|
||||
|
|
@ -28,9 +32,16 @@
|
|||
round(signFile.weight,2),
|
||||
round(signFile.volume,6),
|
||||
signFile.packNumber,
|
||||
signFile.remark
|
||||
signFile.remark,
|
||||
'look',
|
||||
'download'
|
||||
from SignFile signFile
|
||||
WHERE 1=1 and signFile.objectType='ItemPicture'
|
||||
WHERE signFile.objectType='ItemPicture'
|
||||
/~signFile.fileName: AND signFile.fileName like {signFile.fileName} ~/
|
||||
and (1=1
|
||||
/~beginDate: AND CONVERT(varchar(100), signFile.fileDate, 23) = {beginDate} ~/
|
||||
/~endDate: or (CONVERT(varchar(100), signFile.fileDate, 23)>= {beginDate} and CONVERT(varchar(100), signFile.fileDate, 23)<= {endDate}) ~/
|
||||
)
|
||||
ORDER BY signFile.id DESC
|
||||
]]></datasource>
|
||||
<columns>
|
||||
|
|
@ -39,16 +50,17 @@
|
|||
<column id="signFile.fileName" title="图片名称" visible="true" horizonAlign="center" verticalAlign="middle"/>
|
||||
<column id="signFile.fileDate1" title="上传日期" visible="true" horizonAlign="center" verticalAlign="middle" format="dateFormatter"/>
|
||||
<column id="signFile.fileDate2" title="上传时间" visible="true" horizonAlign="center" verticalAlig0n="middle" format="dateTiemFormatter"/>
|
||||
<column id="signFile.length" title="长" visible="true" horizonAlign="center" verticalAlign="middle"/>
|
||||
<column id="signFile.width" title="宽" visible="true" horizonAlign="center" verticalAlign="middle"/>
|
||||
<column id="signFile.height" title="高" visible="true" horizonAlign="center" verticalAlign="middle"/>
|
||||
<column id="signFile.weight" title="重量" visible="true" horizonAlign="center" verticalAlign="middle"/>
|
||||
<column id="signFile.length" title="长cm" visible="true" horizonAlign="center" verticalAlign="middle"/>
|
||||
<column id="signFile.width" title="宽cm" visible="true" horizonAlign="center" verticalAlign="middle"/>
|
||||
<column id="signFile.height" title="高cm" visible="true" horizonAlign="center" verticalAlign="middle"/>
|
||||
<column id="signFile.weight" title="重量KG" visible="true" horizonAlign="center" verticalAlign="middle"/>
|
||||
<column id="signFile.volume" title="体积" visible="true" horizonAlign="center" verticalAlign="middle"/>
|
||||
<column id="signFile.packNumber" title="规格数量" visible="true" horizonAlign="center" verticalAlign="middle"/>
|
||||
<column id="signFile.remark" title="备注" visible="true" horizonAlign="center" verticalAlign="middle"/>
|
||||
<column id="checkImageView" width="80" title="查看图片" visible="true" horizonAlign="left" format="lookSignFileFormatter"/>
|
||||
</columns>
|
||||
<buttons>
|
||||
<commit id="deleteImage1" title="delete2" enableType="multi" invisible="false" confirmMessage="确认是否删除图片?">
|
||||
<commit id="deleteImage1" title="删除" enableType="multi" invisible="false" confirmMessage="确认是否删除图片?">
|
||||
<mappings>
|
||||
<mapping id="ids" className="list"/>
|
||||
</mappings>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@
|
|||
zone.name,
|
||||
location.code,
|
||||
location.name
|
||||
|
||||
from Location location
|
||||
left join location.stowage stowage
|
||||
left join location.zone zone
|
||||
|
|
|
|||
|
|
@ -0,0 +1,250 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pages>
|
||||
<maintainPage id="maintainInventoryQueryViewPage" title="库存汇总2"
|
||||
autoQuery="true">
|
||||
<search>
|
||||
<inputUIs>
|
||||
<!-- <remote id="location.id" title="库位" row="1" col="1" -->
|
||||
<!-- readOnly="false" required="false" reserve="false" forceOverride="false" -->
|
||||
<!-- inVisible="false" editModel="normal" manualEditable="true" -->
|
||||
<!-- displayColumn="2" displayedTableHead="序号,库位编码,库位名称"> -->
|
||||
<!-- <hql><![CDATA[ select location.id, location.code, location.name -->
|
||||
<!-- from Location location -->
|
||||
<!-- where upper(location.code) like upper(:param) -->
|
||||
<!-- and location.warehouse = #{SESSION_WAREHOUSE} -->
|
||||
<!-- and location.type <> 'COUNT' and location.disabled=false -->
|
||||
<!-- ]]></hql> -->
|
||||
<!-- </remote> -->
|
||||
<text id="location.code" title="库位" row="0" col="1" span="1"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" trimSpace="false" />
|
||||
<text id="item.code" title="料号" row="0" col="2" span="1"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" trimSpace="false" />
|
||||
<text id="item.name" title="item.name" row="1" col="1"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" trimSpace="false" />
|
||||
<text id="propC1" title="批次号" row="1" col="2"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" trimSpace="false" />
|
||||
<!-- <text id="inventory.SOI" title="单据编号" row="2" col="1"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" trimSpace="false" /> -->
|
||||
<!-- <text id="inventory.status" title="库存状态" row="2" col="1"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" trimSpace="false" /> -->
|
||||
<list id="inventory.status" title="库存状态" row="2" col="1" width="120px"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false" >
|
||||
<hql><![CDATA[ select
|
||||
commonCode.code,
|
||||
commonCode.name
|
||||
from CommonCode commonCode
|
||||
where commonCode.codeType = '库存状态']]></hql>
|
||||
</list>
|
||||
<list id="inventory.kqName" title="库区" row="2" col="2"
|
||||
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="inventory.propC2" title="LOC" row="3" col="2"
|
||||
span="1" width="120px" readOnly="false" required="false" reserve="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.propC2" title="LOC" row="3" col="1" -->
|
||||
<!-- readOnly="false" required="false" reserve="false" forceOverride="false" -->
|
||||
<!-- inVisible="false" trimSpace="false" /> -->
|
||||
<text id="inventory.propC3" title="特殊标记" row="3" col="2"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" trimSpace="false" />
|
||||
<text id="inventory.propC5" title="供应商代码" row="5" col="1"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" trimSpace="false" />
|
||||
<booleanList id="inventory.singleItem" title="是否批次号管理" row="6" col="1" span="1" readOnly="false"
|
||||
required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<booleanList id="inventory.validity" title="是否有效期管理" row="6" col="2" span="1" readOnly="false"
|
||||
required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<booleanList id="inventory.lock" title="盘点是否锁定" row="5" col="2" span="1" readOnly="false"
|
||||
required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<date id="beginDate" title="存货日期" row="4" col="1"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" showTime="false" manualEditable="true"
|
||||
defaultCurrentDate="false" />
|
||||
<date id="endDate" title="至" row="4" col="2"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" showTime="false" manualEditable="true"
|
||||
defaultCurrentDate="false" />
|
||||
<text id="inventory.statuss" title="状态" row="16" col="1"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" trimSpace="false" />
|
||||
<remote id="pickTicketDetail.location.id" title="库位"
|
||||
row="16" col="2" readOnly="false" required="false" reserve="false"
|
||||
forceOverride="false" inVisible="false" manualEditable="true"
|
||||
headerNumber="4" displayColumn="2" displayedTableHead="序号,编码">
|
||||
<hql><![CDATA[SELECT
|
||||
lc.id,
|
||||
lc.code
|
||||
FROM Location lc
|
||||
WHERE 1=1
|
||||
and lc.code like :param )
|
||||
AND lc.disabled = false
|
||||
]]></hql>
|
||||
</remote>
|
||||
</inputUIs>
|
||||
</search>
|
||||
<datasource type="hql"><![CDATA[SELECT
|
||||
inventory.id,
|
||||
inventory.locCode,
|
||||
inventory.itemCode,
|
||||
inventory.itemName,
|
||||
inventory.UNIT,
|
||||
inventory.status,
|
||||
inventory.statuss,
|
||||
inventory.quantity,
|
||||
cast (inventory.queuedQuantity as string),
|
||||
inventory.propC1,
|
||||
inventory.propC2,
|
||||
inventory.propC3,
|
||||
inventory.propC5,
|
||||
inventory.propC9,
|
||||
inventory.propD2,
|
||||
inventory.kqName,
|
||||
inventory.validity,
|
||||
inventory.storageDate,
|
||||
inventory.invDes,
|
||||
inventory.lock
|
||||
FROM InventoryQueryView inventory
|
||||
WHERE 1=1
|
||||
/~location.code: AND inventory.locCode like {location.code}~/
|
||||
/~item.code: AND upper(inventory.itemCode) LIKE upper({item.code})~/
|
||||
/~item.name: AND upper(inventory.itemName) LIKE upper({item.name})~/
|
||||
/~inventory.statuss: AND upper(inventory.statuss) LIKE upper({inventory.statuss})~/
|
||||
/~propC1: AND inventory.propC1 LIKE {propC1}~/
|
||||
/~inventory.SOI: AND inventory.soi LIKE {inventory.SOI}~/
|
||||
/~quantity: AND inventory.quantity <= {quantity}~/
|
||||
/~inventory.propC2: AND upper(inventory.propC2) LIKE upper({inventory.propC2})~/
|
||||
/~inventory.propC3: AND upper(inventory.propC3) LIKE upper({inventory.propC3})~/
|
||||
/~inventory.propC5: AND upper(inventory.propC5) LIKE upper({inventory.propC5})~/
|
||||
/~inventory.status: AND upper(inventory.status) LIKE upper({inventory.status})~/
|
||||
/~inventory.kqName: and inventory.zone.id = {inventory.kqName}~/
|
||||
/~pickTicketDetail.location.id: and inventory.location.id = {pickTicketDetail.location.id}~/
|
||||
/~inventory.lock : and inventory.lock = {inventory.lock} ~/
|
||||
/~inventory.singleItem : and inventory.singleItem = {inventory.singleItem} ~/
|
||||
/~inventory.validity : and inventory.validity = {inventory.validity} ~/
|
||||
and (1=1
|
||||
/~beginDate: and CONVERT(varchar(100), inventory.storageDate, 23) >= {beginDate} ~/
|
||||
/~endDate: or CONVERT(varchar(100), inventory.storageDate, 23)>= {beginDate} and CONVERT(varchar(100), inventory.storageDate, 23)<= {endDate} ~/
|
||||
)
|
||||
order by inventory.locCode,inventory.propC1
|
||||
]]></datasource>
|
||||
<columns>
|
||||
<column id="inventory.id" title="ID" visible="true" width="60"/>
|
||||
<column id="inventory.locCode" title="库位" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.itemCode" title="料号" width="180" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.itemName" width="230" title="物料描述" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.UNIT" width="50" title="单位" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.status" width="70" title="库存状态" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.statuss" width="70" title="状态" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.quantity" width="60" title="库存数量" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.queuedQuantity" width="60" title="zyQuantity" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.propC1" title="批次号" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.propC2" title="LOC" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.propC3" title="特殊标记" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.propC5" title="供应商代码" visible="true" horizonAlign="center" format="picktickCodeFormatter" />
|
||||
<column id="inventory.propC9" title="工厂" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.propD2" title="失效日期" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.kqName" title="库区" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.validity" title="是否有效期管理" visible="true"
|
||||
horizonAlign="center" format="booleanFormat"/>
|
||||
<column id="inventory.storageDate" title="存货日期" visible="true" horizonAlign="center" format="dateFormatter"/>
|
||||
<column id="inventory.invDes" title="冻结备注" visible="true" horizonAlign="center" />
|
||||
<column id="inventory.lock" title="盘点锁定" visible="true" horizonAlign="center" format="booleanFormat"/>
|
||||
</columns>
|
||||
<buttons>
|
||||
<popup id="editInventoryStatus" title="冻结库存" enableType="multi" invisible="false" containId="true" pageId="editInventoryStatus">
|
||||
<enableExpression><![CDATA[(${inventory.status}=='已入库'&&${inventory.queuedQuantity}<=0)]]></enableExpression>
|
||||
</popup>
|
||||
<!-- <commit id="frozenInv" title="冻结库存" -->
|
||||
<!-- enableType="multi" invisible="false" confirmMessage="确认是否冻结库存?"> -->
|
||||
<!-- <enableExpression><![CDATA[(${inventory.status}=='已入库'&&${inventory.queuedQuantity}<=0)]]></enableExpression> -->
|
||||
<!-- <mappings> -->
|
||||
<!-- <mapping id="ids" className="list" /> -->
|
||||
<!-- </mappings> -->
|
||||
<!-- <actions> -->
|
||||
<!-- <action managerName="inventoryManager" methodName="frozenInv" -->
|
||||
<!-- parameter="ids" /> -->
|
||||
<!-- </actions> -->
|
||||
<!-- <forwards> -->
|
||||
<!-- <forward name="refreshWindow" newEnabled="true" -->
|
||||
<!-- editEnabled="true" /> -->
|
||||
<!-- </forwards> -->
|
||||
<!-- </commit> -->
|
||||
<commit id="frozenInvs" title="解冻库存"
|
||||
enableType="multi" invisible="false" confirmMessage="确认是否冻结库存?">
|
||||
<enableExpression><![CDATA[(${inventory.status}=='冻结')]]></enableExpression>
|
||||
<mappings>
|
||||
<mapping id="ids" className="list" />
|
||||
</mappings>
|
||||
<actions>
|
||||
<action managerName="inventoryManager" methodName="frozenInvs"
|
||||
parameter="ids" />
|
||||
</actions>
|
||||
<forwards>
|
||||
<forward name="refreshWindow" newEnabled="true"
|
||||
editEnabled="true" />
|
||||
</forwards>
|
||||
</commit>
|
||||
<popup id="modify" title="查看" enableType="single" invisible="false"
|
||||
containId="true" pageId="modifyXLinfoPage">
|
||||
</popup>
|
||||
<popup id="importInv" title="importInv" enableType="none" invisible="false" containId="false" pageId="importInvPage"/>
|
||||
<!-- <popup id="modifyList" title="可库位整理清单" enableType="single" invisible="false" -->
|
||||
<!-- containId="true" pageId="maintainLocationListPage"> -->
|
||||
<!-- </popup> -->
|
||||
<popup id="othermove" title="库存移位" enableType="single" invisible="false" containId="true" pageId="moveInventoryPage">
|
||||
<enableExpression><![CDATA[(${inventory.status}=='已入库')&&${inventory.queuedQuantity}<=0]]></enableExpression>
|
||||
</popup>
|
||||
<popup id="modifyInventoryLot" title="批次号调整" enableType="single" invisible="false" containId="true" pageId="modifyInventoryLotPage">
|
||||
<enableExpression><![CDATA[(${inventory.status}=='已入库' )]]></enableExpression>
|
||||
</popup>
|
||||
<popup id="importInv1" title="数据对比" enableType="none" invisible="false" containId="false" pageId="importInvDataPage"/>
|
||||
|
||||
<commit id="fromInvs" title="邮件发送"
|
||||
enableType="multi" invisible="false" confirmMessage="确认发送邮件?">
|
||||
<mappings>
|
||||
<mapping id="ids" className="list" />
|
||||
</mappings>.
|
||||
<actions>
|
||||
<action managerName="inventoryManager" methodName="sendEamil"
|
||||
parameter="ids" />
|
||||
</actions>
|
||||
<forwards>
|
||||
<forward name="refreshWindow" newEnabled="true"
|
||||
editEnabled="true" />
|
||||
</forwards>
|
||||
</commit>
|
||||
<popup id="callLOCPage" title="呼叫" enableType="none" invisible="false"
|
||||
containId="false" pageId="editInventoryCellPage">
|
||||
</popup>
|
||||
<commit id="fromInvs21" title="复制"
|
||||
enableType="multi" invisible="false" confirmMessage="确认?">
|
||||
<mappings>
|
||||
<mapping id="ids" className="list" />
|
||||
</mappings>.
|
||||
<actions>
|
||||
<action managerName="inventoryManager" methodName="fuzhi"
|
||||
parameter="ids" />
|
||||
</actions>
|
||||
<forwards>
|
||||
<forward name="refreshWindow" newEnabled="true"
|
||||
editEnabled="true" />
|
||||
</forwards>
|
||||
</commit>
|
||||
</buttons>
|
||||
</maintainPage>
|
||||
</pages>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
<maintainPage id="maintainXuliehaoPage" title="库存汇总"
|
||||
autoQuery="true">
|
||||
<search>
|
||||
<inputUIs>
|
||||
<inputUIs>maintainInventoryQueryViewPage
|
||||
<!-- <remote id="location.id" title="库位" row="1" col="1" -->
|
||||
<!-- readOnly="false" required="false" reserve="false" forceOverride="false" -->
|
||||
<!-- inVisible="false" editModel="normal" manualEditable="true" -->
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@
|
|||
<menuItem title="maintainTaskBZQPage" pageId="maintainTaskBZQPage"/> -->
|
||||
<menuItem title="拣货" dir="pick">
|
||||
<menuItem title="拣货" pageId="maintainTaskPage"/>
|
||||
<menuItem title="拣货任务" pageId="maintainQueryTaskPage"/>
|
||||
</menuItem>
|
||||
<menuItem title="合单管理" dir="oneBill">
|
||||
<menuItem title="合单" pageId="maintainBillPage"/>
|
||||
|
|
@ -244,6 +245,7 @@
|
|||
|
||||
<!-- </menuItem> -->
|
||||
<menuItem title="库存汇总" pageId="maintainXuliehaoPage"/>
|
||||
<menuItem title="库存汇总2" pageId="maintainInventoryQueryViewPage"/>
|
||||
<menuItem title="Non-stock库存" pageId="maintainOAXuliehaoPage"/>
|
||||
<menuItem title="序列号清单" pageId="maintainInventoryPage"/>
|
||||
<menuItem title="不良品库存" pageId="maintainReceivingInventoryPage"/>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,403 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<pages>
|
||||
<maintainPage id="maintainQueryTaskPage" title="拣货任务" autoQuery="false">
|
||||
<search>
|
||||
<inputUIs>
|
||||
<text id="billCode" title="子任务号" row="0" col="1" readOnly="false" required="false"
|
||||
reserve="false" forceOverride="false" inVisible="false" trimSpace="false" />
|
||||
<text id="pickTicket.code" title="工单号" row="0" col="2" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" />
|
||||
<text id="pickTicket.sourceType" title="SAP类型" row="0" col="3" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" />
|
||||
<list id="warehouseArea.id" title="拣货库区" row="1" 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
|
||||
AND warehouseArea.warehouse = #{SESSION_WAREHOUSE} order by warehouseArea.name
|
||||
]]></hql>
|
||||
</list>
|
||||
<!-- <remote id="dstLoc.code" title="所在库位" row="1" col="2"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" editModel="normal" manualEditable="true"
|
||||
displayColumn="2" displayedTableHead="序号,库位编码,库位名称">
|
||||
<hql><![CDATA[ select location.id, location.code, location.name
|
||||
from Location location
|
||||
where upper(location.code) like upper(:param)
|
||||
and location.warehouse = #{SESSION_WAREHOUSE}
|
||||
and location.type <> 'COUNT' and location.disabled=false
|
||||
]]></hql>
|
||||
</remote> -->
|
||||
<text id="dstLoc.code" title="所在库位" row="1" col="2" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" />
|
||||
<text id="itemCode" title="料号" row="1" col="3" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" />
|
||||
<list id="billType.name" title="单据类型" row="2" col="1" width="120px" readOnly="false" required="false" reserve="false" forceOverride="false" enumType="BillType">
|
||||
<hql><![CDATA[ SELECT
|
||||
billType.id,
|
||||
billType.name From BillType billType]]></hql>
|
||||
</list>
|
||||
<!-- <text id="t.agvTask.targetArea" title="工作站" row="2" col="2" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" /> -->
|
||||
<list id="t.agvTask.targetArea" title="工作站" row="2" col="2" 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 ('201','202','203','204','205','206','207','208','209','210','211','212',
|
||||
'213','214','215','101','102','103','104','105','106','107','602','603','604','605')
|
||||
]]></hql>
|
||||
</list>
|
||||
<list id="t.worker4.name" title="拣货人" row="2" col="3"
|
||||
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
||||
forceOverride="false" manualEditable="true">
|
||||
<hql><![CDATA[ select
|
||||
worker.id,
|
||||
worker.name
|
||||
from Worker worker
|
||||
where 1=1 and worker.name>'zzzzzzzzzz' order by worker.name asc
|
||||
]]></hql>
|
||||
</list>
|
||||
<text id="waveDoc.code" title="波次号" row="3" col="1" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" />
|
||||
<text id="dstLP.remark" title="容器码" row="3" col="2" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" />
|
||||
<text id="srcLoc.code" title="拣货库位" row="3" col="3" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" />
|
||||
<date id="beginDate" title="pickTicket.orderDate"
|
||||
row="4" col="1" readOnly="false" required="false" reserve="false"
|
||||
forceOverride="false" inVisible="false" showTime="false"
|
||||
manualEditable="true" defaultCurrentDate="false" />
|
||||
<date id="endDate" title="至"
|
||||
row="4" col="2" readOnly="false" required="false" reserve="false"
|
||||
forceOverride="false" inVisible="false" showTime="false"
|
||||
manualEditable="true" defaultCurrentDate="false" />
|
||||
<!-- <text id="pickTicket.equatedQuantity" title="加急标记" row="4" col="3" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" /> -->
|
||||
<booleanList id="pickTicket.equatedQuantity" title="加急标记" row="4" col="3" span="1" readOnly="false"
|
||||
required="false" reserve="false" forceOverride="true" inVisible="false"/>
|
||||
<!-- <list id="inventory.status" title="状态" row="4" col="3" width="120px"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false" >
|
||||
<hql><![CDATA[ select
|
||||
commonCode.code,
|
||||
commonCode.name
|
||||
from Task commonCode
|
||||
where commonCode.codeType = '合单状态'
|
||||
case WHEN t.planQuantity-t.movedQuantityMU =0 then '处理完成' WHEN t.movedQuantityMU =0 then '未处理' else '处理中' end as aa
|
||||
]]></hql>
|
||||
</list> -->
|
||||
<date id="beginDate1" title="分配日期"
|
||||
row="5" col="1" readOnly="false" required="false" reserve="false"
|
||||
forceOverride="false" inVisible="false" showTime="false"
|
||||
manualEditable="true" defaultCurrentDate="false" />
|
||||
<date id="endDate1" title="至"
|
||||
row="5" col="2" readOnly="false" required="false" reserve="false"
|
||||
forceOverride="false" inVisible="false" showTime="false"
|
||||
manualEditable="true" defaultCurrentDate="false" />
|
||||
<list id="t.strBill1" title="下发人" row="5" col="3"
|
||||
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
||||
forceOverride="false" manualEditable="true">
|
||||
<hql><![CDATA[ select
|
||||
worker.name,
|
||||
worker.name
|
||||
from Worker worker
|
||||
where 1=1
|
||||
]]></hql>
|
||||
</list>
|
||||
|
||||
<date id="beginDate2" title="拣货日期"
|
||||
row="6" col="1" readOnly="false" required="false" reserve="false"
|
||||
forceOverride="false" inVisible="false" showTime="false"
|
||||
manualEditable="true" defaultCurrentDate="false" />
|
||||
<date id="endDate2" title="至"
|
||||
row="6" col="2" readOnly="false" required="false" reserve="false"
|
||||
forceOverride="false" inVisible="false" showTime="false"
|
||||
manualEditable="true" defaultCurrentDate="false" />
|
||||
<list id="code" title="拣货状态" row="6" col="1"
|
||||
span="1" width="120px" readOnly="false" required="false" reserve="false"
|
||||
forceOverride="false" manualEditable="true">
|
||||
<hql><![CDATA[ select
|
||||
commonCode.code,
|
||||
commonCode.name
|
||||
from CommonCode commonCode
|
||||
where 1=1
|
||||
AND commonCode.codeType='JHZT'
|
||||
|
||||
]]></hql>
|
||||
</list>
|
||||
<list id="agv.status" title="任务状态" row="17" col="1" width="120px" readOnly="false" required="false" reserve="false" forceOverride="false" enumType="STATUS">
|
||||
<hql><![CDATA[ SELECT
|
||||
enumerate.enumValue,
|
||||
enumerate.enumValue FROM Enumerate enumerate
|
||||
WHERE enumerate.enumType = 'STATUS' and enumerate.enumValue not in('CANCEL')]]></hql>
|
||||
</list>
|
||||
<text id="t.code" title="wms任务号" row="17" col="3" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false" />
|
||||
<text id="pickTicket.logisticsCompany" title="工作中心" row="18" col="1"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" trimSpace="false" />
|
||||
<text id="pickTicketDetail.strBill12" title="机台号" row="18" col="2"
|
||||
readOnly="false" required="false" reserve="false" forceOverride="false"
|
||||
inVisible="false" trimSpace="false" />
|
||||
</inputUIs>
|
||||
</search>
|
||||
<datasource type="hql"><![CDATA[ select
|
||||
t.id,
|
||||
pickTicket.code,
|
||||
pickTicket.orderDate,
|
||||
t.endRegion,
|
||||
t.seedWall.name,
|
||||
szone.name,
|
||||
pickTicket.sourceType,
|
||||
billType.name,
|
||||
t.billCode,
|
||||
item.code,
|
||||
t.itemCode,
|
||||
item.unit,
|
||||
item.shipRules,
|
||||
srcLoc.code,
|
||||
dstLP.remark,
|
||||
zone.name,
|
||||
dstLoc.code,
|
||||
|
||||
t.yc_qty,
|
||||
t.planQuantityMU,
|
||||
t.movedQuantityMU,
|
||||
case WHEN t.planQuantity-t.movedQuantityMU <=0 then '处理完成' WHEN t.movedQuantityMU =0 then '未处理' else '处理中' end as aa ,
|
||||
itemKey.lotInfo.propC2,
|
||||
itemKey.lotInfo.propC3,
|
||||
itemKey.lotInfo.propC5,
|
||||
itemKey.lotInfo.propC9,
|
||||
pickTicket.equatedQuantity,
|
||||
t.barCode,
|
||||
pickTicketDetail.strBill12,
|
||||
t.inventoryStatus,
|
||||
t.strBill10,
|
||||
t.ncrCode,
|
||||
pickTicketDetail.lineNumber,
|
||||
pickTicket.updateTime,
|
||||
pickTicket.updateTime,
|
||||
t.strBill1,
|
||||
t.dateBill1,
|
||||
t.dateBill1,
|
||||
|
||||
t.worker4.name,
|
||||
t.operateTime,
|
||||
t.operateTime,
|
||||
t.operator,
|
||||
waveDoc.code,
|
||||
t.createTime,
|
||||
t.createTime,
|
||||
t.statusCode,
|
||||
t.agvStatus,
|
||||
t.popular,
|
||||
t.code
|
||||
from Task t
|
||||
left join t.pickTicketDetail as pickTicketDetail
|
||||
left join pickTicketDetail.pickTicket as pickTicket
|
||||
left join pickTicket.billType as billType
|
||||
left join t.dstLoc as dstLoc
|
||||
left join t.seedWall as seed
|
||||
left join dstLoc.zone as zone
|
||||
left join t.srcLoc as srcLoc
|
||||
left join srcLoc.zone as szone
|
||||
left join t.itemKey as itemKey
|
||||
left join itemKey.item as item
|
||||
left join t.waveDoc as waveDoc
|
||||
left join t.worker4
|
||||
left join t.dstLP dstLP
|
||||
where t.type ='MV_PICKTICKET' and t.planQuantity>0
|
||||
and t.inventoryStatus<>'交单完成' and zone.id<>1787 and pickTicket.sourceType <>'411'
|
||||
/~t.worker4.name: AND (t.worker4.id) = {t.worker4.name}~/
|
||||
and (1=1
|
||||
/~beginDate: AND CONVERT(varchar(100), pickTicket.orderDate, 23) = {beginDate} ~/
|
||||
/~endDate: or (CONVERT(varchar(100), pickTicket.orderDate, 23) >= {beginDate} and t.type in('MV_PICKTICKET') and CONVERT(varchar(100), pickTicket.orderDate, 23) <= {endDate}) ~/
|
||||
) and (1=1
|
||||
/~beginDate1: AND CONVERT(varchar(100), t.createTime, 23) = {beginDate1} ~/
|
||||
/~endDate1: or (CONVERT(varchar(100), t.createTime, 23) >= {beginDate1} and t.type in('MV_PICKTICKET') and CONVERT(varchar(100), t.createTime, 23)<= {endDate1} )~/
|
||||
) and (1=1
|
||||
/~beginDate2: AND CONVERT(varchar(100), t.operateTime, 23) = {beginDate2} ~/
|
||||
/~endDate2: or (CONVERT(varchar(100), t.operateTime, 23) >= {beginDate2} and t.type in('MV_PICKTICKET') and CONVERT(varchar(100), t.operateTime, 23)<= {endDate2}) ~/
|
||||
)
|
||||
/~t.agvTask.targetArea: AND t.endRegion LIKE {t.agvTask.targetArea}~/
|
||||
/~code: AND ((t.planQuantity>t.movedQuantityMU and 'open' = {code} ) or ( t.planQuantity<=t.movedQuantityMU and 'finish' = {code}))~/
|
||||
/~srcLoc.code: AND srcLoc.code LIKE {srcLoc.code}~/
|
||||
/~dstLoc.code: AND dstLoc.code LIKE {dstLoc.code}~/
|
||||
/~billCode: AND t.billCode LIKE {billCode}~/
|
||||
/~pickTicket.logisticsCompany: AND pickTicket.logisticsCompany LIKE {pickTicket.logisticsCompany} ~/
|
||||
/~t.code: AND t.code LIKE {t.code}~/
|
||||
/~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}~/
|
||||
/~dLzone.name: AND dLzone.name = {dLzone.name}~/
|
||||
/~pickTicketDetail.strBill12: AND (pickTicketDetail.strBill12) LIKE {pickTicketDetail.strBill12}~/
|
||||
/~agv.status: AND agv.status ={agv.status} ~/
|
||||
|
||||
/~billCode: AND t.billCode LIKE {billCode}~/
|
||||
/~t.strBill1: AND t.strBill1 LIKE {t.strBill1}~/
|
||||
/~warehouseArea.id: AND szone.id = {warehouseArea.id}~/
|
||||
/~locCode: AND location.code LIKE {locCode}~/
|
||||
/~pickTicket.code: AND pickTicket.code LIKE {pickTicket.code}~/
|
||||
/~pickTicket.sourceType: AND pickTicket.sourceType LIKE {pickTicket.sourceType}~/
|
||||
/~warehouseArea: AND warehouseArea.name = {warehouseArea}~/
|
||||
/~locCode: AND location.code LIKE {locCode}~/
|
||||
/~itemCode: AND t.itemCode LIKE {itemCode}~/
|
||||
/~waveDoc.code: AND waveDoc.code LIKE {waveDoc.code}~/
|
||||
/~dstLP.remark: AND dstLP.remark LIKE {dstLP.remark}~/
|
||||
order by t.createTime desc,pickTicket.code,t.billCode,szone.name,t.id,pickTicket.orderDate desc
|
||||
]]></datasource>
|
||||
<columns>
|
||||
<column id="t.id" title="序号" visible="true" width="50" />
|
||||
<column id="pickTicket.code" title="工单号" width="130" visible="true" horizonAlign="center" format="picktickCodeFormatter"/>
|
||||
<column id="pickTicket.orderDate" title="需求日期" width="110" visible="true" horizonAlign="center" format="dateFormatter"/>
|
||||
<column id="t.agvTask.targetArea" title="工作站" width="60" visible="true" horizonAlign="center" />
|
||||
<column id="t.seedWall.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="billType.name" title="单据类型" width="100" visible="true" horizonAlign="center" />
|
||||
<column id="t.billCode" title="子任务号" width="140" visible="true" horizonAlign="center" />
|
||||
<column id="item.code" title="料号" width="180" visible="true" horizonAlign="center" />
|
||||
<column id="t.itemcode" title="料号查询" width="180" visible="true" horizonAlign="center" />
|
||||
<column id="item.unit" title="单位" visible="true" horizonAlign="center" />
|
||||
<column id="item.shipRules" title="价值等级" visible="true" horizonAlign="center" />
|
||||
<column id="srcLoc.code" title="拣货库位" visible="true" horizonAlign="center" />
|
||||
<column id="dstLP.remark" title="容器码" visible="true" horizonAlign="center" />
|
||||
<column id="dLzone.name" title="所在库区" visible="true" horizonAlign="center" />
|
||||
<column id="dstLoc.code" title="所在库位" visible="true" horizonAlign="center" />
|
||||
<column id="t.yc_qty" title="下发数量" visible="true" horizonAlign="center" dataType="double" />
|
||||
<column id="t.planQuantityMU" title="预分配数量" visible="true" horizonAlign="center" dataType="double" />
|
||||
<column id="t.movedQuantityMU" title="拣货数量" visible="true" horizonAlign="center" dataType="double" />
|
||||
<column id="task.status" title="状态" visible="true" horizonAlign="center" />
|
||||
<column id="itemKey.lotInfo.propC2" title="LOC" visible="true" horizonAlign="center" />
|
||||
<column id="itemKey.lotInfo.propC3" title="特殊标记" visible="true" horizonAlign="center" />
|
||||
<column id="itemKey.lotInfo.propC5" title="供应商" visible="true" horizonAlign="center" />
|
||||
<column id="itemKey.lotInfo.propC9" 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="pickTicketDetail.strBill12" 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="t.ncrCode" title="NCR号" visible="true" horizonAlign="center" />
|
||||
<column id="pickTicketDetail.lineNumber" title="项号" visible="true" horizonAlign="center" />
|
||||
<column id="pickTicket.updateTime1" title="创建日期" visible="true"
|
||||
horizonAlign="center" format="dateFormatter" />
|
||||
<column id="pickTicket.updateTime2" title="创建时间" visible="true"
|
||||
horizonAlign="center" format="dateTiemFormatter" />
|
||||
<column id="t.strBill1" title="下发人" visible="true" horizonAlign="center" />
|
||||
<column id="t.dateBill" title="下发日期" visible="true" horizonAlign="center" format="dateFormatter" />
|
||||
<column id="t.dateBill1" title="下发时间" visible="true" horizonAlign="center" format="dateTiemFormatter" />
|
||||
<column id="t.worker4.name" title="实际拣货人" visible="true" horizonAlign="center" />
|
||||
<column id="t.createTime11" title="拣货日期" visible="true" horizonAlign="center" format="dateFormatter" />
|
||||
<column id="t.createTime12" title="拣货时间" visible="true" horizonAlign="center" format="dateTiemFormatter" />
|
||||
<column id="t.operator" title="当前操作人" visible="true" horizonAlign="center" />
|
||||
<column id="waveDoc.code" title="波次号" visible="true" horizonAlign="center" />
|
||||
<column id="t.createTime1" title="分配日期" visible="true" horizonAlign="center" format="dateFormatter" />
|
||||
<column id="t.createTime2" title="分配时间" visible="true" horizonAlign="center" format="dateTiemFormatter" />
|
||||
<column id="statusCode" title="SAP状态回传" visible="true" horizonAlign="center" format="enumFormat" formatParam="TaskStatus"/>
|
||||
<column id="agvStatus" title="agv状态" visible="true" horizonAlign="center" format="enumFormat" formatParam="TaskAGVStatus"/>
|
||||
<column id="popular" title="SAP数据回传" visible="true" horizonAlign="center" format="enumFormat" formatParam="TaskSAPtatus"/>
|
||||
<column id="t.code" title="WMS任务号" width="150" visible="true" horizonAlign="center" />
|
||||
</columns>
|
||||
<buttons>
|
||||
<popup id="setPickedQuantity" title="拣货" enableType="single" invisible="false" containId="true" pageId="setPickedQuantityPage"/>
|
||||
<popup id="new" title="重新指定拣货人" enableType="multi" invisible="false" containId="true" pageId="editWorkersPage"/>
|
||||
<popup id="new123" title="重新打印标签" enableType="multi" invisible="false" containId="true" pageId="editPrintTaskPage"/>
|
||||
|
||||
<commit id="addasn" title="生成入库任务" enableType="multi" invisible="false" confirmMessage="确认生成入库">
|
||||
<!-- <enableExpression><![CDATA[(${pickTicket.status} =='PICK_ALL' || ${pickTicket.status} =='CLOSE' ) ]]></enableExpression> -->
|
||||
<mappings>
|
||||
<mapping id="ids" className="list" />
|
||||
</mappings>
|
||||
<actions>
|
||||
<action managerName="pickTicketManager" methodName="addasnTask"
|
||||
parameter="ids" />
|
||||
</actions>
|
||||
<forwards>
|
||||
<forward name="refreshWindow" newEnabled="true"
|
||||
editEnabled="true" />
|
||||
</forwards>
|
||||
</commit>
|
||||
<commit id="addasn12" title="跳过任务" enableType="multi" invisible="false" confirmMessage="确认跳过?">
|
||||
<enableExpression><![CDATA[(${t.movedQuantityMU} ==0 ) ]]></enableExpression>
|
||||
<mappings>
|
||||
<mapping id="ids" className="list" />
|
||||
</mappings>
|
||||
<actions>
|
||||
<action managerName="queryAppManager" methodName="cancelAllcate"
|
||||
parameter="ids" />
|
||||
</actions>
|
||||
<forwards>
|
||||
<forward name="refreshWindow" newEnabled="true"
|
||||
editEnabled="true" />
|
||||
</forwards>
|
||||
</commit>
|
||||
<commit id="addasn141" title="生成AGV任务" enableType="multi" invisible="false" confirmMessage="确认生成AGV">
|
||||
<enableExpression><![CDATA[(${t.movedQuantityMU} ==0 ) ]]></enableExpression>
|
||||
<mappings>
|
||||
<mapping id="ids" className="list" />
|
||||
</mappings>
|
||||
<actions>
|
||||
<action managerName="pickTicketManager" methodName="addSeedWallTask"
|
||||
parameter="ids" />
|
||||
</actions>
|
||||
<forwards>
|
||||
<forward name="refreshWindow" newEnabled="true"
|
||||
editEnabled="true" />
|
||||
</forwards>
|
||||
</commit>
|
||||
<commit id="JIAODAN" title="交单" enableType="multi" invisible="false" confirmMessage="确认交单">
|
||||
<enableExpression><![CDATA[(${t.movedQuantityMU} >0 ) ]]></enableExpression>
|
||||
<mappings>
|
||||
<mapping id="ids" className="list" />
|
||||
</mappings>
|
||||
<actions>
|
||||
<action managerName="pickTicketManager" methodName="wmsPresentation"
|
||||
parameter="ids" />
|
||||
</actions>
|
||||
<forwards>
|
||||
<forward name="refreshWindow" newEnabled="true"
|
||||
editEnabled="true" />
|
||||
</forwards>
|
||||
</commit>
|
||||
<commit id="kouliao" title="扣料完成" enableType="multi" invisible="false" confirmMessage="确认已经扣料完成!">
|
||||
<enableExpression><![CDATA[(${t.movedQuantityMU} >0 ) ]]></enableExpression>
|
||||
<mappings>
|
||||
<mapping id="ids" className="list" />
|
||||
</mappings>
|
||||
<actions>
|
||||
<action managerName="pickTicketManager" methodName="wmskouliao"
|
||||
parameter="ids" />
|
||||
</actions>
|
||||
<forwards>
|
||||
<forward name="refreshWindow" newEnabled="true"
|
||||
editEnabled="true" />
|
||||
</forwards>
|
||||
</commit>
|
||||
<commit id="kouliao32" title="合单完成" enableType="multi" invisible="false" confirmMessage="确认合单完成!">
|
||||
<enableExpression><![CDATA[(${t.movedQuantityMU} >0 ) ]]></enableExpression>
|
||||
<mappings>
|
||||
<mapping id="ids" className="list" />
|
||||
</mappings>
|
||||
<actions>
|
||||
<action managerName="pickTicketManager" methodName="wmshedan"
|
||||
parameter="ids" />
|
||||
</actions>
|
||||
<forwards>
|
||||
<forward name="refreshWindow" newEnabled="true"
|
||||
editEnabled="true" />
|
||||
</forwards>
|
||||
</commit>
|
||||
<popup id="pickConfirm212" title="其它出库打印A4" enableType="single" invisible="false" containId="true" pageId="editTaskPrintA4Page">
|
||||
</popup>
|
||||
<commit id="addtask" title="获取拣货任务" enableType="multi" invisible="false" confirmMessage="确认生成AGV">
|
||||
<enableExpression><![CDATA[(${t.movedQuantityMU} ==0 ) ]]></enableExpression>
|
||||
<mappings>
|
||||
<mapping id="ids" className="list" />
|
||||
</mappings>
|
||||
<actions>
|
||||
<action managerName="pickTicketManager" methodName="addSeedWallTask"
|
||||
parameter="ids" />
|
||||
</actions>
|
||||
<forwards>
|
||||
<forward name="refreshWindow" newEnabled="true"
|
||||
editEnabled="true" />
|
||||
</forwards>
|
||||
</commit>
|
||||
</buttons>
|
||||
</maintainPage>
|
||||
</pages>
|
||||
|
|
@ -242,7 +242,7 @@
|
|||
left join t.worker3
|
||||
left join t.agvTask agv
|
||||
left join t.dstLP dstLP
|
||||
where 1=1 and t.type in('MV_PICKTICKET') and t.planQuantity>0
|
||||
where 1=1 and t.type ='MV_PICKTICKET' and t.planQuantity>0
|
||||
and ( (t.inventoryStatus not in ('交单完成')) /~ordersAll: or true={ordersAll} ~/)
|
||||
and ( (zone.id not in (1787) or zone.name is null) /~ordersAll: or true={ordersAll} ~/)
|
||||
and ( ((pickTicket.sourceType <>'411' and t.planQuantity<=t.movedQuantityMU) or
|
||||
|
|
|
|||
|
|
@ -24,21 +24,21 @@
|
|||
</property>
|
||||
<property name="url">
|
||||
<!-- <value>jdbc:sqlserver://localhost:1433;DatabaseName=zwtest</value> -->
|
||||
<!-- <value>jdbc:sqlserver://192.168.2.88:1433;DatabaseName=zwlgtest</value> -->
|
||||
<value>jdbc:sqlserver://192.168.2.88:1433;DatabaseName=zwlgtest</value>
|
||||
<!-- 正式环境地址 -->
|
||||
<!-- <value>jdbc:sqlserver://10.1.96.105:1433;DatabaseName=LD_WMSDB</value> -->
|
||||
<value>jdbc:sqlserver://47.103.100.52:1433;DatabaseName=zwlgtest</value>
|
||||
<!-- <value>jdbc:sqlserver://47.103.100.52:1433;DatabaseName=zwlgtest</value> -->
|
||||
</property>
|
||||
<property name="username">
|
||||
<value>WMSDB</value>
|
||||
<!-- <value>sa</value> -->
|
||||
<!-- <value>WMSDB</value> -->
|
||||
<value>sa</value>
|
||||
<!-- <value>wmsdb</value> -->
|
||||
</property>
|
||||
<property name="password">
|
||||
<!-- <value>AmecDDbb32A</value> -->
|
||||
<!-- <value>HPwd12#$</value> -->
|
||||
<!-- <value>Amecadmin1!</value> -->
|
||||
<value>WmsYc@5688</value>
|
||||
<value>Amecadmin1!</value>
|
||||
<!-- <value>WmsYc@5688</value> -->
|
||||
</property>
|
||||
<property name="maxActive">
|
||||
<value>500</value>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ hibernate.dialect=com.dev.swms.server.utils.MSSQLDialect
|
|||
#hibernate.dialect=org.hibernate.dialect.OracleDialect
|
||||
#hibernate.dialect=org.hibernate.dialect.Oracle9Dialect
|
||||
|
||||
hibernate.show_sql=false
|
||||
hibernate.show_sql=true
|
||||
hibernate.format_sql=false
|
||||
hibernate.hbm2ddl.auto=none
|
||||
ldxt.bz=0
|
||||
|
|
|
|||
|
|
@ -394,6 +394,7 @@
|
|||
<display-name>upImageServlet</display-name>
|
||||
<servlet-class>com.dev.swms.server.web.servlet.UpImageServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>zwSap</servlet-name>
|
||||
<display-name>zwSap</display-name>
|
||||
|
|
|
|||
|
|
@ -100,11 +100,11 @@ function lastPage(){
|
|||
<%-- <td>${elt.imageType}</td> --%>
|
||||
<c:if test="${elt.imageType==1 }">
|
||||
<%-- <td>${elt.fileUrl}</td> --%>
|
||||
<td><img src="${elt.fileUrl}" style="height:25%; weight:25%;"></td>
|
||||
<td><img src="${elt.fileUrl}" style="height:600px; weight:250px;"></td>
|
||||
</c:if>
|
||||
<c:if test="${elt.imageType==2 }">
|
||||
<%-- <td>${elt.fileUrl}</td> --%>
|
||||
<td><img src="${elt.fileUrl}" style="height:25%; weight:25%;"></td>
|
||||
<td><img src="${elt.fileUrl}" style="height:600px; weight:250px;"></td>
|
||||
<%-- <td><iframe src="${ctx}/<s:property value='${elt.fileUrl}'/>" width="800" height="638" scroll="no"></iframe></td> --%>
|
||||
</c:if>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/xml; charset=utf-8" />
|
||||
<title>My97DatePicker</title>
|
||||
<script type="text/javascript" src="config.js"></script>
|
||||
<script>
|
||||
if(parent==window)
|
||||
location.href = 'http://www.my97.net';
|
||||
var $d, $dp, $pdp = parent.$dp, $dt, $tdt, $sdt, $IE=$pdp.ie, $FF = $pdp.ff,$OPERA=$pdp.opera, $ny, $cMark = false;
|
||||
if ($pdp.eCont) {
|
||||
$dp = {};
|
||||
for (var p in $pdp) {
|
||||
$dp[p] = $pdp[p];
|
||||
}
|
||||
}
|
||||
else
|
||||
$dp = $pdp;
|
||||
|
||||
$dp.getLangIndex = function(name){
|
||||
var arr = langList;
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (arr[i].name == name) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
$dp.getLang = function(name){
|
||||
var index = $dp.getLangIndex(name);
|
||||
if (index == -1) {
|
||||
index = 0;
|
||||
}
|
||||
return langList[index];
|
||||
}
|
||||
|
||||
$dp.realLang = $dp.getLang($dp.lang);
|
||||
document.write("<script src='lang/" + $dp.realLang.name + ".js' charset='" + $dp.realLang.charset + "'><\/script>");
|
||||
|
||||
for (var i = 0; i < skinList.length; i++) {
|
||||
document.write('<link rel="stylesheet" type="text/css" href="skin/' + skinList[i].name + '/datepicker.css" title="' + skinList[i].name + '" charset="' + skinList[i].charset + '" disabled="true"/>');
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" src="calendar.js"></script>
|
||||
</head>
|
||||
<body leftmargin="0" topmargin="0" onload="$c.autoSize()" tabindex=0>
|
||||
</body>
|
||||
</html>
|
||||
<script>new My97DP();</script>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,12 @@
|
|||
var langList =
|
||||
[
|
||||
{name:'en', charset:'UTF-8'},
|
||||
{name:'zh-cn', charset:'gb2312'},
|
||||
{name:'zh-tw', charset:'GBK'}
|
||||
];
|
||||
|
||||
var skinList =
|
||||
[
|
||||
{name:'default', charset:'gb2312'},
|
||||
{name:'whyGreen', charset:'gb2312'}
|
||||
];
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
var $lang={
|
||||
errAlertMsg: "Invalid date or the date out of range,redo or not?",
|
||||
aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
||||
aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],
|
||||
aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
||||
aLongMonStr: ["January","February","March","April","May","June","July","August","September","October","November","December"],
|
||||
clearStr: "Clear",
|
||||
todayStr: "Today",
|
||||
okStr: "OK",
|
||||
updateStr: "OK",
|
||||
timeStr: "Time",
|
||||
quickStr: "Quick Selection",
|
||||
err_1: 'MinDate Cannot be bigger than MaxDate!'
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
var $lang={
|
||||
errAlertMsg: "不合法的日期格式或者日期超出限定范围,需要撤销吗?",
|
||||
aWeekStr: ["周","日","一","二","三","四","五","六"],
|
||||
aLongWeekStr:["周","星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
|
||||
aMonStr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一","十二"],
|
||||
aLongMonStr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],
|
||||
clearStr: "清空",
|
||||
todayStr: "今天",
|
||||
okStr: "确定",
|
||||
updateStr: "确定",
|
||||
timeStr: "时间",
|
||||
quickStr: "快速选择",
|
||||
err_1: '最小日期不能大于最大日期!'
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
var $lang={
|
||||
errAlertMsg: "不合法的日期格式或者日期超出限定範圍,需要撤銷嗎?",
|
||||
aWeekStr: ["周","日","一","二","三","四","五","六"],
|
||||
aLongWeekStr:["周","星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
|
||||
aMonStr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一","十二"],
|
||||
aLongMonStr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],
|
||||
clearStr: "清空",
|
||||
todayStr: "今天",
|
||||
okStr: "確定",
|
||||
updateStr: "確定",
|
||||
timeStr: "時間",
|
||||
quickStr: "快速選擇",
|
||||
err_1: '最小日期不能大於最大日期!'
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
.Wdate{
|
||||
border:#999 1px solid;
|
||||
height:20px;
|
||||
background:#fff url(datePicker.gif) no-repeat right;
|
||||
}
|
||||
|
||||
.WdateFmtErr{
|
||||
font-weight:bold;
|
||||
color:red;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
|
|
@ -0,0 +1,267 @@
|
|||
/*
|
||||
* My97 DatePicker 4.7
|
||||
* 皮肤名称:default
|
||||
*/
|
||||
|
||||
/* 日期选择容器 DIV */
|
||||
.WdateDiv{
|
||||
width:180px;
|
||||
background-color:#FFFFFF;
|
||||
border:#bbb 1px solid;
|
||||
padding:2px;
|
||||
}
|
||||
/* 双月日历的宽度 */
|
||||
.WdateDiv2{
|
||||
width:360px;
|
||||
}
|
||||
.WdateDiv *{font-size:9pt;}
|
||||
|
||||
/****************************
|
||||
* 导航图标 全部是A标签
|
||||
***************************/
|
||||
.WdateDiv .NavImg a{
|
||||
display:block;
|
||||
cursor:pointer;
|
||||
height:16px;
|
||||
width:16px;
|
||||
}
|
||||
|
||||
.WdateDiv .NavImgll a{
|
||||
float:left;
|
||||
background:transparent url(img.gif) no-repeat scroll 0 0;
|
||||
}
|
||||
.WdateDiv .NavImgl a{
|
||||
float:left;
|
||||
background:transparent url(img.gif) no-repeat scroll -16px 0;
|
||||
}
|
||||
.WdateDiv .NavImgr a{
|
||||
float:right;
|
||||
background:transparent url(img.gif) no-repeat scroll -32px 0;
|
||||
}
|
||||
.WdateDiv .NavImgrr a{
|
||||
float:right;
|
||||
background:transparent url(img.gif) no-repeat scroll -48px 0;
|
||||
}
|
||||
|
||||
/****************************
|
||||
* 年份月份相关
|
||||
***************************/
|
||||
/* 年份月份栏 DIV */
|
||||
.WdateDiv #dpTitle{
|
||||
height:24px;
|
||||
margin-bottom:2px;
|
||||
padding:1px;
|
||||
}
|
||||
/* 年份月份输入框 INPUT */
|
||||
.WdateDiv .yminput{
|
||||
margin-top:2px;
|
||||
text-align:center;
|
||||
height:20px;
|
||||
border:0px;
|
||||
width:50px;
|
||||
cursor:pointer;
|
||||
}
|
||||
/* 年份月份输入框获得焦点时的样式 INPUT */
|
||||
.WdateDiv .yminputfocus{
|
||||
margin-top:2px;
|
||||
text-align:center;
|
||||
font-weight:bold;
|
||||
height:20px;
|
||||
color:blue;
|
||||
border:#ccc 1px solid;
|
||||
width:50px;
|
||||
}
|
||||
/* 菜单选择框 DIV */
|
||||
.WdateDiv .menuSel{
|
||||
z-index:1;
|
||||
position:absolute;
|
||||
background-color:#FFFFFF;
|
||||
border:#ccc 1px solid;
|
||||
display:none;
|
||||
}
|
||||
/* 菜单的样式 TD */
|
||||
.WdateDiv .menu{
|
||||
cursor:pointer;
|
||||
background-color:#fff;
|
||||
}
|
||||
/* 菜单的mouseover样式 TD */
|
||||
.WdateDiv .menuOn{
|
||||
cursor:pointer;
|
||||
background-color:#BEEBEE;
|
||||
}
|
||||
/* 菜单无效时的样式 TD */
|
||||
.WdateDiv .invalidMenu{
|
||||
color:#aaa;
|
||||
}
|
||||
/* 年选择框的偏移 DIV */
|
||||
.WdateDiv .YMenu{
|
||||
margin-top:20px;
|
||||
|
||||
}
|
||||
/* 月选择框的偏移 DIV */
|
||||
.WdateDiv .MMenu{
|
||||
margin-top:20px;
|
||||
*width:62px;
|
||||
}
|
||||
/* 时选择框的位置 DIV */
|
||||
.WdateDiv .hhMenu{
|
||||
margin-top:-90px;
|
||||
margin-left:26px;
|
||||
}
|
||||
/* 分选择框的位置 DIV */
|
||||
.WdateDiv .mmMenu{
|
||||
margin-top:-46px;
|
||||
margin-left:26px;
|
||||
}
|
||||
/* 秒选择框的位置 DIV */
|
||||
.WdateDiv .ssMenu{
|
||||
margin-top:-24px;
|
||||
margin-left:26px;
|
||||
}
|
||||
|
||||
/****************************
|
||||
* 周相关
|
||||
***************************/
|
||||
.WdateDiv .Wweek {
|
||||
text-align:center;
|
||||
background:#DAF3F5;
|
||||
border-right:#BDEBEE 1px solid;
|
||||
}
|
||||
/****************************
|
||||
* 星期,日期相关
|
||||
***************************/
|
||||
/* 星期栏 TR */
|
||||
.WdateDiv .MTitle{
|
||||
background-color:#BDEBEE;
|
||||
}
|
||||
.WdateDiv .WdayTable2{
|
||||
border-collapse:collapse;
|
||||
border:#c5d9e8 1px solid;
|
||||
}
|
||||
.WdateDiv .WdayTable2 table{
|
||||
border:0;
|
||||
}
|
||||
/* 日期栏表格 TABLE */
|
||||
.WdateDiv .WdayTable{
|
||||
line-height:20px;
|
||||
border:#c5d9e8 1px solid;
|
||||
}
|
||||
.WdateDiv .WdayTable td{
|
||||
text-align:center;
|
||||
}
|
||||
/* 日期格的样式 TD */
|
||||
.WdateDiv .Wday{
|
||||
cursor:pointer;
|
||||
}
|
||||
/* 日期格的mouseover样式 TD */
|
||||
.WdateDiv .WdayOn{
|
||||
cursor:pointer;
|
||||
background-color:#C0EBEF;
|
||||
}
|
||||
/* 周末日期格的样式 TD */
|
||||
.WdateDiv .Wwday{
|
||||
cursor:pointer;
|
||||
color:#FF2F2F;
|
||||
}
|
||||
/* 周末日期格的mouseover样式 TD */
|
||||
.WdateDiv .WwdayOn{
|
||||
cursor:pointer;
|
||||
color:#000;
|
||||
background-color:#C0EBEF;
|
||||
}
|
||||
.WdateDiv .Wtoday{
|
||||
cursor:pointer;
|
||||
color:blue;
|
||||
}
|
||||
.WdateDiv .Wselday{
|
||||
background-color:#A9E4E9;
|
||||
}
|
||||
.WdateDiv .WspecialDay{
|
||||
background-color:#66F4DF;
|
||||
}
|
||||
/* 其他月份的日期 */
|
||||
.WdateDiv .WotherDay{
|
||||
cursor:pointer;
|
||||
color:#6A6AFF;
|
||||
}
|
||||
/* 其他月份的日期mouseover样式 */
|
||||
.WdateDiv .WotherDayOn{
|
||||
cursor:pointer;
|
||||
background-color:#C0EBEF;
|
||||
}
|
||||
/* 无效日期的样式,即在日期范围以外日期格的样式,不能选择的日期 */
|
||||
.WdateDiv .WinvalidDay{
|
||||
color:#aaa;
|
||||
}
|
||||
|
||||
/****************************
|
||||
* 时间相关
|
||||
***************************/
|
||||
/* 时间栏 DIV */
|
||||
.WdateDiv #dpTime{
|
||||
float:left;
|
||||
margin-top:3px;
|
||||
margin-right:30px;
|
||||
}
|
||||
/* 时间文字 SPAN */
|
||||
.WdateDiv #dpTime #dpTimeStr{
|
||||
margin-left:1px;
|
||||
}
|
||||
/* 时间输入框 INPUT */
|
||||
.WdateDiv #dpTime input{
|
||||
width:18px;
|
||||
height:20px;
|
||||
text-align:center;
|
||||
border:#ccc 1px solid;
|
||||
}
|
||||
/* 时间 时 INPUT */
|
||||
.WdateDiv #dpTime .tB{
|
||||
border-right:0px;
|
||||
}
|
||||
/* 时间 分和间隔符 ':' INPUT */
|
||||
.WdateDiv #dpTime .tE{
|
||||
border-left:0;
|
||||
border-right:0;
|
||||
}
|
||||
/* 时间 秒 INPUT */
|
||||
.WdateDiv #dpTime .tm{
|
||||
width:7px;
|
||||
border-left:0;
|
||||
border-right:0;
|
||||
}
|
||||
/* 时间右边的向上按钮 BUTTON */
|
||||
.WdateDiv #dpTime #dpTimeUp{
|
||||
height:10px;
|
||||
width:13px;
|
||||
border:0px;
|
||||
background:url(img.gif) no-repeat -32px -16px;
|
||||
}
|
||||
/* 时间右边的向下按钮 BUTTON */
|
||||
.WdateDiv #dpTime #dpTimeDown{
|
||||
height:10px;
|
||||
width:13px;
|
||||
border:0px;
|
||||
background:url(img.gif) no-repeat -48px -16px;
|
||||
}
|
||||
/****************************
|
||||
* 其他
|
||||
***************************/
|
||||
.WdateDiv #dpQS {
|
||||
float:left;
|
||||
margin-right:3px;
|
||||
margin-top:3px;
|
||||
background:url(img.gif) no-repeat 0px -16px;
|
||||
width:20px;
|
||||
height:20px;
|
||||
cursor:pointer;
|
||||
}
|
||||
.WdateDiv #dpControl {
|
||||
text-align:right;
|
||||
}
|
||||
.WdateDiv .dpButton{
|
||||
height:20px;
|
||||
width:45px;
|
||||
border:#ccc 1px solid;
|
||||
margin-top:2px;
|
||||
margin-right:1px;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 307 B |
|
|
@ -0,0 +1,275 @@
|
|||
/*
|
||||
* My97 DatePicker 4.7
|
||||
* 皮肤名称:whyGreen
|
||||
*/
|
||||
|
||||
/* 日期选择容器 DIV */
|
||||
.WdateDiv{
|
||||
width:180px;
|
||||
background-color:#fff;
|
||||
border:#C5E1E4 1px solid;
|
||||
padding:2px;
|
||||
}
|
||||
/* 双月日历的宽度 */
|
||||
.WdateDiv2{
|
||||
width:360px;
|
||||
}
|
||||
.WdateDiv *{font-size:9pt;}
|
||||
|
||||
/****************************
|
||||
* 导航图标 全部是A标签
|
||||
***************************/
|
||||
.WdateDiv .NavImg a{
|
||||
cursor:pointer;
|
||||
display:block;
|
||||
width:16px;
|
||||
height:16px;
|
||||
margin-top:1px;
|
||||
}
|
||||
|
||||
.WdateDiv .NavImgll a{
|
||||
float:left;
|
||||
background:url(img.gif) no-repeat;
|
||||
}
|
||||
.WdateDiv .NavImgl a{
|
||||
float:left;
|
||||
background:url(img.gif) no-repeat -16px 0px;
|
||||
}
|
||||
.WdateDiv .NavImgr a{
|
||||
float:right;
|
||||
background:url(img.gif) no-repeat -32px 0px;
|
||||
}
|
||||
.WdateDiv .NavImgrr a{
|
||||
float:right;
|
||||
background:url(img.gif) no-repeat -48px 0px;
|
||||
}
|
||||
/****************************
|
||||
* 年份月份相关
|
||||
***************************/
|
||||
/* 年份月份栏 DIV */
|
||||
.WdateDiv #dpTitle{
|
||||
height:24px;
|
||||
padding:1px;
|
||||
border:#c5d9e8 1px solid;
|
||||
background:url(bg.jpg);
|
||||
margin-bottom:2px;
|
||||
}
|
||||
/* 年份月份输入框 INPUT */
|
||||
.WdateDiv .yminput{
|
||||
margin-top:2px;
|
||||
text-align:center;
|
||||
border:0px;
|
||||
height:20px;
|
||||
width:50px;
|
||||
color:#034c50;
|
||||
background-color:transparent;
|
||||
cursor:pointer;
|
||||
}
|
||||
/* 年份月份输入框获得焦点时的样式 INPUT */
|
||||
.WdateDiv .yminputfocus{
|
||||
margin-top:2px;
|
||||
text-align:center;
|
||||
border:#939393 1px solid;
|
||||
font-weight:bold;
|
||||
color:#034c50;
|
||||
height:20px;
|
||||
width:50px;
|
||||
}
|
||||
/* 菜单选择框 DIV */
|
||||
.WdateDiv .menuSel{
|
||||
z-index:1;
|
||||
position:absolute;
|
||||
background-color:#FFFFFF;
|
||||
border:#A3C6C8 1px solid;
|
||||
display:none;
|
||||
}
|
||||
/* 菜单的样式 TD */
|
||||
.WdateDiv .menu{
|
||||
cursor:pointer;
|
||||
background-color:#fff;
|
||||
color:#11777C;
|
||||
}
|
||||
/* 菜单的mouseover样式 TD */
|
||||
.WdateDiv .menuOn{
|
||||
cursor:pointer;
|
||||
background-color:#BEEBEE;
|
||||
}
|
||||
/* 菜单无效时的样式 TD */
|
||||
.WdateDiv .invalidMenu{
|
||||
color:#aaa;
|
||||
}
|
||||
/* 年选择框的偏移 DIV */
|
||||
.WdateDiv .YMenu{
|
||||
margin-top:20px;
|
||||
}
|
||||
/* 月选择框的偏移 DIV */
|
||||
.WdateDiv .MMenu{
|
||||
margin-top:20px;
|
||||
*width:62px;
|
||||
}
|
||||
/* 时选择框的位置 DIV */
|
||||
.WdateDiv .hhMenu{
|
||||
margin-top:-90px;
|
||||
margin-left:26px;
|
||||
}
|
||||
/* 分选择框的位置 DIV */
|
||||
.WdateDiv .mmMenu{
|
||||
margin-top:-46px;
|
||||
margin-left:26px;
|
||||
}
|
||||
/* 秒选择框的位置 DIV */
|
||||
.WdateDiv .ssMenu{
|
||||
margin-top:-24px;
|
||||
margin-left:26px;
|
||||
}
|
||||
|
||||
/****************************
|
||||
* 周相关
|
||||
***************************/
|
||||
.WdateDiv .Wweek {
|
||||
text-align:center;
|
||||
background:#DAF3F5;
|
||||
border-right:#BDEBEE 1px solid;
|
||||
}
|
||||
/****************************
|
||||
* 星期,日期相关
|
||||
***************************/
|
||||
/* 星期栏 TR */
|
||||
.WdateDiv .MTitle{
|
||||
color:#13777e;
|
||||
background-color:#bdebee;
|
||||
}
|
||||
.WdateDiv .WdayTable2{
|
||||
border-collapse:collapse;
|
||||
border:#BEE9F0 1px solid;
|
||||
}
|
||||
.WdateDiv .WdayTable2 table{
|
||||
border:0;
|
||||
}
|
||||
/* 日期栏表格 TABLE */
|
||||
.WdateDiv .WdayTable{
|
||||
line-height:20px;
|
||||
color:#13777e;
|
||||
background-color:#edfbfb;
|
||||
border:#BEE9F0 1px solid;
|
||||
}
|
||||
.WdateDiv .WdayTable td{
|
||||
text-align:center;
|
||||
}
|
||||
/* 日期格的样式 TD */
|
||||
.WdateDiv .Wday{
|
||||
cursor:pointer;
|
||||
}
|
||||
/* 日期格的mouseover样式 TD */
|
||||
.WdateDiv .WdayOn{
|
||||
cursor:pointer;
|
||||
background-color:#74d2d9 ;
|
||||
}
|
||||
/* 周末日期格的样式 TD */
|
||||
.WdateDiv .Wwday{
|
||||
cursor:pointer;
|
||||
color:#ab1e1e;
|
||||
}
|
||||
/* 周末日期格的mouseover样式 TD */
|
||||
.WdateDiv .WwdayOn{
|
||||
cursor:pointer;
|
||||
background-color:#74d2d9;
|
||||
}
|
||||
.WdateDiv .Wtoday{
|
||||
cursor:pointer;
|
||||
color:blue;
|
||||
}
|
||||
.WdateDiv .Wselday{
|
||||
background-color:#A7E2E7;
|
||||
}
|
||||
.WdateDiv .WspecialDay{
|
||||
background-color:#66F4DF;
|
||||
}
|
||||
/* 其他月份的日期 */
|
||||
.WdateDiv .WotherDay{
|
||||
cursor:pointer;
|
||||
color:#0099CC;
|
||||
}
|
||||
/* 其他月份的日期mouseover样式 */
|
||||
.WdateDiv .WotherDayOn{
|
||||
cursor:pointer;
|
||||
background-color:#C0EBEF;
|
||||
}
|
||||
/* 无效日期的样式,即在日期范围以外日期格的样式,不能选择的日期 */
|
||||
.WdateDiv .WinvalidDay{
|
||||
color:#aaa;
|
||||
}
|
||||
|
||||
/****************************
|
||||
* 时间相关
|
||||
***************************/
|
||||
/* 时间栏 DIV */
|
||||
.WdateDiv #dpTime{
|
||||
|
||||
}
|
||||
/* 时间文字 SPAN */
|
||||
.WdateDiv #dpTime #dpTimeStr{
|
||||
margin-left:1px;
|
||||
color:#497F7F;
|
||||
}
|
||||
/* 时间输入框 INPUT */
|
||||
.WdateDiv #dpTime input{
|
||||
height:20px;
|
||||
width:18px;
|
||||
text-align:center;
|
||||
color:#333;
|
||||
border:#61CAD0 1px solid;
|
||||
}
|
||||
/* 时间 时 INPUT */
|
||||
.WdateDiv #dpTime .tB{
|
||||
border-right:0px;
|
||||
}
|
||||
/* 时间 分和间隔符 ':' INPUT */
|
||||
.WdateDiv #dpTime .tE{
|
||||
border-left:0;
|
||||
border-right:0;
|
||||
}
|
||||
/* 时间 秒 INPUT */
|
||||
.WdateDiv #dpTime .tm{
|
||||
width:7px;
|
||||
border-left:0;
|
||||
border-right:0;
|
||||
}
|
||||
/* 时间右边的向上按钮 BUTTON */
|
||||
.WdateDiv #dpTime #dpTimeUp{
|
||||
height:10px;
|
||||
width:13px;
|
||||
border:0px;
|
||||
background:url(img.gif) no-repeat -32px -16px;
|
||||
}
|
||||
/* 时间右边的向下按钮 BUTTON */
|
||||
.WdateDiv #dpTime #dpTimeDown{
|
||||
height:10px;
|
||||
width:13px;
|
||||
border:0px;
|
||||
background:url(img.gif) no-repeat -48px -16px;
|
||||
}
|
||||
/****************************
|
||||
* 其他
|
||||
***************************/
|
||||
.WdateDiv #dpQS {
|
||||
float:left;
|
||||
margin-right:3px;
|
||||
margin-top:3px;
|
||||
background:url(img.gif) no-repeat 0px -16px;
|
||||
width:20px;
|
||||
height:20px;
|
||||
cursor:pointer;
|
||||
}
|
||||
.WdateDiv #dpControl {
|
||||
text-align:right;
|
||||
margin-top:3px;
|
||||
}
|
||||
.WdateDiv .dpButton{
|
||||
height:20px;
|
||||
width:45px;
|
||||
margin-top:2px;
|
||||
border:#38B1B9 1px solid;
|
||||
background-color:#CFEBEE;
|
||||
color:#08575B;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,511 @@
|
|||
/*
|
||||
* jQuery Media Plugin for converting elements into rich media content.
|
||||
*
|
||||
* Examples and documentation at: http://malsup.com/jquery/media/
|
||||
* Copyright (c) 2007-2010 M. Alsup
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
* @author: M. Alsup
|
||||
* @version: 0.99 (05-JUN-2013)
|
||||
* @requires jQuery v1.1.2 or later
|
||||
* $Id: jquery.media.js 2460 2007-07-23 02:53:15Z malsup $
|
||||
*
|
||||
* Supported Media Players:
|
||||
* - Flash
|
||||
* - Quicktime
|
||||
* - Real Player
|
||||
* - Silverlight
|
||||
* - Windows Media Player
|
||||
* - iframe
|
||||
*
|
||||
* Supported Media Formats:
|
||||
* Any types supported by the above players, such as:
|
||||
* Video: asf, avi, flv, mov, mpg, mpeg, mp4, qt, smil, swf, wmv, 3g2, 3gp
|
||||
* Audio: aif, aac, au, gsm, mid, midi, mov, mp3, m4a, snd, rm, wav, wma
|
||||
* Other: bmp, html, pdf, psd, qif, qtif, qti, tif, tiff, xaml
|
||||
*
|
||||
* Thanks to Mark Hicken and Brent Pedersen for helping me debug this on the Mac!
|
||||
* Thanks to Dan Rossi for numerous bug reports and code bits!
|
||||
* Thanks to Skye Giordano for several great suggestions!
|
||||
* Thanks to Richard Connamacher for excellent improvements to the non-IE behavior!
|
||||
*/
|
||||
/*global SWFObject alert Sys */
|
||||
/*jshint forin:false */
|
||||
;(function($) {
|
||||
"use strict";
|
||||
|
||||
var mode = document.documentMode || 0;
|
||||
var msie = /MSIE/.test(navigator.userAgent);
|
||||
var lameIE = msie && (/MSIE (6|7|8)\.0/.test(navigator.userAgent) || mode < 9);
|
||||
|
||||
/**
|
||||
* Chainable method for converting elements into rich media.
|
||||
*
|
||||
* @param options
|
||||
* @param callback fn invoked for each matched element before conversion
|
||||
* @param callback fn invoked for each matched element after conversion
|
||||
*/
|
||||
$.fn.media = function(options, f1, f2) {
|
||||
if (options == 'undo') {
|
||||
return this.each(function() {
|
||||
var $this = $(this);
|
||||
var html = $this.data('media.origHTML');
|
||||
if (html)
|
||||
$this.replaceWith(html);
|
||||
});
|
||||
}
|
||||
|
||||
return this.each(function() {
|
||||
if (typeof options == 'function') {
|
||||
f2 = f1;
|
||||
f1 = options;
|
||||
options = {};
|
||||
}
|
||||
var o = getSettings(this, options);
|
||||
// pre-conversion callback, passes original element and fully populated options
|
||||
if (typeof f1 == 'function') f1(this, o);
|
||||
|
||||
var r = getTypesRegExp();
|
||||
var m = r.exec(o.src.toLowerCase()) || [''];
|
||||
var fn;
|
||||
|
||||
if (o.type)
|
||||
m[0] = o.type;
|
||||
else
|
||||
m.shift();
|
||||
|
||||
for (var i=0; i < m.length; i++) {
|
||||
fn = m[i].toLowerCase();
|
||||
if (isDigit(fn[0])) fn = 'fn' + fn; // fns can't begin with numbers
|
||||
if (!$.fn.media[fn])
|
||||
continue; // unrecognized media type
|
||||
// normalize autoplay settings
|
||||
var player = $.fn.media[fn+'_player'];
|
||||
if (!o.params) o.params = {};
|
||||
if (player) {
|
||||
var num = player.autoplayAttr == 'autostart';
|
||||
o.params[player.autoplayAttr || 'autoplay'] = num ? (o.autoplay ? 1 : 0) : o.autoplay ? true : false;
|
||||
}
|
||||
var $div = $.fn.media[fn](this, o);
|
||||
|
||||
$div.css('backgroundColor', o.bgColor).width(o.width);
|
||||
|
||||
if (o.canUndo) {
|
||||
var $temp = $('<div></div>').append(this);
|
||||
$div.data('media.origHTML', $temp.html()); // store original markup
|
||||
}
|
||||
|
||||
// post-conversion callback, passes original element, new div element and fully populated options
|
||||
if (typeof f2 == 'function') f2(this, $div[0], o, player.name);
|
||||
break;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Non-chainable method for adding or changing file format / player mapping
|
||||
* @name mapFormat
|
||||
* @param String format File format extension (ie: mov, wav, mp3)
|
||||
* @param String player Player name to use for the format (one of: flash, quicktime, realplayer, winmedia, silverlight or iframe
|
||||
*/
|
||||
$.fn.media.mapFormat = function(format, player) {
|
||||
if (!format || !player || !$.fn.media.defaults.players[player]) return; // invalid
|
||||
format = format.toLowerCase();
|
||||
if (isDigit(format[0])) format = 'fn' + format;
|
||||
$.fn.media[format] = $.fn.media[player];
|
||||
$.fn.media[format+'_player'] = $.fn.media.defaults.players[player];
|
||||
};
|
||||
|
||||
// global defautls; override as needed
|
||||
$.fn.media.defaults = {
|
||||
standards: true, // use object tags only (no embeds for non-IE browsers)
|
||||
canUndo: true, // tells plugin to store the original markup so it can be reverted via: $(sel).mediaUndo()
|
||||
width: 400,
|
||||
height: 400,
|
||||
autoplay: 0, // normalized cross-player setting
|
||||
bgColor: '#ffffff', // background color
|
||||
params: { wmode: 'transparent'}, // added to object element as param elements; added to embed element as attrs
|
||||
attrs: {}, // added to object and embed elements as attrs
|
||||
flvKeyName: 'file', // key used for object src param (thanks to Andrea Ercolino)
|
||||
flashvars: {}, // added to flash content as flashvars param/attr
|
||||
flashVersion: '7', // required flash version
|
||||
expressInstaller: null, // src for express installer
|
||||
|
||||
// default flash video and mp3 player (@see: http://jeroenwijering.com/?item=Flash_Media_Player)
|
||||
flvPlayer: 'mediaplayer.swf',
|
||||
mp3Player: 'mediaplayer.swf',
|
||||
|
||||
// @see http://msdn2.microsoft.com/en-us/library/bb412401.aspx
|
||||
silverlight: {
|
||||
inplaceInstallPrompt: 'true', // display in-place install prompt?
|
||||
isWindowless: 'true', // windowless mode (false for wrapping markup)
|
||||
framerate: '24', // maximum framerate
|
||||
version: '0.9', // Silverlight version
|
||||
onError: null, // onError callback
|
||||
onLoad: null, // onLoad callback
|
||||
initParams: null, // object init params
|
||||
userContext: null // callback arg passed to the load callback
|
||||
}
|
||||
};
|
||||
|
||||
// Media Players; think twice before overriding
|
||||
$.fn.media.defaults.players = {
|
||||
flash: {
|
||||
name: 'flash',
|
||||
title: 'Flash',
|
||||
types: 'flv,mp3,swf',
|
||||
mimetype: 'application/x-shockwave-flash',
|
||||
pluginspage: 'http://www.adobe.com/go/getflashplayer',
|
||||
ieAttrs: {
|
||||
classid: 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',
|
||||
type: 'application/x-oleobject',
|
||||
codebase: 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + $.fn.media.defaults.flashVersion
|
||||
}
|
||||
},
|
||||
quicktime: {
|
||||
name: 'quicktime',
|
||||
title: 'QuickTime',
|
||||
mimetype: 'video/quicktime',
|
||||
pluginspage: 'http://www.apple.com/quicktime/download/',
|
||||
types: 'aif,aiff,aac,au,bmp,gsm,mov,mid,midi,mpg,mpeg,mp4,m4a,psd,qt,qtif,qif,qti,snd,tif,tiff,wav,3g2,3gp',
|
||||
ieAttrs: {
|
||||
classid: 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
|
||||
codebase: 'http://www.apple.com/qtactivex/qtplugin.cab'
|
||||
}
|
||||
},
|
||||
realplayer: {
|
||||
name: 'real',
|
||||
title: 'RealPlayer',
|
||||
types: 'ra,ram,rm,rpm,rv,smi,smil',
|
||||
mimetype: 'audio/x-pn-realaudio-plugin',
|
||||
pluginspage: 'http://www.real.com/player/',
|
||||
autoplayAttr: 'autostart',
|
||||
ieAttrs: {
|
||||
classid: 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'
|
||||
}
|
||||
},
|
||||
winmedia: {
|
||||
name: 'winmedia',
|
||||
title: 'Windows Media',
|
||||
types: 'asx,asf,avi,wma,wmv',
|
||||
mimetype: isFirefoxWMPPluginInstalled() ? 'application/x-ms-wmp' : 'application/x-mplayer2',
|
||||
pluginspage: 'http://www.microsoft.com/Windows/MediaPlayer/',
|
||||
autoplayAttr: 'autostart',
|
||||
oUrl: 'url',
|
||||
ieAttrs: {
|
||||
classid: 'clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6',
|
||||
type: 'application/x-oleobject'
|
||||
}
|
||||
},
|
||||
// special cases
|
||||
img: {
|
||||
name: 'img',
|
||||
title: 'Image',
|
||||
types: 'gif,png,jpg'
|
||||
},
|
||||
iframe: {
|
||||
name: 'iframe',
|
||||
types: 'html,pdf'
|
||||
},
|
||||
silverlight: {
|
||||
name: 'silverlight',
|
||||
types: 'xaml'
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// everything below here is private
|
||||
//
|
||||
|
||||
|
||||
// detection script for FF WMP plugin (http://www.therossman.org/experiments/wmp_play.html)
|
||||
// (hat tip to Mark Ross for this script)
|
||||
function isFirefoxWMPPluginInstalled() {
|
||||
var plugs = navigator.plugins || [];
|
||||
for (var i = 0; i < plugs.length; i++) {
|
||||
var plugin = plugs[i];
|
||||
if (plugin['filename'] == 'np-mswmp.dll')
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
var counter = 1;
|
||||
|
||||
for (var player in $.fn.media.defaults.players) {
|
||||
var types = $.fn.media.defaults.players[player].types;
|
||||
$.each(types.split(','), function(i,o) {
|
||||
if (isDigit(o[0])) o = 'fn' + o;
|
||||
$.fn.media[o] = $.fn.media[player] = getGenerator(player);
|
||||
$.fn.media[o+'_player'] = $.fn.media.defaults.players[player];
|
||||
});
|
||||
}
|
||||
|
||||
function getTypesRegExp() {
|
||||
var types = '';
|
||||
for (var player in $.fn.media.defaults.players) {
|
||||
if (types.length) types += ',';
|
||||
types += $.fn.media.defaults.players[player].types;
|
||||
}
|
||||
return new RegExp('\\.(' + types.replace(/,/ig,'|') + ')\\b');
|
||||
}
|
||||
|
||||
function getGenerator(player) {
|
||||
return function(el, options) {
|
||||
return generate(el, options, player);
|
||||
};
|
||||
}
|
||||
|
||||
function isDigit(c) {
|
||||
return '0123456789'.indexOf(c) > -1;
|
||||
}
|
||||
|
||||
// flatten all possible options: global defaults, meta, option obj
|
||||
function getSettings(el, options) {
|
||||
options = options || {};
|
||||
var a, n;
|
||||
var $el = $(el);
|
||||
var cls = el.className || '';
|
||||
// support metadata plugin (v1.0 and v2.0)
|
||||
var meta = $.metadata ? $el.metadata() : $.meta ? $el.data() : {};
|
||||
meta = meta || {};
|
||||
var w = meta.width || parseInt(((cls.match(/\bw:(\d+)/)||[])[1]||0),10) || parseInt(((cls.match(/\bwidth:(\d+)/)||[])[1]||0),10);
|
||||
var h = meta.height || parseInt(((cls.match(/\bh:(\d+)/)||[])[1]||0),10) || parseInt(((cls.match(/\bheight:(\d+)/)||[])[1]||0),10);
|
||||
|
||||
if (w) meta.width = w;
|
||||
if (h) meta.height = h;
|
||||
if (cls) meta.cls = cls;
|
||||
|
||||
// crank html5 style data attributes
|
||||
var dataName = 'data-';
|
||||
for (var i=0; i < el.attributes.length; i++) {
|
||||
a = el.attributes[i], n = $.trim(a.name);
|
||||
var index = n.indexOf(dataName);
|
||||
if (index === 0) {
|
||||
n = n.substring(dataName.length);
|
||||
meta[n] = a.value;
|
||||
}
|
||||
}
|
||||
|
||||
a = $.fn.media.defaults;
|
||||
var b = options;
|
||||
var c = meta;
|
||||
|
||||
var p = { params: { bgColor: options.bgColor || $.fn.media.defaults.bgColor } };
|
||||
var opts = $.extend({}, a, b, c);
|
||||
$.each(['attrs','params','flashvars','silverlight'], function(i,o) {
|
||||
opts[o] = $.extend({}, p[o] || {}, a[o] || {}, b[o] || {}, c[o] || {});
|
||||
});
|
||||
|
||||
if (typeof opts.caption == 'undefined') opts.caption = $el.text();
|
||||
|
||||
// make sure we have a source!
|
||||
opts.src = opts.src || $el.attr('href') || $el.attr('src') || 'unknown';
|
||||
return opts;
|
||||
}
|
||||
|
||||
//
|
||||
// Flash Player
|
||||
//
|
||||
|
||||
// generate flash using SWFObject library if possible
|
||||
$.fn.media.swf = function(el, opts) {
|
||||
var f, p;
|
||||
if (!window.SWFObject && !window.swfobject) {
|
||||
// roll our own
|
||||
if (opts.flashvars) {
|
||||
var a = [];
|
||||
for (f in opts.flashvars)
|
||||
a.push(f + '=' + opts.flashvars[f]);
|
||||
if (!opts.params) opts.params = {};
|
||||
opts.params.flashvars = a.join('&');
|
||||
}
|
||||
return generate(el, opts, 'flash');
|
||||
}
|
||||
|
||||
var id = el.id ? (' id="'+el.id+'"') : '';
|
||||
var cls = opts.cls ? (' class="' + opts.cls + '"') : '';
|
||||
var $div = $('<div' + id + cls + '>');
|
||||
|
||||
// swfobject v2+
|
||||
if (window.swfobject) {
|
||||
$(el).after($div).appendTo($div);
|
||||
if (!el.id) el.id = 'movie_player_' + counter++;
|
||||
|
||||
// replace el with swfobject content
|
||||
window.swfobject.embedSWF(opts.src, el.id, opts.width, opts.height, opts.flashVersion,
|
||||
opts.expressInstaller, opts.flashvars, opts.params, opts.attrs);
|
||||
}
|
||||
// swfobject < v2
|
||||
else {
|
||||
$(el).after($div).remove();
|
||||
var so = new SWFObject(opts.src, 'movie_player_' + counter++, opts.width, opts.height, opts.flashVersion, opts.bgColor);
|
||||
if (opts.expressInstaller) so.useExpressInstall(opts.expressInstaller);
|
||||
|
||||
for (p in opts.params)
|
||||
if (p != 'bgColor') so.addParam(p, opts.params[p]);
|
||||
for (f in opts.flashvars)
|
||||
so.addVariable(f, opts.flashvars[f]);
|
||||
so.write($div[0]);
|
||||
}
|
||||
|
||||
if (opts.caption) $('<div>').appendTo($div).html(opts.caption);
|
||||
return $div;
|
||||
};
|
||||
|
||||
// map flv and mp3 files to the swf player by default
|
||||
$.fn.media.flv = $.fn.media.mp3 = function(el, opts) {
|
||||
var src = opts.src;
|
||||
var player = /\.mp3\b/i.test(src) ? opts.mp3Player : opts.flvPlayer;
|
||||
var key = opts.flvKeyName;
|
||||
src = encodeURIComponent(src);
|
||||
opts.src = player;
|
||||
opts.src = opts.src + '?'+key+'=' + (src);
|
||||
var srcObj = {};
|
||||
srcObj[key] = src;
|
||||
opts.flashvars = $.extend({}, srcObj, opts.flashvars );
|
||||
return $.fn.media.swf(el, opts);
|
||||
};
|
||||
|
||||
//
|
||||
// Silverlight
|
||||
//
|
||||
$.fn.media.xaml = function(el, opts) {
|
||||
if (!window.Sys || !window.Sys.Silverlight) {
|
||||
if ($.fn.media.xaml.warning) return;
|
||||
$.fn.media.xaml.warning = 1;
|
||||
alert('You must include the Silverlight.js script.');
|
||||
return;
|
||||
}
|
||||
|
||||
var props = {
|
||||
width: opts.width,
|
||||
height: opts.height,
|
||||
background: opts.bgColor,
|
||||
inplaceInstallPrompt: opts.silverlight.inplaceInstallPrompt,
|
||||
isWindowless: opts.silverlight.isWindowless,
|
||||
framerate: opts.silverlight.framerate,
|
||||
version: opts.silverlight.version
|
||||
};
|
||||
var events = {
|
||||
onError: opts.silverlight.onError,
|
||||
onLoad: opts.silverlight.onLoad
|
||||
};
|
||||
|
||||
var id1 = el.id ? (' id="'+el.id+'"') : '';
|
||||
var id2 = opts.id || 'AG' + counter++;
|
||||
// convert element to div
|
||||
var cls = opts.cls ? (' class="' + opts.cls + '"') : '';
|
||||
var $div = $('<div' + id1 + cls + '>');
|
||||
$(el).after($div).remove();
|
||||
|
||||
Sys.Silverlight.createObjectEx({
|
||||
source: opts.src,
|
||||
initParams: opts.silverlight.initParams,
|
||||
userContext: opts.silverlight.userContext,
|
||||
id: id2,
|
||||
parentElement: $div[0],
|
||||
properties: props,
|
||||
events: events
|
||||
});
|
||||
|
||||
if (opts.caption) $('<div>').appendTo($div).html(opts.caption);
|
||||
return $div;
|
||||
};
|
||||
|
||||
//
|
||||
// generate object/embed markup
|
||||
//
|
||||
function generate(el, opts, player) {
|
||||
var $el = $(el);
|
||||
var o = $.fn.media.defaults.players[player];
|
||||
var a, key, v;
|
||||
|
||||
if (player == 'iframe') {
|
||||
o = $('<iframe' + ' width="' + opts.width + '" height="' + opts.height + '" >');
|
||||
o.attr('src', opts.src);
|
||||
o.css('backgroundColor', o.bgColor);
|
||||
}
|
||||
else if (player == 'img') {
|
||||
o = $('<img>');
|
||||
o.attr('src', opts.src);
|
||||
if (opts.width)
|
||||
o.attr('width', opts.width);
|
||||
if (opts.height)
|
||||
o.attr('height', opts.height);
|
||||
o.css('backgroundColor', o.bgColor);
|
||||
}
|
||||
else if (lameIE) {
|
||||
a = ['<object width="' + opts.width + '" height="' + opts.height + '" '];
|
||||
for (key in opts.attrs)
|
||||
a.push(key + '="'+opts.attrs[key]+'" ');
|
||||
for (key in o.ieAttrs || {}) {
|
||||
v = o.ieAttrs[key];
|
||||
if (key == 'codebase' && window.location.protocol == 'https:')
|
||||
v = v.replace('http','https');
|
||||
a.push(key + '="'+v+'" ');
|
||||
}
|
||||
a.push('></ob'+'ject'+'>');
|
||||
var p = ['<param name="' + (o.oUrl || 'src') +'" value="' + opts.src + '">'];
|
||||
for (key in opts.params)
|
||||
p.push('<param name="'+ key +'" value="' + opts.params[key] + '">');
|
||||
o = document.createElement(a.join(''));
|
||||
for (var i=0; i < p.length; i++)
|
||||
o.appendChild(document.createElement(p[i]));
|
||||
}
|
||||
else if (opts.standards) {
|
||||
// Rewritten to be standards compliant by Richard Connamacher
|
||||
a = ['<object type="' + o.mimetype +'" width="' + opts.width + '" height="' + opts.height +'"'];
|
||||
if (opts.src) a.push(' data="' + opts.src + '" ');
|
||||
if (msie) {
|
||||
for (key in o.ieAttrs || {}) {
|
||||
v = o.ieAttrs[key];
|
||||
if (key == 'codebase' && window.location.protocol == 'https:')
|
||||
v = v.replace('http','https');
|
||||
a.push(key + '="'+v+'" ');
|
||||
}
|
||||
}
|
||||
a.push('>');
|
||||
a.push('<param name="' + (o.oUrl || 'src') +'" value="' + opts.src + '">');
|
||||
for (key in opts.params) {
|
||||
if (key == 'wmode' && player != 'flash') // FF3/Quicktime borks on wmode
|
||||
continue;
|
||||
a.push('<param name="'+ key +'" value="' + opts.params[key] + '">');
|
||||
}
|
||||
// Alternate HTML
|
||||
a.push('<div><p><strong>'+o.title+' Required</strong></p><p>'+o.title+' is required to view this media. <a href="'+o.pluginspage+'">Download Here</a>.</p></div>');
|
||||
a.push('</ob'+'ject'+'>');
|
||||
}
|
||||
else {
|
||||
a = ['<embed width="' + opts.width + '" height="' + opts.height + '" style="display:block"'];
|
||||
if (opts.src) a.push(' src="' + opts.src + '" ');
|
||||
for (key in opts.attrs)
|
||||
a.push(key + '="'+opts.attrs[key]+'" ');
|
||||
for (key in o.eAttrs || {})
|
||||
a.push(key + '="'+o.eAttrs[key]+'" ');
|
||||
for (key in opts.params) {
|
||||
if (key == 'wmode' && player != 'flash') // FF3/Quicktime borks on wmode
|
||||
continue;
|
||||
a.push(key + '="'+opts.params[key]+'" ');
|
||||
}
|
||||
a.push('></em'+'bed'+'>');
|
||||
}
|
||||
// convert element to div
|
||||
var id = el.id ? (' id="'+el.id+'"') : '';
|
||||
var cls = opts.cls ? (' class="' + opts.cls + '"') : '';
|
||||
var $div = $('<div' + id + cls + '>');
|
||||
$el.after($div).remove();
|
||||
if (lameIE || player == 'iframe' || player == 'img')
|
||||
$div.append(o);
|
||||
else
|
||||
$div.html(a.join(''));
|
||||
|
||||
if (opts.caption)
|
||||
$('<div>').appendTo($div).html(opts.caption);
|
||||
return $div;
|
||||
}
|
||||
|
||||
|
||||
})(jQuery);
|
||||
Loading…
Reference in New Issue