提交拍照、优化查询
parent
bfc153a134
commit
cf33668c79
|
|
@ -487,10 +487,18 @@ public class ItemJobLauncher implements ApplicationListener {
|
|||
+ " and p.priority=1 ");
|
||||
|
||||
for(Long ptid:list) {
|
||||
PickTicket pt =commonDao.load(PickTicket.class, ptid);
|
||||
if(pt!=null&&pt.getPriority()>=1 &&(pt.getStatus().equals("PICK_ALL")
|
||||
||pt.getStatus().equals("SHIP_PART")
|
||||
||pt.getStatus().equals("SHIP_ALL")
|
||||
||pt.getStatus().equals("CLOSE")
|
||||
||pt.getStatus().equals("HEDAN")
|
||||
||pt.getStatus().equals("JIAODAN"))) {
|
||||
List<Long> tds =commonDao.findByQuery("select t.id from Task t where t.pickTicketDetail.pickTicket.id="+ptid+" and t.planQuantity>0");
|
||||
List<Long> tds1 =commonDao.findByQuery("select t.id from Task t where t.pickTicketDetail.pickTicket.id="+ptid+" and t.statusCode=2 "
|
||||
List<Long> tds1 =commonDao.findByQuery("select t.id from Task t where t.pickTicketDetail.pickTicket.id="+ptid+" and t.statusCode<=2 "
|
||||
+ " and t.movedQuantityMU>0 and t.planQuantity>0 ");
|
||||
if(tds.size()==tds1.size()) {
|
||||
|
||||
List<Long> pids=new ArrayList<Long>();
|
||||
pids.add(ptid);
|
||||
pickTicketManager.wmsSapZhuantaihuichuangPTD(pids, 3);
|
||||
|
|
@ -501,6 +509,7 @@ public class ItemJobLauncher implements ApplicationListener {
|
|||
}else {
|
||||
// logger.info("工单号"+pt.getCode()+" 未拣货完成");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -529,12 +538,11 @@ public class ItemJobLauncher implements ApplicationListener {
|
|||
}
|
||||
public void sapOutStatusOpen(){
|
||||
//发料完成,并SAP状态为3.
|
||||
synchronized("SapOutStatusOpen") {
|
||||
List<Long> list= commonDao.findByQuery("select p.id from PickTicket p where"
|
||||
+ " p.pickedQuantity=0 and p.billType.code='GPUTPTC'"
|
||||
+ " and p.status='OPEN' ");
|
||||
pickTicketManager.wmsSapOrderStatus(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
package com.dev.swms.server.model.base;
|
||||
|
||||
import com.dev.energy.server.model.DomainModel;
|
||||
|
||||
public class ImageObj extends DomainModel{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
private String fileUrl;
|
||||
|
||||
private String imageType;
|
||||
|
||||
|
||||
public String getImageType() {
|
||||
return imageType;
|
||||
}
|
||||
public void setImageType(String imageType) {
|
||||
this.imageType = imageType;
|
||||
}
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getFileUrl() {
|
||||
return fileUrl;
|
||||
}
|
||||
public void setFileUrl(String fileUrl) {
|
||||
this.fileUrl = fileUrl;
|
||||
}
|
||||
public ImageObj(Long id, String fileUrl) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.fileUrl = fileUrl;
|
||||
}
|
||||
|
||||
public ImageObj() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -30,9 +30,9 @@ public class Item extends Entity {
|
|||
private double length=0;//长--
|
||||
private double width=0;//宽
|
||||
private double height=0;//高
|
||||
|
||||
private double weight=0;//规格重量
|
||||
private double volume=0;//体积
|
||||
private int packNumber=0;//规格数量
|
||||
/**
|
||||
* 是否危化品
|
||||
*/
|
||||
|
|
@ -43,7 +43,7 @@ public class Item extends Entity {
|
|||
private WarehouseArea defaultWarehouseArea;//默认库区
|
||||
private String shipRules;//库存价值等级 SAP下发
|
||||
private int balanceNumber=0;//是否更新长宽高
|
||||
private int packNumber=0;//规格数量
|
||||
|
||||
private String feeType;//货品类型 SAP OA
|
||||
|
||||
private String CAname;//简称
|
||||
|
|
@ -71,6 +71,7 @@ public class Item extends Entity {
|
|||
private String brand;//批号规则YYMMDD
|
||||
|
||||
private boolean beInv=false;//是否有库存
|
||||
|
||||
private boolean beSAPItem=false;//是否SAP料号
|
||||
|
||||
/**库存数量*/
|
||||
|
|
@ -133,7 +134,7 @@ public class Item extends Entity {
|
|||
private boolean beExtend1=false;//扩展1
|
||||
private boolean beExtend2=false;//扩展2
|
||||
private boolean beUnpacking=false;//是否最小包装
|
||||
|
||||
private boolean beImageFile=false;//是否拍照上传
|
||||
private boolean beWholeLine=false;//是否整行发料,不满足整行需要备注。
|
||||
private Position position;//库位组
|
||||
|
||||
|
|
@ -188,7 +189,15 @@ public class Item extends Entity {
|
|||
private Number largeHeight;
|
||||
|
||||
|
||||
public Position getPosition() {
|
||||
public boolean isBeImageFile() {
|
||||
return beImageFile;
|
||||
}
|
||||
|
||||
public void setBeImageFile(boolean beImageFile) {
|
||||
this.beImageFile = beImageFile;
|
||||
}
|
||||
|
||||
public Position getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,52 @@ public class SignFile extends Entity{
|
|||
/**显示名称*/
|
||||
private String viewName;
|
||||
/**备注*/
|
||||
private String remark;
|
||||
private String remark;//下载路径
|
||||
|
||||
private double length=0;//长
|
||||
private double width=0;//宽
|
||||
private double height=0;//高
|
||||
private double weight=0;//规格重量
|
||||
private double volume=0;//体积
|
||||
private int packNumber=0;//规格数量
|
||||
|
||||
|
||||
public double getLength() {
|
||||
return length;
|
||||
}
|
||||
public void setLength(double length) {
|
||||
this.length = length;
|
||||
}
|
||||
public double getWidth() {
|
||||
return width;
|
||||
}
|
||||
public void setWidth(double width) {
|
||||
this.width = width;
|
||||
}
|
||||
public double getHeight() {
|
||||
return height;
|
||||
}
|
||||
public void setHeight(double height) {
|
||||
this.height = height;
|
||||
}
|
||||
public double getWeight() {
|
||||
return weight;
|
||||
}
|
||||
public void setWeight(double weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
public double getVolume() {
|
||||
return volume;
|
||||
}
|
||||
public void setVolume(double volume) {
|
||||
this.volume = volume;
|
||||
}
|
||||
public int getPackNumber() {
|
||||
return packNumber;
|
||||
}
|
||||
public void setPackNumber(int packNumber) {
|
||||
this.packNumber = packNumber;
|
||||
}
|
||||
public Item getItem() {
|
||||
return item;
|
||||
}
|
||||
|
|
@ -99,7 +143,7 @@ public class SignFile extends Entity{
|
|||
*@description: 处理图片FileUrl 参数,传入图片路径
|
||||
*
|
||||
*/
|
||||
public void processFileUrl(String imageTarget){
|
||||
public void processFileUrl(String imageFileName,String fileNameUrl){
|
||||
String IP="";
|
||||
try {
|
||||
InetAddress addr = InetAddress.getLocalHost();
|
||||
|
|
@ -108,21 +152,24 @@ public class SignFile extends Entity{
|
|||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
String fileUrl = "<img src=\"http://"+IP+":8080/zwwms/images/zw/imageTarget/" + imageTarget + "\" ";
|
||||
// String fileUrl = "<img src=\"http://"+IP+":8080/zwwms/images/zw/imageTarget/" + imageFileName + "\" ";
|
||||
String fileUrl = "<img src=\"http://"+IP+":8080/"+fileNameUrl + imageFileName + "\" ";
|
||||
fileUrl = fileUrl + " title=" + this.fileName + " />";
|
||||
this.fileUrl = fileUrl;
|
||||
}
|
||||
|
||||
public void processFileRemark(String imageTarget){
|
||||
public void processFileRemark(String imageFileName,String fileNameUrl){
|
||||
String IP="";
|
||||
try {
|
||||
//获取IP地址
|
||||
InetAddress addr = InetAddress.getLocalHost();
|
||||
IP=addr.getHostAddress();
|
||||
} catch (UnknownHostException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
String fileUrl = "http://"+IP+":8080/zwwms/images/zw/imageTarget/" + imageTarget;
|
||||
// String fileUrl = "http://"+IP+":8080/zwwms/images/zw/imageTarget/" + imageFileName;
|
||||
String fileUrl = "http://"+IP+":8080/"+fileNameUrl + imageFileName;
|
||||
this.remark = fileUrl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,8 +95,7 @@
|
|||
</many-to-one>
|
||||
<property name="minimumStock" column="MINIMUM_STOCK" type="double" />
|
||||
<property name="HighestStock" column="HIGHEST_STOCK" type="double" />
|
||||
<property name="barcode" column="BAR_CODE" type="string"
|
||||
length="150" />
|
||||
<property name="barcode" column="BAR_CODE" type="string" length="150" />
|
||||
<property name="beMarkWeight" type="boolean" column="BE_MARK_WEIGHT" />
|
||||
<property name="beWholeLine" type="boolean" column="BE_WHOLE_LINE" />
|
||||
<property name="shipRules" type="string" column="SHIP_RULES" />
|
||||
|
|
@ -180,7 +179,7 @@
|
|||
<many-to-one name="position" class="com.dev.swms.server.model.base.Position">
|
||||
<column name="POSITION_ID" />
|
||||
</many-to-one>
|
||||
|
||||
<property name="beImageFile" type="boolean" column="be_Image_File" />
|
||||
</class>
|
||||
<query name="getItemsCountByCompanyID">
|
||||
<![CDATA[SELECT COUNT(item) FROM Item item WHERE item.company.id = :companyId]]>
|
||||
|
|
|
|||
|
|
@ -47,5 +47,11 @@
|
|||
<property name="operateDate" type="timestamp" column="OPERATE_DATE"/>
|
||||
<property name="viewName" type="string" length="100" column="view_Name"/>
|
||||
<property name="remark" type="string" length="100" column="remark"/>
|
||||
<property name="length" column="LENGTH" type="double" />
|
||||
<property name="width" column="WIDTH" type="double" />
|
||||
<property name="height" column="HEIGHT" type="double" />
|
||||
<property name="weight" column="WEIGHT" type="double" />
|
||||
<property name="volume" column="VOLUME" type="double" />
|
||||
<property name="packNumber" type="integer" column="PACK_NUMBER" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
|
|
@ -9,6 +9,7 @@ public class ZonePlant extends Entity {
|
|||
private WarehouseArea area;
|
||||
/** 缓存地 */
|
||||
private PlantLocation pLocation;
|
||||
|
||||
public WarehouseArea getArea() {
|
||||
return area;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,8 +78,18 @@ public class Inventory extends VersionalEntity {
|
|||
private String moveStatus;//移动工作站
|
||||
/** 备注 */
|
||||
private String description;
|
||||
/** 料号 */
|
||||
private String itemCode;
|
||||
|
||||
|
||||
|
||||
public String getItemCode() {
|
||||
return itemCode;
|
||||
}
|
||||
|
||||
public void setItemCode(String itemCode) {
|
||||
this.itemCode = itemCode;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@
|
|||
<property name="handleQuantity" type="double" column="handleQuantity" />
|
||||
<property name="moveStatus" column="moveStatus" type="string" length="50"/>
|
||||
<property name="description" column="description" type="string" length="200"/>
|
||||
<property name="itemCode" column="Item_Code" type="string" length="100"/>
|
||||
</class>
|
||||
|
||||
<query name="getAllInventoryByWarehouseCompany">
|
||||
|
|
|
|||
|
|
@ -108,8 +108,6 @@ public class ASN extends VersionalEntity {
|
|||
/** 预留字段 */
|
||||
private String relatedBill3;//需求人
|
||||
|
||||
|
||||
/** */
|
||||
|
||||
/** 收货单明细 */
|
||||
private Set<ASNDetail> asnDetails = new HashSet<ASNDetail>();
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class ASNDetail extends Entity {
|
|||
private Date receiveDate;//收货日期
|
||||
|
||||
/** 收货记录 */
|
||||
private Set<ReceivedRecord> receivedRecords = new HashSet<ReceivedRecord>();
|
||||
// private Set<ReceivedRecord> receivedRecords = new HashSet<ReceivedRecord>();
|
||||
/***/
|
||||
private String PO;
|
||||
/** 库位 */
|
||||
|
|
@ -613,12 +613,12 @@ public class ASNDetail extends Entity {
|
|||
public void setReceivedQuantity(double receivedQuantity) {
|
||||
this.receivedQuantity = receivedQuantity;
|
||||
}
|
||||
public Set<ReceivedRecord> getReceivedRecords() {
|
||||
return receivedRecords;
|
||||
}
|
||||
public void setReceivedRecords(Set<ReceivedRecord> receivedRecords) {
|
||||
this.receivedRecords = receivedRecords;
|
||||
}
|
||||
// public Set<ReceivedRecord> getReceivedRecords() {
|
||||
// return receivedRecords;
|
||||
// }
|
||||
// public void setReceivedRecords(Set<ReceivedRecord> receivedRecords) {
|
||||
// this.receivedRecords = receivedRecords;
|
||||
// }
|
||||
public Item getItem() {
|
||||
return item;
|
||||
}
|
||||
|
|
@ -692,7 +692,7 @@ public class ASNDetail extends Entity {
|
|||
recRecord.setOperator(UserHolder.getUser().getName());
|
||||
}
|
||||
recRecord.setReceivedDoc(receivedDoc);
|
||||
this.receivedRecords.add(recRecord);
|
||||
// this.receivedRecords.add(recRecord);
|
||||
return recRecord;
|
||||
}
|
||||
|
||||
|
|
@ -738,7 +738,7 @@ public class ASNDetail extends Entity {
|
|||
recRecord.setWorker(worker);
|
||||
recRecord.setQualityCode(qualityCode);
|
||||
// this.getAsn().getReceivedRecords().add(recRecord);
|
||||
this.receivedRecords.add(recRecord);
|
||||
// this.receivedRecords.add(recRecord);
|
||||
return recRecord;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -290,6 +290,7 @@ public class MoveDocDetail extends AbstractMoveDocDetail {
|
|||
.append(inventoryStatus, castOther.getInventoryStatus())
|
||||
.append(newLotInfo, castOther.getNewLotInfo())
|
||||
.append(lineNo, castOther.lineNo)
|
||||
.append(receivedRecordId, castOther.receivedRecordId)
|
||||
.isEquals();
|
||||
}
|
||||
|
||||
|
|
@ -299,7 +300,7 @@ public class MoveDocDetail extends AbstractMoveDocDetail {
|
|||
storageDate).append(SOI).append(srcLoc).append(dstLoc).append(
|
||||
srcLP).append(srcLPCode).append(dstLP).append(dstLPCode)
|
||||
.append(packageUnit).append(inventoryStatus)
|
||||
.append(newLotInfo).append(lineNo).toHashCode();
|
||||
.append(newLotInfo).append(lineNo).append(receivedRecordId).toHashCode();
|
||||
}
|
||||
|
||||
protected MoveDocDetail() {
|
||||
|
|
@ -474,9 +475,9 @@ public class MoveDocDetail extends AbstractMoveDocDetail {
|
|||
public void addTask(String taskType, Location fromLocation, Location toLocation, Stock srcLp,
|
||||
Stock dstLp, ItemKey itemKey, Date storageDate, String soi, String status,
|
||||
double allocatedQuantity, PackageUnit packageUnit) {
|
||||
if (this.getTasks() == null) {
|
||||
this.setTasks(new HashSet<Task>());
|
||||
}
|
||||
// if (this.getTasks() == null) {
|
||||
// this.setTasks(new HashSet<Task>());
|
||||
// }
|
||||
getTask(taskType, fromLocation, toLocation, srcLp, dstLp, itemKey, storageDate, soi, status,
|
||||
allocatedQuantity, packageUnit);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,9 +63,9 @@
|
|||
<property name="propLC4" type="string" column="PROP_LC4"
|
||||
length="250" />
|
||||
<property name="propLC5" type="string" column="PROP_LC5"
|
||||
length="100" />
|
||||
length="200" />
|
||||
<property name="propLC6" type="string" column="PROP_LC6"
|
||||
length="100" />
|
||||
length="200" />
|
||||
</component>
|
||||
<property name="relatedBill1" type="string" length="50"
|
||||
column="RELATED_BILL1" />
|
||||
|
|
@ -102,11 +102,11 @@
|
|||
<column name="PACKAGE_UNIT_ID" />
|
||||
</many-to-one>
|
||||
|
||||
<set name="receivedRecords" lazy="true" inverse="true"
|
||||
cascade="all-delete-orphan">
|
||||
<key column="ASN_DETAIL_ID" />
|
||||
<one-to-many class="com.dev.swms.server.model.receiving.ReceivedRecord" />
|
||||
</set>
|
||||
<!-- <set name="receivedRecords" lazy="true" inverse="true" -->
|
||||
<!-- cascade="all-delete-orphan"> -->
|
||||
<!-- <key column="ASN_DETAIL_ID" /> -->
|
||||
<!-- <one-to-many class="com.dev.swms.server.model.receiving.ReceivedRecord" /> -->
|
||||
<!-- </set> -->
|
||||
|
||||
<property name="PO" type="string">
|
||||
<column name="PO" length="220" not-null="false" unique-key="UK_AD_PO" />
|
||||
|
|
|
|||
|
|
@ -65,11 +65,10 @@
|
|||
class="com.dev.swms.server.model.base.PackageUnit">
|
||||
<column name="PACKAGE_UNIT_ID" not-null="false" />
|
||||
</many-to-one>
|
||||
|
||||
<set name="tasks" lazy="true" inverse="true" cascade="all-delete-orphan">
|
||||
<key column="MOVE_DOC_DETAIL_ID" />
|
||||
<one-to-many class="com.dev.swms.server.model.inventory.Task" />
|
||||
</set>
|
||||
<!-- <set name="tasks" lazy="true" inverse="true" cascade="all-delete-orphan"> -->
|
||||
<!-- <key column="MOVE_DOC_DETAIL_ID" /> -->
|
||||
<!-- <one-to-many class="com.dev.swms.server.model.inventory.Task" /> -->
|
||||
<!-- </set> -->
|
||||
<property name="lineNo" type="int">
|
||||
<column name="LINE_NO" not-null="false" />
|
||||
</property>
|
||||
|
|
|
|||
|
|
@ -820,7 +820,7 @@ public class DefaultAgvTaskManager extends DefaultBaseManager implements AgvTask
|
|||
}
|
||||
agvTask.setJobPriorityType(jobPriorityType);
|
||||
if(jobPriorityType!=null&&jobPriorityType==1) {
|
||||
agvTask.setJobPriority(999L);
|
||||
agvTask.setJobPriority(9999L);
|
||||
}
|
||||
agvTask.setTargetAreahistory(agvTask.getTargetArea());
|
||||
commonDao.store(agvTask);
|
||||
|
|
@ -1046,7 +1046,7 @@ public class DefaultAgvTaskManager extends DefaultBaseManager implements AgvTask
|
|||
agvTask.setIdentification(identification);
|
||||
agvTask.setJobPriorityType(jobPriorityType);
|
||||
if(jobPriorityType.equals("1")) {
|
||||
agvTask.setJobPriority(999L);
|
||||
agvTask.setJobPriority(9999L);
|
||||
}
|
||||
agvTask.setClassification(classification);
|
||||
agvTask.setFounderName(founderName);
|
||||
|
|
@ -2297,7 +2297,7 @@ public class DefaultAgvTaskManager extends DefaultBaseManager implements AgvTask
|
|||
}
|
||||
//加急接口
|
||||
public void updateUrgentAgvTask(List<Long> ids) {
|
||||
Long h=999L;
|
||||
Long h=9999L;
|
||||
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,7 +2305,7 @@ 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)-10;
|
||||
h=list.get(0)-50;
|
||||
}
|
||||
}
|
||||
for(Long id:ids) {
|
||||
|
|
@ -2344,6 +2344,7 @@ public class DefaultAgvTaskManager extends DefaultBaseManager implements AgvTask
|
|||
}
|
||||
}else if(!agv.isBeIssue()) {
|
||||
agv.setJobPriorityType(1L);
|
||||
agv.setJobPriority(h);
|
||||
agv.setRemarks("超时加急任务,还未下发");
|
||||
agv.setUrgentTime(new Date());
|
||||
commonDao.store(agv);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class ApiURL {
|
|||
public static String returnOA = "";
|
||||
// 测试地址 WMS——SAP 回传接口******http://happdev.amecnsh.com:8000/sap/zrest
|
||||
public static String doWmsReqSap = "";
|
||||
|
||||
|
||||
// OA生产地址
|
||||
// public static String returnOA = "https://10.1.112.7/api/zwbdt/e9/oa4sap/confirmRequest";
|
||||
// WMS——SAP 回传接口 正式生产地址
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
package com.dev.swms.server.service.interfaceLog;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import com.dev.energy.server.model.Entity;
|
||||
|
||||
|
|
@ -15,4 +17,14 @@ public interface ImageFileManager {
|
|||
|
||||
@Transactional
|
||||
void deleteSignFile(List<Long> ids);
|
||||
|
||||
@Transactional
|
||||
<T extends Entity> void importImageItem(String itemCode, MultipartFile file,
|
||||
String weight, String length,String width,String height,String packNumber
|
||||
,String DateTime,String taskCode, String objectType);
|
||||
|
||||
@Transactional
|
||||
<T extends Entity> void importImageItem(Long id, InputStream inputStream,
|
||||
String weight, String length,String width,String height,String packNumber
|
||||
,String DateTime,String taskCode, String objectType,String fileName, String longName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,14 @@ import java.io.File;
|
|||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
@ -24,11 +31,22 @@ import com.dev.energy.server.web.security.UserHolder;
|
|||
import com.dev.swms.server.utils.PicUtils;
|
||||
import com.dev.swms.server.model.base.Item;
|
||||
import com.dev.swms.server.model.base.SignFile;
|
||||
import com.dev.swms.server.model.inventory.Task;
|
||||
import com.dev.swms.server.model.receiving.ASNDetail;
|
||||
import com.dev.swms.server.model.shipping.PickTicket;
|
||||
import com.dev.swms.server.service.GlobalParamUtils;
|
||||
import com.dev.swms.server.service.interfaceLog.ImageFileManager;
|
||||
import com.dev.swms.server.service.shipping.PickTicketManager;
|
||||
|
||||
public class DefaultImageFileManager extends DefaultBaseManager implements ImageFileManager{
|
||||
|
||||
protected final PickTicketManager pickTicketManager;
|
||||
|
||||
public DefaultImageFileManager(PickTicketManager pickTicketManager) {
|
||||
super();
|
||||
this.pickTicketManager=pickTicketManager;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public <T extends Entity> void importImageItem(Long id, File file,
|
||||
String imageType, String objectType,String strExtend1) {
|
||||
|
|
@ -44,7 +62,6 @@ public class DefaultImageFileManager extends DefaultBaseManager implements Image
|
|||
throw new BusinessException("璇烽<E79287>夋嫨鏂囦欢锛<E6ACA2>");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
LocalizedMessage.addLocalizedMessage("涓婁紶鎴愬姛");
|
||||
}
|
||||
|
|
@ -60,7 +77,7 @@ public class DefaultImageFileManager extends DefaultBaseManager implements Image
|
|||
String str2=bb.substring(0, bb.indexOf("-"));
|
||||
String bb2=bb.substring(str2.length()+1, bb.length());
|
||||
String fileName = bb2.substring(0, bb2.indexOf("-"));*/
|
||||
String code = "";
|
||||
// String code = "";
|
||||
Date date = new Date();
|
||||
Item item=null;
|
||||
String fileName=date.getTime()+".jpg";
|
||||
|
|
@ -68,8 +85,9 @@ public class DefaultImageFileManager extends DefaultBaseManager implements Image
|
|||
item = this.commonDao.load(Item.class, id);
|
||||
date = new Date();
|
||||
}
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
File file2 = new File("C:/tomcat-8080/webapps/zwwms/images/zw/imageTarget/");// 瀛樻斁鐢熸垚鐨勫浘鐗囩殑鐩爣鏂囦欢澶<E6ACA2>
|
||||
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String fileNameUrl="zwwms/images/zw/imageTarget/";//文件在项目中路径
|
||||
File file2 = new File("C:/tomcat-8080/webapps/"+fileNameUrl);// 瀛樻斁鐢熸垚鐨勫浘鐗囩殑鐩爣鏂囦欢澶<E6ACA2>
|
||||
if (!file2.exists()) {
|
||||
file2.mkdirs();
|
||||
}
|
||||
|
|
@ -78,7 +96,7 @@ public class DefaultImageFileManager extends DefaultBaseManager implements Image
|
|||
|
||||
MultipartFile multipartFile = new MockMultipartFile(file.getName(),file.getName(),ContentType.APPLICATION_OCTET_STREAM.toString(),in);
|
||||
byte[] bytes = PicUtils.compressPicForScale(multipartFile.getBytes(), 120);
|
||||
File fOut = new File("C:/tomcat-8080/webapps/zwwms/images/zw/imageTarget/"+ fileName);
|
||||
File fOut = new File("C:/tomcat-8080/webapps/"+fileNameUrl+ fileName);
|
||||
|
||||
BufferedInputStream bin = new BufferedInputStream(in);
|
||||
FileOutputStream out = new FileOutputStream(fOut);// 瀹氫箟鏂囦欢杈撳嚭娴<E59AAD>
|
||||
|
|
@ -90,7 +108,7 @@ public class DefaultImageFileManager extends DefaultBaseManager implements Image
|
|||
}
|
||||
if (file != null) {
|
||||
imageFile.setFileName(fileName);
|
||||
imageFile.processFileUrl(fileName);// 鐢熸垚甯mg鏍囩鐨勭洰鏍囧浘鐗囩殑url鍦板潃
|
||||
imageFile.processFileUrl(fileName,fileNameUrl);// 鐢熸垚甯mg鏍囩鐨勭洰鏍囧浘鐗囩殑url鍦板潃
|
||||
imageFile.setImageType(imageType);
|
||||
imageFile.setObjectType(objectType);
|
||||
imageFile.setOperate(UserHolder.getUser().getName());
|
||||
|
|
@ -98,7 +116,7 @@ public class DefaultImageFileManager extends DefaultBaseManager implements Image
|
|||
imageFile.setFileDate(new Date());
|
||||
imageFile.setItem(item);
|
||||
imageFile.setObjectId(id);
|
||||
imageFile.processFileRemark(fileName);
|
||||
imageFile.processFileRemark(fileName,fileNameUrl);
|
||||
commonDao.store(imageFile);
|
||||
item.setStrExtend1(strExtend1);
|
||||
commonDao.store(item);
|
||||
|
|
@ -265,5 +283,239 @@ public class DefaultImageFileManager extends DefaultBaseManager implements Image
|
|||
file.delete();
|
||||
}
|
||||
}
|
||||
|
||||
public <T extends Entity> void importImageItem(String itemCode, MultipartFile file,
|
||||
String weight, String length,String width,String height,String packNumber
|
||||
,String DateTime,String taskCode,String objectType) {
|
||||
|
||||
SignFile imageFile = (SignFile) EntityFactory.getEntity(SignFile.class);
|
||||
|
||||
Date date = new Date();
|
||||
Item item=null;
|
||||
String fileName=date.getTime()+".jpg";
|
||||
if (itemCode!=null&&itemCode.length()>0) {
|
||||
String hql=" from Item i where i.code='"+itemCode+"'";
|
||||
List<Item> listitem=commonDao.findByQuery(hql);
|
||||
if(listitem.size()>0) {
|
||||
item=listitem.get(0);
|
||||
}else {
|
||||
|
||||
}
|
||||
date = new Date();
|
||||
}else {
|
||||
|
||||
}
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String fileUrl2="zwwms/images/zwItem/"+format.format(date)+"/";
|
||||
String fileUrl="C:/tomcat-8080/webapps/"+fileUrl2;
|
||||
File file2 = new File(fileUrl);//
|
||||
if (!file2.exists()) {
|
||||
file2.mkdirs();
|
||||
}
|
||||
try {
|
||||
// FileInputStream in = new FileInputStream(file);//
|
||||
//
|
||||
// MultipartFile multipartFile = new MockMultipartFile(file.getName(),file.getName(),ContentType.APPLICATION_OCTET_STREAM.toString(),in);
|
||||
// byte[] bytes = PicUtils.compressPicForScale(multipartFile.getBytes(), 120);
|
||||
// File fOut = new File(fileUrl+ fileName);
|
||||
//
|
||||
// BufferedInputStream bin = new BufferedInputStream(in);
|
||||
// FileOutputStream out = new FileOutputStream(fOut);//
|
||||
// out.write(bytes);
|
||||
// bin.close();
|
||||
// out.close();
|
||||
String originalFilename = file.getOriginalFilename();
|
||||
Path filePath = Paths.get(fileUrl+ fileName, fileName);
|
||||
// 保存文件
|
||||
Files.copy(file.getInputStream(), filePath, StandardCopyOption.REPLACE_EXISTING);
|
||||
|
||||
} catch (IOException e) {
|
||||
throw new BusinessException(fileUrl+"存放路径错误!");
|
||||
}
|
||||
if (file != null) {
|
||||
imageFile.setFileName(fileName);
|
||||
imageFile.processFileUrl(fileName,fileUrl2);//
|
||||
imageFile.setImageType("ITEM");
|
||||
imageFile.setObjectType(objectType);
|
||||
imageFile.setOperate(UserHolder.getUser().getName());
|
||||
imageFile.setOperateDate(new Date());
|
||||
imageFile.setFileDate(new Date());
|
||||
imageFile.setItem(item);
|
||||
if(item!=null) {
|
||||
imageFile.setObjectId(item.getId());
|
||||
}
|
||||
imageFile.processFileRemark(fileName,fileUrl2);
|
||||
imageFile.setViewName(itemCode);
|
||||
try {
|
||||
imageFile.setLength(Double.parseDouble(length));
|
||||
imageFile.setWidth(Double.parseDouble(width));
|
||||
imageFile.setHeight(Double.parseDouble(height));
|
||||
imageFile.setWeight(Double.parseDouble(weight));
|
||||
imageFile.setPackNumber(Integer.parseInt(packNumber));
|
||||
}catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
commonDao.store(imageFile);
|
||||
} else {
|
||||
throw new BusinessException("file.not.exist.or.file.length.bigger.than.2M");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//交单拍照
|
||||
public <T extends Entity> void importImageItem(Long id, InputStream inputStream,
|
||||
String weight, String length,String width,String height,String packNumber
|
||||
,String DateTime,String taskCode, String objectType,String fileName, String longName) {
|
||||
if (inputStream != null) {
|
||||
SignFile imageFile = new SignFile();
|
||||
String code = "";
|
||||
Long objectId=0L;
|
||||
Date date = new Date();
|
||||
List<Long> list1=new ArrayList<Long>();
|
||||
//到货登记上传
|
||||
if (objectType.equals("ASN")) {
|
||||
ASNDetail c = this.load(ASNDetail.class, id);
|
||||
// code = c.getCode();
|
||||
objectId=c.getId();
|
||||
fileName=code+"_"+fileName;
|
||||
date = new Date();
|
||||
}else if (objectType.equals("PICK")){
|
||||
PickTicket c = this.load(PickTicket.class, id);
|
||||
code = c.getCode();
|
||||
objectId=c.getId();
|
||||
fileName=code+"_"+fileName;
|
||||
date = new Date();
|
||||
}else if (objectType.equals("TASK")){
|
||||
Task c = this.load(Task.class, id);
|
||||
// code = c.getCode();
|
||||
objectId=c.getId();
|
||||
fileName=code+"_"+fileName;
|
||||
date = new Date();
|
||||
}else if (objectType.equals("ItemPicture")){
|
||||
Item c = this.load(Item.class, id);
|
||||
list1.add(id);
|
||||
code = c.getCode();
|
||||
objectId=c.getId();
|
||||
c.setBeImageFile(true);
|
||||
double weight2=0;
|
||||
double length2=0;
|
||||
double width2=0;
|
||||
double height2=0;
|
||||
int specs2=0;
|
||||
try{
|
||||
weight2=Double.parseDouble(weight);
|
||||
length2=Double.parseDouble(length);
|
||||
width2=Double.parseDouble(width);
|
||||
height2=Double.parseDouble(height);
|
||||
specs2=Integer.parseInt(packNumber);
|
||||
}catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
c.setWeight(weight2);
|
||||
BigDecimal bg1 = new BigDecimal(c.getWeight()/specs2);
|
||||
double f2 = bg1.setScale(3, BigDecimal.ROUND_HALF_UP).doubleValue();
|
||||
if(f2<0.001){
|
||||
c.setSuggest(0.001);
|
||||
}else{
|
||||
c.setSuggest(f2);
|
||||
}
|
||||
BigDecimal bg2 = new BigDecimal(length2/100);
|
||||
double length1 = bg2.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
|
||||
if(length1<0.01) {
|
||||
length1=0.01;
|
||||
}
|
||||
BigDecimal bg3 = new BigDecimal(width2/100);
|
||||
double width1 = bg3.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
|
||||
if(width1<0.01) {
|
||||
width1=0.01;
|
||||
}
|
||||
BigDecimal bg4 = new BigDecimal(height2/100);
|
||||
double height1 = bg4.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
|
||||
if(height1<0.01) {
|
||||
height1=0.01;
|
||||
}
|
||||
c.setLength(length1);
|
||||
c.setWidth(width1);
|
||||
c.setHeight(height1);
|
||||
|
||||
c.setCAcoefficient(specs2+0D);
|
||||
c.setPackNumber((int)Math.abs(specs2));
|
||||
c.setVolume(width1*height1*length1);
|
||||
BigDecimal bg = new BigDecimal(c.getVolume());
|
||||
double f1 = bg.setScale(6, BigDecimal.ROUND_HALF_UP).doubleValue();
|
||||
if(f1<0.000001) {
|
||||
f1=0.000001;
|
||||
}
|
||||
c.setVolume(f1);
|
||||
c.setBalanceNumber(1);
|
||||
if(c.getLength()>0.6||c.getWidth()>0.4) {
|
||||
c.setGoodType("大件");
|
||||
}else {
|
||||
c.setGoodType("小件");
|
||||
}
|
||||
commonDao.store(c);
|
||||
fileName=code+"_"+fileName;
|
||||
date = new Date();
|
||||
}
|
||||
int year=date.getYear();
|
||||
int month=date.getMonth();
|
||||
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String fileUrl2="zwwms/images/zwItem/"+year+"/"+month+"/";
|
||||
String fileUrl="C:/tomcat-8080/webapps/"+fileUrl2;
|
||||
// StringBuffer stringBuffer = new StringBuffer();
|
||||
File file = new File(fileUrl);// 存放生成的图片的目标文件夹
|
||||
if (!file.exists()) {
|
||||
file.mkdirs();
|
||||
}
|
||||
try {
|
||||
fileName = fileName.replaceAll("\r|\n", "");
|
||||
File outputFile = new File(fileUrl+ fileName);
|
||||
|
||||
BufferedInputStream bin = new BufferedInputStream(inputStream);// 将文件输入流构造到缓存中
|
||||
FileOutputStream out = new FileOutputStream(outputFile);// 定义文件输出流
|
||||
BufferedOutputStream bout = new BufferedOutputStream(out);// 将文件输出流构造到缓存中
|
||||
int i;
|
||||
while ((i = bin.read()) != -1) {
|
||||
bout.write(i);
|
||||
}
|
||||
// getHtmlCode(stringBuffer, outputFile, fileName, code);
|
||||
bin.close();
|
||||
bout.close();// 关闭输入输出流,释放资源
|
||||
} catch (IOException e) {
|
||||
throw new BusinessException("文件上传出错!");
|
||||
}
|
||||
imageFile.setFileName(fileName);
|
||||
imageFile.processFileUrl(fileName,fileUrl2);// 生成带img标签的目标图片的url地址
|
||||
imageFile.setImageType(objectType);//附件类型
|
||||
imageFile.setObjectType(objectType);//对象类型
|
||||
imageFile.setOperate(longName);
|
||||
imageFile.setOperateDate(new Date());
|
||||
imageFile.setFileDate(new Date());
|
||||
imageFile.setObjectId(id);
|
||||
// imageFile.setOrderId(objectId);
|
||||
imageFile.setViewName(code);//料号、单号
|
||||
imageFile.processFileRemark(fileName,fileUrl2);
|
||||
try {
|
||||
imageFile.setLength(Double.parseDouble(length));
|
||||
imageFile.setWidth(Double.parseDouble(width));
|
||||
imageFile.setHeight(Double.parseDouble(height));
|
||||
imageFile.setWeight(Double.parseDouble(weight));
|
||||
imageFile.setPackNumber(Integer.parseInt(packNumber));
|
||||
imageFile.setVolume(imageFile.getLength()*imageFile.getWidth()*imageFile.getHeight());
|
||||
}catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
commonDao.store(imageFile);
|
||||
|
||||
if(list1.size()>0) {
|
||||
pickTicketManager.huichuanItems(list1);
|
||||
}
|
||||
|
||||
} else {
|
||||
throw new BusinessException("文件为空!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1198,19 +1198,19 @@ public class DefaultInterfaceItemManager extends DefaultBaseManager implements
|
|||
omsCode.setText(asn.getRelatedBill1());
|
||||
//内嵌明细
|
||||
Element details = order.addElement("DETAILS");
|
||||
for (ASNDetail asnDetail : asn.getAsnDetails()) {
|
||||
Element detail = details.addElement("DETAIL");
|
||||
Element product = detail.addElement("PRODUCT");
|
||||
Element lot = detail.addElement("LOT");
|
||||
Element quantity = detail.addElement("QUANTITY");
|
||||
Element unit = detail.addElement("UNIT");
|
||||
product.setText(asnDetail.getItem().getCode());
|
||||
lot.setText(asnDetail.getLotInfo().getPropC1() == null ? "" : asnDetail.getLotInfo().getPropC1());
|
||||
unit.setText(asnDetail.getPackageUnit().getUnit());
|
||||
//收货包装数量,折算时保留3位有效小数
|
||||
quantity.setText(String.valueOf(DoubleUtils.formatByPrecision(
|
||||
asnDetail.getReceivedQuantity()/asnDetail.getPackageUnit().getConvertFigure(), 3)));
|
||||
}
|
||||
// for (ASNDetail asnDetail : asn.getAsnDetails()) {
|
||||
// Element detail = details.addElement("DETAIL");
|
||||
// Element product = detail.addElement("PRODUCT");
|
||||
// Element lot = detail.addElement("LOT");
|
||||
// Element quantity = detail.addElement("QUANTITY");
|
||||
// Element unit = detail.addElement("UNIT");
|
||||
// product.setText(asnDetail.getItem().getCode());
|
||||
// lot.setText(asnDetail.getLotInfo().getPropC1() == null ? "" : asnDetail.getLotInfo().getPropC1());
|
||||
// unit.setText(asnDetail.getPackageUnit().getUnit());
|
||||
// //收货包装数量,折算时保留3位有效小数
|
||||
// quantity.setText(String.valueOf(DoubleUtils.formatByPrecision(
|
||||
// asnDetail.getReceivedQuantity()/asnDetail.getPackageUnit().getConvertFigure(), 3)));
|
||||
// }
|
||||
|
||||
return _doc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -648,19 +648,19 @@ public class DefaultInterfaceLogManager extends DefaultBaseManager implements
|
|||
omsCode.setText(asn.getRelatedBill1());
|
||||
//内嵌明细
|
||||
Element details = order.addElement("DETAILS");
|
||||
for (ASNDetail asnDetail : asn.getAsnDetails()) {
|
||||
Element detail = details.addElement("DETAIL");
|
||||
Element product = detail.addElement("PRODUCT");
|
||||
Element lot = detail.addElement("LOT");
|
||||
Element quantity = detail.addElement("QUANTITY");
|
||||
Element unit = detail.addElement("UNIT");
|
||||
product.setText(asnDetail.getItem().getCode());
|
||||
lot.setText(asnDetail.getLotInfo().getPropC1() == null ? "" : asnDetail.getLotInfo().getPropC1());
|
||||
unit.setText(asnDetail.getPackageUnit().getUnit());
|
||||
//收货包装数量,折算时保留3位有效小数
|
||||
quantity.setText(String.valueOf(DoubleUtils.formatByPrecision(
|
||||
asnDetail.getReceivedQuantity()/asnDetail.getPackageUnit().getConvertFigure(), 3)));
|
||||
}
|
||||
// for (ASNDetail asnDetail : asn.getAsnDetails()) {
|
||||
// Element detail = details.addElement("DETAIL");
|
||||
// Element product = detail.addElement("PRODUCT");
|
||||
// Element lot = detail.addElement("LOT");
|
||||
// Element quantity = detail.addElement("QUANTITY");
|
||||
// Element unit = detail.addElement("UNIT");
|
||||
// product.setText(asnDetail.getItem().getCode());
|
||||
// lot.setText(asnDetail.getLotInfo().getPropC1() == null ? "" : asnDetail.getLotInfo().getPropC1());
|
||||
// unit.setText(asnDetail.getPackageUnit().getUnit());
|
||||
// //收货包装数量,折算时保留3位有效小数
|
||||
// quantity.setText(String.valueOf(DoubleUtils.formatByPrecision(
|
||||
// asnDetail.getReceivedQuantity()/asnDetail.getPackageUnit().getConvertFigure(), 3)));
|
||||
// }
|
||||
|
||||
return _doc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1140,7 +1140,7 @@ public class DefaultInterfaceReqManager extends DefaultBaseManager implements In
|
|||
jsonobj2.put("BWART", pickTicket.getSourceType());//类型
|
||||
jsonobj2.put("MATNR", item.getCode());
|
||||
jsonobj2.put("ZSUBCONT", ptd.getStrBill11());//外协供应商
|
||||
jsonobj2.put("SGTXT", ptd.getStrExtend1());//
|
||||
jsonobj2.put("SGTXT", ptd.getStrExtend1()== null ? "":ptd.getStrExtend1());//
|
||||
jsonobj2.put("ZSTQTY", task.getMovedQuantityMU() + "");
|
||||
jsonobj2.put("SERNR", task.getBarCode());// 序列号
|
||||
jsonobj2.put("WERKS", task.getItemKey().getLotInfo().getPropC9() == null ? ""
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ import com.dev.swms.server.service.receiving.ASNManager;
|
|||
import com.dev.swms.server.service.receiving.MoveDocManager;
|
||||
import com.dev.swms.server.service.sequence.BussinessCodeManager;
|
||||
import com.dev.swms.server.service.shipping.PickTicketManager;
|
||||
import com.dev.swms.server.utils.DateUtil;
|
||||
import com.dev.swms.server.utils.TimeNumberUtils;
|
||||
import com.dev.swms.server.web.filter.WarehouseHolder;
|
||||
|
||||
|
|
@ -135,6 +136,19 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
|||
List<Item> items1=this.commonDao.findByQuery("from Item it where it.code='"+code+"'");
|
||||
if (items1.size()>0) {
|
||||
eitem=items1.get(0);
|
||||
eitem.setBeMarkWeight(beMarkWeight);
|
||||
if(eitem.isBeMarkWeight()==beMarkWeight) {
|
||||
eitem.setBeMarkWeight(beMarkWeight);
|
||||
}else {
|
||||
List<Long> itemlist= commonDao.findByQuery("select top 1 inv.id from Inventory inv where inv.quantity>0 "
|
||||
+ " and inv.itemKey.item.id="+eitem.getId());
|
||||
if(itemlist.size()>0) {
|
||||
json0.accumulate("returnCode", "500");
|
||||
json0.accumulate("returnFlag", "0");
|
||||
json0.accumulate("returnDesc", code+"该料号有库存,不能调整序列号");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
eitem.setCode(code);
|
||||
eitem.setName(name);
|
||||
|
|
@ -153,7 +167,9 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
|||
if(unit.equals("MR")||unit.equals("MM")||unit.equals("FT")) {
|
||||
eitem.setBeWholeLine(true);
|
||||
}
|
||||
// eitem.setGoodType("小件");
|
||||
if(eitem.getGoodType()==null) {
|
||||
eitem.setGoodType("小件");
|
||||
}
|
||||
if (warehouseAreas.size()>0) {
|
||||
eitem.setWarehouseArea(warehouseAreas.get(0));
|
||||
}
|
||||
|
|
@ -164,7 +180,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
|||
// eitem.setVolume(volume);
|
||||
// eitem.setWeight(weight);
|
||||
eitem.setBeWeight(beWeight);
|
||||
eitem.setBeMarkWeight(beMarkWeight);
|
||||
|
||||
// eitem.setValidPeriod(validPeriod);
|
||||
eitem.setBeSAPItem(true);
|
||||
eitem.setFeeType("SAP");
|
||||
|
|
@ -1540,7 +1556,6 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
|||
if(returnCode.equals("200")) {
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
JSONObject JSONobj=JSONObject.fromObject(jsonArray.get(i));
|
||||
System.out.println(JSONobj);
|
||||
String invId=JSONobj.has("invId")? JSONobj.getString("invId"):"";//任务号
|
||||
double expectedQuantity=JSONobj.has("quantity")? JSONobj.getDouble("quantity"):0;//出库数量
|
||||
String itemCode=JSONobj.has("itemCode")? JSONobj.getString("itemCode"):"";//货品(物料料号)(物料描述)
|
||||
|
|
@ -1548,6 +1563,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
|||
String applicant=JSONobj.has("applicant") ? JSONobj.getString("applicant") : "";//申请人
|
||||
String handoverLocation=JSONobj.has("handoverLocation") ? JSONobj.getString("handoverLocation") : "";//交单位置
|
||||
String WorkflowNumber=JSONobj.has("WorkflowNumber") ? JSONobj.getString("WorkflowNumber") : "";//OA流程编号
|
||||
String needDate=JSONobj.has("needDate") ? JSONobj.getString("needDate") : "";//需求日期
|
||||
|
||||
List<PickTicket> pickt=commonDao.findByQuery(" from PickTicket pt where pt.code='"+orderNumber+"'");
|
||||
log.setFunction(orderNumber);
|
||||
|
|
@ -1557,13 +1573,15 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
|||
}else {
|
||||
pickTicket=EntityFactory.getEntity(PickTicket.class);
|
||||
pickTicket.setSourceType("OAPUTPTC");//出库单的出库类型
|
||||
pickTicket.setOrderDate(pickTicket.getOrderDate());//订单日期
|
||||
// pickTicket.setCode(this.bussinessCodeManager.getCodeForYm("PT",5));//自动生成出库单号
|
||||
pickTicket.setCode(orderNumber);
|
||||
pickTicket.setBillType(billTypes.get(0));//单据类型
|
||||
pickTicket.setStatus(PickTicketStatus.OPEN);//状态
|
||||
pickTicket.setOrderQuantity(expectedQuantity);//出库数量
|
||||
pickTicket.setOrderDate(new Date());//创建日期
|
||||
pickTicket.setOrderDate(DateUtil.formatStrToDateYMD(needDate));
|
||||
if(pickTicket.getOrderDate()==null) {
|
||||
pickTicket.setOrderDate(new Date());
|
||||
}
|
||||
pickTicket.setRelatedBill1(orderNumber);//申请编号
|
||||
pickTicket.setRelatedBill2(WorkflowNumber);//流程编号
|
||||
pickTicket.setUpdateTime(new Date());
|
||||
|
|
@ -3107,7 +3125,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I
|
|||
json0.accumulate("returnCode", "200");
|
||||
json0.accumulate("returnFlag", "1");
|
||||
json0.accumulate("returnDesc", "成功");
|
||||
json0.accumulate("resultInfo", jsonA);
|
||||
json0.accumulate("resultInfo", jsonA.toString());
|
||||
JSONObject json1 = new JSONObject();
|
||||
json1.put("return", json0);
|
||||
JSONObject json11 = new JSONObject();
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
String locFloor="";
|
||||
String zoneCode="";//推荐库区
|
||||
String str1=asn_code;//扫描的凭证号
|
||||
// logger.info("-----------itemCode-0001"+itemcode);
|
||||
Session session = ((HibernateDaoSupport) this.commonDao).getSessionFactory().openSession();
|
||||
try {
|
||||
if (userId > 0) {
|
||||
|
|
@ -177,23 +178,24 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
}
|
||||
// if(asn_code!=null&&asn_code.length()>0){
|
||||
String sql = " select ad.id as asnDetailId,asn.code as code,item.code as itemCode,item.name as itemName, "
|
||||
+ " case when ad.ftl_qty>0 then ad.ftl_qty-ad.RECEIVED_QUANTITY else ad.EXPECTED_QUANTITY-ad.RECEIVED_QUANTITY end as orderQuantity,"
|
||||
// + " case when ad.ftl_qty>0 then ad.ftl_qty-ad.RECEIVED_QUANTITY else ad.EXPECTED_QUANTITY-ad.RECEIVED_QUANTITY end as orderQuantity,"
|
||||
+" ad.EXPECTED_QUANTITY-ad.RECEIVED_QUANTITY as orderQuantity,"
|
||||
+ "ad.RECEIVED_QUANTITY as expectedQuantity, ad.strBill8,ad.PROP_C5 as propC5,"
|
||||
+" ad.PROP_C2 as propC2,ad.PROP_C1 as propC1,PROP_C3 as propC3,ad.strBill2,item.UNIT as unit,"
|
||||
+ "item.ISBOM,"
|
||||
+ "(case when item.default_Warehouse_Area_ID is not NULL then item.default_Warehouse_Area_ID ELSE z.id END) as z_id,"
|
||||
+ "item.volume,item.BE_MARK_WEIGHT as beMarkWeight,item.FEE_TYPE,"
|
||||
+ " item.be_Extend1,item.be_Extend2,asn.BILL_TYPE_ID,ad.strBill11,ad.bf_qty ,z.name as z_name,"
|
||||
+ "z1.name as z1_name "
|
||||
+ "z1.name as z1_name, item.be_Image_File as be_Image_File "
|
||||
+ " from ASN_DETAIL ad "
|
||||
+ " left join ASN asn on asn.id=ad.ASN_ID "
|
||||
+ " left join ITEM item on item.id=ad.ITEM_ID "
|
||||
+ " left join zone z on z.id=item.warehouse_Area_ID "
|
||||
+ " left join zone z1 on z1.id=item.default_Warehouse_Area_ID "
|
||||
+ " where 1=1 and ( (ad.strBill=1 or ad.be_quality=0)) ";
|
||||
+ " where 1=1 and ((ad.strBill=1 or ad.be_quality=0)) ";
|
||||
String jq="";
|
||||
if(itemcode!=null&&!itemcode.equals("")) {
|
||||
sql+=" and (item.code)=upper('"+itemcode.trim()+"') ";
|
||||
sql+=" and item.code='"+itemcode.trim()+"' ";
|
||||
|
||||
// String dshq=" from UrgentOrder ptd where ptd.code='"+itemcode+"'";
|
||||
//
|
||||
|
|
@ -202,9 +204,9 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
// jq="是加急料号,尽快入库!";
|
||||
// }
|
||||
}
|
||||
if(asn_code!=null&&!asn_code.equals("")) {
|
||||
sql+=" and (upper(asn.code)=upper('"+asn_code.trim()+"') or "
|
||||
+ "upper(asn.related_Bill1)=upper('"+asn_code.trim()+"') "
|
||||
if(asn_code!=null&&!asn_code.equals("")) {
|
||||
sql+=" and (asn.code='"+asn_code.trim()+"' or "
|
||||
+ "asn.related_Bill1='"+asn_code.trim()+"' "
|
||||
+ " or ad.strBill7='"+asn_code.trim()+"')";
|
||||
}
|
||||
|
||||
|
|
@ -221,36 +223,94 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
return resultJson;
|
||||
}
|
||||
}
|
||||
sql+=" and (item.be_mark_weight=1 ) ";
|
||||
// sql+=" and (item.be_mark_weight=1 ) ";
|
||||
}else if(type.equals("1")) {
|
||||
sql+=" and (item.be_mark_weight=0 ) ";
|
||||
// sql+=" and (item.be_mark_weight=0 ) ";
|
||||
}
|
||||
|
||||
sql+= " and ((ad.ftl_qty=0 and ad.EXPECTED_QUANTITY>ad.RECEIVED_QUANTITY) or (ad.ftl_qty>0 and ad.ftl_qty>ad.RECEIVED_QUANTITY)) "
|
||||
+ " order by ad.strBill8,item.code";
|
||||
// sql+= " and ((ad.ftl_qty=0 and ad.EXPECTED_QUANTITY>ad.RECEIVED_QUANTITY) or (ad.ftl_qty>0 and ad.ftl_qty>ad.RECEIVED_QUANTITY)) "
|
||||
sql+= " order by ad.strBill8,item.code";
|
||||
|
||||
logger.info("-----------itemCode-0002"+itemcode);
|
||||
Query query = session.createSQLQuery(sql);
|
||||
List<Object[]> list= (List<Object[]>)query.list();
|
||||
String sql1=" select ad.id,asn.code,ad.be_quality from ASN_DETAIL ad "
|
||||
|
||||
logger.info("-----------itemCode-0003"+itemcode);
|
||||
String sql1=" select ad.id,ad.EXPECTED_QUANTITY,ad.RECEIVED_QUANTITY from ASN_DETAIL ad "
|
||||
+ " left join ASN asn on asn.id=ad.ASN_ID "
|
||||
+ " left join ITEM item on item.id=ad.ITEM_ID "
|
||||
+ "where (asn.code='"+asn_code.trim()+"' or "
|
||||
+ " asn.related_Bill1='"+asn_code.trim()+"')"
|
||||
+ " ad.strBill7='"+asn_code.trim()+"')"
|
||||
+ " and ( (ad.strBill=1 or ad.be_quality=0))";
|
||||
|
||||
|
||||
Query query1 = session.createSQLQuery(sql1);
|
||||
// Query query1 = session.createSQLQuery(sql1);
|
||||
// //整理完成
|
||||
// List<Object[]> asnds=(List<Object[]>)query1.list();
|
||||
// logger.info("-----------itemCode-0004"+itemcode);
|
||||
// String sql2=sql1+" and ad.EXPECTED_QUANTITY=ad.RECEIVED_QUANTITY ";
|
||||
//整理完成
|
||||
List<Object[]> asnds=(List<Object[]>)query1.list();
|
||||
|
||||
String sql2=sql1+" and ad.EXPECTED_QUANTITY=ad.RECEIVED_QUANTITY ";
|
||||
//整理完成
|
||||
Query query2 = session.createSQLQuery(sql2);
|
||||
List<Object[]> asds=(List<Object[]>)query2.list();
|
||||
h=asds.size()+"/"+asnds.size();
|
||||
|
||||
// Query query2 = session.createSQLQuery(sql2);
|
||||
// List<Object[]> asds=(List<Object[]>)query2.list();
|
||||
int ah=0;
|
||||
int wcxhlhh=0;//完成的序列号行数
|
||||
int wcshh=0;//完成非序列号行数
|
||||
if(list.size()>0) {
|
||||
for(Object[] arrier:list){
|
||||
String sttqty=arrier[4]==null?"0":arrier[4].toString();//数量
|
||||
String xuhl=arrier[16]==null?"0":arrier[16].toString();
|
||||
long ifxlh=Long.parseLong(xuhl);//是否序列号
|
||||
// String asqty=arrier[5]==null?"0":arrier[5].toString();//完成数量
|
||||
try{
|
||||
if(Double.parseDouble(sttqty)<=0) {
|
||||
ah++;
|
||||
if(ifxlh<=0) {
|
||||
wcshh++;
|
||||
}else {
|
||||
wcxhlhh++;
|
||||
}
|
||||
}
|
||||
}catch (Exception e) {
|
||||
|
||||
}
|
||||
// logger.info("----数量--"+sttqty+"-----itemCode-0005"+itemcode);
|
||||
}
|
||||
}
|
||||
// h=ah+"/"+asnds.size();
|
||||
h=ah+"/"+list.size();
|
||||
int xhlhh=0;//序列号行数
|
||||
int shh=0;//非序列号行数
|
||||
// logger.info("-----------itemCode-0005"+itemcode);
|
||||
if(list.size()>0){
|
||||
for(Object[] arrier:list){
|
||||
int i=0;
|
||||
String sttqty=arrier[4]==null?"0":arrier[4].toString();
|
||||
try{
|
||||
if(Double.parseDouble(sttqty)<=0) {
|
||||
|
||||
continue;//跳过已经整理完成的行
|
||||
}
|
||||
}catch (Exception e) {
|
||||
continue;
|
||||
}
|
||||
long ifxlh=Long.parseLong(arrier[16].toString());//是否序列号
|
||||
if(type.equals("2")) {
|
||||
|
||||
//序列号整理界面查询,
|
||||
if(ifxlh<=0) {
|
||||
shh++;
|
||||
continue;
|
||||
}
|
||||
|
||||
}else {
|
||||
|
||||
//查询不是序列号料号,
|
||||
if(ifxlh>0) {
|
||||
xhlhh++;
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
JSONObject obj = new JSONObject();
|
||||
obj.put("asnDetailId", arrier[i++]==null?"":arrier[i-1]);
|
||||
obj.put("code", arrier[i++]==null?"":arrier[i-1]);
|
||||
|
|
@ -261,7 +321,6 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
obj.put("strBill7", arrier[i++]==null?"":arrier[i-1]);//行号
|
||||
obj.put("propC5", arrier[i++]==null?"":arrier[i-1]);
|
||||
obj.put("propC2", arrier[i++]==null?"":arrier[i-1]);
|
||||
// System.out.println(arrier[8].toString()+"----");
|
||||
if(itemcode!=null&&!itemcode.equals("")) {
|
||||
if(arrier[8]!=null&&arrier[8].toString().length()>0) {
|
||||
|
||||
|
|
@ -274,7 +333,6 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
}else {
|
||||
}
|
||||
}
|
||||
|
||||
obj.put("propC1", arrier[i++]==null?"":arrier[i-1]);
|
||||
obj.put("propC3", arrier[i++]==null?"":arrier[i-1]);
|
||||
obj.put("strBill2", arrier[i++]==null?"":arrier[i-1]);
|
||||
|
|
@ -290,7 +348,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
}
|
||||
obj.put("zxmx",zxmx);
|
||||
String beMarkWeight="";
|
||||
long ifxlh=Long.parseLong(arrier[16].toString());
|
||||
|
||||
if(ifxlh<=0){
|
||||
beMarkWeight="否";
|
||||
}else{
|
||||
|
|
@ -339,30 +397,50 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
obj.put("defaultZone", "推荐库区无");
|
||||
obj.put("z_id", "");
|
||||
}
|
||||
// String beImageFile= arrier[25]==null?"":arrier[25].toString();//是否拍照上传
|
||||
// if(beImageFile.equals("TURE")||beImageFile.equals("true")||beImageFile.equals("1")) {
|
||||
// obj.put("beImageFile", "true");
|
||||
// }else {
|
||||
// obj.put("beImageFile", "false");
|
||||
// }
|
||||
if(zxmx.equals("是")) {
|
||||
obj.put("beImageFile", "false");
|
||||
}else {
|
||||
obj.put("beImageFile", "true");
|
||||
}
|
||||
array.add(obj);
|
||||
}
|
||||
data = array.toString();
|
||||
status = "1";
|
||||
msg=jq;
|
||||
// logger.info("-----------itemCode-0006"+itemcode);
|
||||
}else{
|
||||
if(asds.size()>0) {
|
||||
if(asds.size()<asnds.size()) {
|
||||
if(type.equals("2")) {
|
||||
msg = "非序列号未整理完成";
|
||||
}else if(type.equals("1")) {
|
||||
msg = "序列号未整理完成";
|
||||
}
|
||||
}else {
|
||||
msg = "已经整理完成";
|
||||
}
|
||||
|
||||
|
||||
}else {
|
||||
msg = "找不到相应入库整理记录!";
|
||||
}
|
||||
status = "0";
|
||||
data="[]";
|
||||
}
|
||||
//完成行数大于0;
|
||||
if(array.size()==0) {
|
||||
if(list.size()>0) {
|
||||
if(ah<list.size()) {
|
||||
if(type.equals("2")) {
|
||||
if(wcshh<shh) {
|
||||
status = "0";
|
||||
msg = "非序列号未整理完成";
|
||||
}
|
||||
}else if(type.equals("1")) {
|
||||
if(xhlhh>wcxhlhh) {
|
||||
msg = "序列号未整理完成";
|
||||
}
|
||||
}
|
||||
}else {
|
||||
status = "0";
|
||||
msg = "已经整理完成";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// }else{
|
||||
// msg = "barCode参数错误或为空!";
|
||||
// }
|
||||
|
|
@ -379,6 +457,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
} finally {
|
||||
session.close();
|
||||
}
|
||||
// logger.info("-----------itemCode-0007--END"+itemcode);
|
||||
resultJson.put("status", status);
|
||||
resultJson.put("data", data);
|
||||
resultJson.put("msg", msg);
|
||||
|
|
@ -885,7 +964,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
if (userId > 0) {
|
||||
if (warehouseId > 0) {
|
||||
if(locode!=null && locode.length()>0){
|
||||
String sql = " select lx.ID as locId,lx.code as locCode,z.id as a_id,z.code as z_code,s.id as s_id "
|
||||
String sql = " select lx.ID as locId,lx.code as locCode,z.id as a_id,z.name as z_code,s.id as s_id "
|
||||
+ " from LOCATION lx "
|
||||
+ " left join ZONE z on z.id=lx.ZONE_ID "
|
||||
+ " left join stowage s on s.id=lx.STOWAGE_ID "
|
||||
|
|
@ -1960,7 +2039,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
+ " left join ASN_DETAIL ad on ad.id=inv.ASN_DETAIL_ID "
|
||||
+ " left join ASN a on a.id=ad.ASN_ID "
|
||||
+ " where 1=1 and (ad.strBill=1 or ad.BE_QUALITY=0) "
|
||||
+ " and upper(stock.LP)=upper('"+stockCode.trim()+"') "
|
||||
+ " and stock.LP='"+stockCode.trim()+"' "
|
||||
+ " and inv.RECEIVED_QUANTITY>0 and inv.BE_MOVED=0 "
|
||||
+ " group by loc.id ";
|
||||
Query query = session.createSQLQuery(sql);
|
||||
|
|
@ -3600,7 +3679,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
|
||||
|
||||
@Override
|
||||
public synchronized JSONObject scanpickItemCode(String taskId,String jhItem,long userId,long warehouseId) {
|
||||
public JSONObject scanpickItemCode(String taskId,String jhItem,long userId,long warehouseId) {
|
||||
JSONObject resultJson = new JSONObject();
|
||||
JSONObject obj = new JSONObject();
|
||||
String status = "0";
|
||||
|
|
@ -5642,12 +5721,13 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
String msg = "";
|
||||
String data = "";
|
||||
try {
|
||||
String sql=" from PrintTask pt where 1=1 ";
|
||||
String sql=" from PrintTask pt where "
|
||||
+ " CONVERT(date, pt.createDate) = CONVERT(date, GETDATE()) ";
|
||||
if(createName!=null&&!createName.equals("")){
|
||||
sql+=" and pt.createName like '%"+createName+"%' ";
|
||||
}
|
||||
if(printTime!=null&&!printTime.equals("")){
|
||||
sql+=" and CONVERT(varchar(100),pt.printTime,21) like '%"+printTime+"%' ";
|
||||
sql+=" and CONVERT(varchar(100),pt.createDate,21) like '%"+printTime+"%' ";
|
||||
}
|
||||
if(printTitle!=null&&!printTitle.equals("")){
|
||||
sql+=" and pt.printTitle like '%"+printTitle+"%' ";
|
||||
|
|
@ -7159,9 +7239,9 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
}
|
||||
String barcode="QAR/"+t.getBillCode()+"/"+ ptd.getLineNumber()+"/"+item.getCode()+"/"+item.getUnit()+"/";
|
||||
barcode += "/" + ymd.format(new Date());
|
||||
// if(lp!=null&&lp.length()>0) {
|
||||
// barcode+="///"+lp;
|
||||
// }
|
||||
if(lp!=null&&lp.length()>0) {
|
||||
barcode+="///"+lp;
|
||||
}
|
||||
String emergent="";
|
||||
if(pt!=null&&bt.getName().indexOf("工单")>=0&&pt.getEquatedQuantity()!=null
|
||||
&&(pt.getEquatedQuantity().equals("H")||pt.getEquatedQuantity().equals("U")
|
||||
|
|
@ -7204,12 +7284,12 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
pickTicketManager.createPrintTask(number, content, userId, macs,printName,t.getBillCode()+"/"+item.getCode(),"0");
|
||||
|
||||
//打印容器码
|
||||
if(zone.getId()==1765&&item.getGoodType().equals("大件")) {
|
||||
if(zone.getId()==1765&&item.getGoodType()!=null&&item.getGoodType().equals("大件")) {
|
||||
pickTicketManager.printLabel(lp, number.intValue(), 1, userId, printId);
|
||||
} else if(zone.getId()==1766) {
|
||||
pickTicketManager.printLabel(lp, number.intValue(), 1, userId, printId);
|
||||
// pickTicketManager.printLabel(lp, number.intValue(), 1, userId, printId);
|
||||
}else if(lp.indexOf("505")==0) {
|
||||
pickTicketManager.printLabel(lp, number.intValue(), 1, userId, printId);
|
||||
// pickTicketManager.printLabel(lp, number.intValue(), 1, userId, printId);
|
||||
}
|
||||
|
||||
if(bt.isBePrint()) {
|
||||
|
|
@ -9060,8 +9140,12 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
t.setMovedQuantityMU(t.getPlanQuantity());
|
||||
commonDao.store(t);
|
||||
ptd.setAllocatedQuantity(ptd.getAllocatedQuantity()-quantity);
|
||||
|
||||
commonDao.store(ptd);
|
||||
pt.setAllocatedQuantity(pt.getAllocatedQuantity()-quantity);
|
||||
if(pt.getAllocatedQuantity()<=pt.getPickedQuantity()) {
|
||||
pt.setStatus(PickTicketStatus.PICK_ALL);
|
||||
}
|
||||
commonDao.store(pt);
|
||||
//取消电子标签任务
|
||||
List<InterWMStask> InterWMStasks = commonDao.findByQuery(" from InterWMStask i where i.taskid='"+t.getCode()+"' ");
|
||||
List<InterWMStask> dzbq = commonDao.findByQuery(" from InterWMStask i where i.ssjport='"+t.getBillCode()+"' ");
|
||||
|
|
@ -9148,7 +9232,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
inventory.getStatus(), inventory.getId(), "取消分配", bt, userId, inventory.getBarCode(),
|
||||
loc,pt.getSourceType());
|
||||
}
|
||||
shuaxinPick(pt);//刷新出库单 分配数量
|
||||
// shuaxinPick(pt);//刷新出库单 分配数量
|
||||
//回传SAP
|
||||
if(returnSap) {
|
||||
if (pt.getCode().indexOf("CP") == -1&&((pt.getSourceId()!=null&&pt.getSourceId().indexOf("OT")== -1)
|
||||
|
|
@ -9637,11 +9721,11 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
//交单拍照
|
||||
public <T extends Entity> void importImageFromApp(Long id,
|
||||
InputStream inputStream, String imageType, String objectType,
|
||||
String fileName, String longName,String remark) {
|
||||
Session session = ((HibernateDaoSupport)this.commonDao).getSessionFactory().openSession();
|
||||
// Session session = ((HibernateDaoSupport)this.commonDao).getSessionFactory().openSession();
|
||||
if (inputStream != null) {
|
||||
SignFile imageFile = new SignFile();
|
||||
String code = "";
|
||||
|
|
@ -9697,7 +9781,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
throw new BusinessException("文件上传出错!");
|
||||
}
|
||||
imageFile.setFileName(fileName);
|
||||
imageFile.processFileUrl(stringBuffer.toString());// 生成带img标签的目标图片的url地址
|
||||
imageFile.processFileUrl(stringBuffer.toString(),"temp/imageTarget/");// 生成带img标签的目标图片的url地址
|
||||
imageFile.setImageType(imageType);//附件类型
|
||||
imageFile.setObjectType(objectType);//对象类型
|
||||
imageFile.setOperate(longName);
|
||||
|
|
@ -9707,9 +9791,9 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
|
|||
// imageFile.setOrderId(objectId);
|
||||
imageFile.setViewName(code);
|
||||
imageFile.setRemark(remark);
|
||||
// imageFile.processFileRemark(stringBuffer.toString());
|
||||
imageFile.processFileRemark(stringBuffer.toString(),"temp/imageTarget/");
|
||||
commonDao.store(imageFile);
|
||||
session.close();
|
||||
// session.close();
|
||||
} else {
|
||||
throw new BusinessException("文件为空!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ import com.dev.swms.server.service.interfaceLog.InterfaceManager;
|
|||
import com.dev.swms.server.service.interfaceLog.InterfaceReqManager;
|
||||
import com.dev.swms.server.service.interfaceLog.JdbcManager;
|
||||
import com.dev.swms.server.service.interfaceLog.WcsCSDCode;
|
||||
import com.dev.swms.server.service.interfaceLog.WmsOperationHisManager;
|
||||
import com.dev.swms.server.service.inventory.InventoryManager;
|
||||
import com.dev.swms.server.service.receiving.PutawayAllocator;
|
||||
import com.dev.swms.server.service.sequence.BussinessCodeManager;
|
||||
|
|
@ -113,12 +114,12 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
|||
protected final JdbcManager jdbcManager;
|
||||
protected final AgvTaskManager agvTaskManager;
|
||||
protected final InterfaceReqManager interfaceReqManager;
|
||||
|
||||
protected final WmsOperationHisManager wmsOperationHisManager;
|
||||
|
||||
|
||||
public DefaultAutoAllocator(ItemManager manager,InventoryManager manager1,
|
||||
BussinessCodeManager manager2, PutawayAllocator allocator,InterfaceManager interfaceManager2,JdbcManager jdbcManager2,AgvTaskManager agvTaskManager,
|
||||
InterfaceReqManager interfaceReqManager) {
|
||||
InterfaceReqManager interfaceReqManager, WmsOperationHisManager wmsOperationHisManager) {
|
||||
itemManager = manager;
|
||||
inventoryManager = manager1;
|
||||
bussinessCodeManager = manager2;
|
||||
|
|
@ -127,6 +128,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
|||
jdbcManager=jdbcManager2;
|
||||
this.agvTaskManager=agvTaskManager;
|
||||
this.interfaceReqManager=interfaceReqManager;
|
||||
this.wmsOperationHisManager=wmsOperationHisManager;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1979,6 +1981,8 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
|||
|
||||
}
|
||||
shuaxinPick(pt);//刷新出库单
|
||||
wmsOperationHisManager.storeOperationHis(pt.getId(), pt.getCode(), null, "", "出库管理", "取消分配", null, null, 0,
|
||||
0, 0, 0, "", "WMS");
|
||||
long etime = System.currentTimeMillis();
|
||||
System.out.printf("取消分配执行时长:"+(etime - stime)+"\n");
|
||||
}
|
||||
|
|
@ -2298,7 +2302,9 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
|||
if(ptd.getNewLotInfo().getPropC1()!=null&&!ptd.getNewLotInfo().getPropC1().equals("")) {
|
||||
hql1+=" and i.itemKey.lotInfo.propC1='"+ptd.getNewLotInfo().getPropC1()+"'";
|
||||
}
|
||||
|
||||
// if(ptd.getNewLotInfo().getPropC2()!=null&&!ptd.getNewLotInfo().getPropC2().equals("")) {
|
||||
// hql1+=" and i.itemKey.lotInfo.propC2='"+ptd.getNewLotInfo().getPropC2()+"'";
|
||||
// }
|
||||
if(ptd.getNewLotInfo().getPropC3()!=null&&!ptd.getNewLotInfo().getPropC3().equals("")) {
|
||||
hql1+=" and i.itemKey.lotInfo.propC3='"+ptd.getNewLotInfo().getPropC3()+"'";
|
||||
}else {
|
||||
|
|
@ -2349,8 +2355,6 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
|||
hql2=" order by i.itemKey.lotInfo.propD2,i.itemKey.lotInfo.propC3,i.itemKey.lotInfo.propC1,"+hqlmaveloc+",i.statuss desc,i.storageDate,i.quantity";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(pt.getBillType()!=null&&(pt.getBillType().getName().indexOf("其它")>=0
|
||||
||pt.getBillType().getName().indexOf("转库单")>=0)
|
||||
&&!pt.getSourceType().equals("643")) {
|
||||
|
|
@ -2371,12 +2375,8 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
|||
}
|
||||
}else if(pt.getBillType()!=null&&pt.getBillType().getName().indexOf("工单")>=0) {
|
||||
if(ptd.getNewLotInfo()!=null&&ptd.getNewLotInfo().getPropC2()!=null
|
||||
&&(!ptd.getNewLotInfo().getPropC2().equals("SL12")&&!ptd.getNewLotInfo().getPropC2().equals("")&&
|
||||
!ptd.getNewLotInfo().getPropC2().equals("SL02")
|
||||
&&!ptd.getNewLotInfo().getPropC2().equals("SL34"))) {
|
||||
|
||||
&&!ptd.getNewLotInfo().getPropC2().equals("")) {
|
||||
hql1+=" and i.itemKey.lotInfo.propC2='"+ptd.getNewLotInfo().getPropC2()+"'";
|
||||
|
||||
}else {
|
||||
String bsql=" from BillTypeConfig b where b.billType.id="+pt.getBillType().getId();
|
||||
if(ptd.getNewLotInfo().getPropC9()!=null&&!ptd.getNewLotInfo().getPropC9().equals("")) {
|
||||
|
|
@ -2889,6 +2889,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
|||
public List<Task> allocatePickticketDetail(List<Long> ids,int qty,boolean ddq,boolean ddq1,boolean ddq2,boolean ddq3,
|
||||
boolean ddq4,boolean ddq5,boolean ddq6,boolean ddq7,boolean ddq8,boolean ddq9,String noLoc) {
|
||||
String msg="";
|
||||
|
||||
List<Task> tasks=new ArrayList<Task>();
|
||||
for (int i = 0; i < ids.size(); i++) {
|
||||
Long id=Long.valueOf(ids.get(i)+"");
|
||||
|
|
@ -2952,6 +2953,9 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
|||
if(ptd.getNewLotInfo().getPropC1()!=null&&!ptd.getNewLotInfo().getPropC1().equals("")) {
|
||||
hql1+=" and i.itemKey.lotInfo.propC1='"+ptd.getNewLotInfo().getPropC1()+"'";
|
||||
}
|
||||
// if(ptd.getNewLotInfo()!=null&&ptd.getNewLotInfo().getPropC2()!=null&&ptd.getNewLotInfo().getPropC2().length()>0) {
|
||||
// hql1+=" and i.itemKey.lotInfo.propC2='"+ptd.getNewLotInfo().getPropC2()+"'";
|
||||
// }
|
||||
if(ptd.getNewLotInfo().getPropC3()!=null&&!ptd.getNewLotInfo().getPropC3().equals("")) {
|
||||
hql1+=" and i.itemKey.lotInfo.propC3='"+ptd.getNewLotInfo().getPropC3()+"'";
|
||||
}else {
|
||||
|
|
@ -3017,14 +3021,14 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo
|
|||
hql1+=" and i.itemKey.lotInfo.propC2 in("+sb.toString()+")";
|
||||
}
|
||||
}else {
|
||||
if(ptd.getNewLotInfo()!=null&&ptd.getNewLotInfo().getPropC2()!=null&&ptd.getNewLotInfo().getPropC2().length()>0) {
|
||||
hql1+=" and i.itemKey.lotInfo.propC2='"+ptd.getNewLotInfo().getPropC2()+"'";
|
||||
}
|
||||
}
|
||||
}else if(pt.getBillType()!=null&&pt.getBillType().getName().indexOf("工单")>=0) {
|
||||
|
||||
if(ptd.getNewLotInfo()!=null&&ptd.getNewLotInfo().getPropC2()!=null
|
||||
&&(!ptd.getNewLotInfo().getPropC2().equals("SL12")&&!ptd.getNewLotInfo().getPropC2().equals("")&&
|
||||
!ptd.getNewLotInfo().getPropC2().equals("SL02")
|
||||
&&!ptd.getNewLotInfo().getPropC2().equals("SL34"))) {
|
||||
&&!ptd.getNewLotInfo().getPropC2().equals("")) {
|
||||
|
||||
hql1+=" and i.itemKey.lotInfo.propC2='"+ptd.getNewLotInfo().getPropC2()+"'";
|
||||
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ public class DefaultMasterBolManager extends DefaultBaseManager implements Maste
|
|||
newASN.setStatus(ASNStatus.ACTIVE);
|
||||
newASN.setUserTracking();
|
||||
newASN.setVehicle(pt.getMasterBOL() != null ? pt.getMasterBOL().getTrailer() : null);
|
||||
newASN.setAsnDetails(new HashSet<ASNDetail>());
|
||||
// newASN.setAsnDetails(new HashSet<ASNDetail>());
|
||||
newASN.setRelatedBill3("DB");
|
||||
int j=0;
|
||||
//对收货单增加明细
|
||||
|
|
@ -296,7 +296,7 @@ public class DefaultMasterBolManager extends DefaultBaseManager implements Maste
|
|||
asnDetail.setPO("");
|
||||
asnDetail.setDock(null);
|
||||
newASN.addASNDetail(asnDetail);
|
||||
asnDetail.setLineNo(newASN.getAsnDetails().size());
|
||||
// asnDetail.setLineNo(newASN.getAsnDetails().size());
|
||||
Double ca=detail.getItem().getCAcoefficient();
|
||||
if(ca==null||ca==0){
|
||||
ca=1d;
|
||||
|
|
|
|||
|
|
@ -1203,15 +1203,10 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
double qty = record.getReceivedQuantity() ;
|
||||
if (StringUtils.isEmpty(record.getMoveDocCode()) && qty != 0) {
|
||||
Item item=record.getItemKey().getItem();
|
||||
// ASNDetail ad=commonDao.load(ASNDetail.class, id);
|
||||
|
||||
// moveDoc.setRelateBillCode(ad.getStrBill7());
|
||||
// commonDao.store(moveDoc);
|
||||
|
||||
if((item.getSuggest()>0)&&record.getSrcLP()==null){
|
||||
int ca=item.getCAcoefficient()==null?1:item.getCAcoefficient().intValue();
|
||||
// if(!asn.getCompany().getCode().equals(CompanyCode.HLX)){
|
||||
// ca=item.getSuggest()*ca;
|
||||
// }
|
||||
|
||||
int i=(int) ((int)qty/ca);
|
||||
for(int j=0;j<i;j++){
|
||||
createDetail(moveDoc, record, ca+0d);
|
||||
|
|
@ -2331,6 +2326,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
public void receiveGoods(List<Long> asnDetailIds, Date receiveDate1,
|
||||
Long workerId,long dock_id,Long zone_id,double receivedQuantity,long stockId,
|
||||
Long pqty,String mac,String statusDes,boolean agv) throws Exception{
|
||||
logger.info(asnDetailIds+"--整理11+"+new Date());
|
||||
for(Long id:asnDetailIds){//循环整理(收货)
|
||||
ASNDetail asnDetail=this.load(ASNDetail.class, id);//根据整理的这条数据获取它所有的明细
|
||||
ASN asn=commonDao.load(ASN.class, asnDetail.getAsn().getId());
|
||||
|
|
@ -2348,15 +2344,20 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
//库区限制LOC,
|
||||
if(asnDetail.getLotInfo()!=null&&asnDetail.getLotInfo().getPropC2()!=null) {
|
||||
String pr2=asnDetail.getLotInfo().getPropC2();
|
||||
String wahql=" from ZonePlant z where z.area.id="+zone_id ;
|
||||
List<ZonePlant> zplist=commonDao.findByQuery(wahql);
|
||||
for(ZonePlant zp:zplist) {
|
||||
if(zp.getpLocation().getCode().equals(pr2)) {
|
||||
throw new BusinessException(pr2+"不能整理到"+warehouseArea.getName());
|
||||
}
|
||||
String wahql="select z.pLocation.code from ZonePlant z "
|
||||
+ "where z.area.id="+zone_id ;
|
||||
List<String> zplist=commonDao.findByQuery(wahql);
|
||||
if(zplist.contains(pr2)) {
|
||||
throw new BusinessException(pr2+"不能整理到"+warehouseArea.getName());
|
||||
}
|
||||
// for(ZonePlant zp:zplist) {
|
||||
// if(zp.getpLocation().getCode().equals(pr2)) {
|
||||
// throw new BusinessException(pr2+"不能整理到"+warehouseArea.getName());
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
logger.info(asnDetailIds+"--整理12+"+new Date());
|
||||
Stock stock=commonDao.load(Stock.class, stockId);
|
||||
Location location=null;
|
||||
location=this.load(Location.class, dock_id);//库位
|
||||
|
|
@ -2379,6 +2380,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
}
|
||||
}
|
||||
}
|
||||
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) {
|
||||
|
|
@ -2423,18 +2425,19 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
}
|
||||
}
|
||||
}
|
||||
logger.info(asnDetailIds+"--整理14+"+new Date());
|
||||
//判断该容器已有其它库区物料
|
||||
int count=queryConWare(stockId, zone_id);
|
||||
if(count==1){
|
||||
throw new BusinessException("该容器已有其它库区物料!");
|
||||
}
|
||||
|
||||
logger.info(asnDetailIds+"--整理15+"+new Date());
|
||||
//判断不同LOC不能存到一个容器里面
|
||||
if(asnDetail.getLotInfo().getPropC2()!=null&&asnDetail.getLotInfo().getPropC2().length()>0){
|
||||
/**if(asnDetail.getLotInfo().getPropC2()!=null&&asnDetail.getLotInfo().getPropC2().length()>0){
|
||||
if(!checkLoc(asnDetail, stockId)){
|
||||
throw new BusinessException("该容器不能存放不同的LOC!");
|
||||
}
|
||||
}
|
||||
} 2025-05-06注释*/
|
||||
ItemKey itemKey = itemManager.getItemKey(new ItemKey(
|
||||
"", item, asnDetail.getLotInfo(), new Date(), ""), Boolean.TRUE);
|
||||
|
||||
|
|
@ -2454,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());
|
||||
ReceivedRecord receivedRecord=asnDetail.newreceiving(location, itemKey, receivedQuantity,receivedQuantity,new Date(), opertion_name,warehouseArea);
|
||||
receivedRecord.setWarehouseArea(warehouseArea);
|
||||
receivedRecord.setSrcLPCode(statusDes);
|
||||
|
|
@ -2464,11 +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());
|
||||
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());
|
||||
if (inv == null) {
|
||||
inv = new Inventory();//EntityFactory.getEntity(Inventory.class);
|
||||
inv.setLocation(location);
|
||||
|
|
@ -2501,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());
|
||||
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());
|
||||
|
|
@ -2523,7 +2527,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
asnDetail.setWarehouseArea(warehouseArea);
|
||||
asnDetail.getshaxin();
|
||||
commonDao.store(asnDetail);
|
||||
|
||||
logger.info(asnDetailIds+"--整理111+"+new Date());
|
||||
if(asn.getReceivedQuantity()==0){
|
||||
asn.setStatus(ASNStatus.OPEN);
|
||||
}else if(asn.getReceivedQuantity()<asn.getExpectedQuantity()&&asn.getReceivedQuantity()!=0){
|
||||
|
|
@ -2536,11 +2540,11 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
asn.setAccomplish(0);
|
||||
}
|
||||
List<ASNDetail> asnDetails = commonDao.findByQuery(" from ASNDetail ad where ad.beInput=true and ad.asn.id="+asn.getId());
|
||||
asn.setAccomplish(asnDetails.size());
|
||||
asn.setAccomplish(asnDetails.size());//完成行数
|
||||
}
|
||||
|
||||
logger.info(asnDetailIds+"--整理112+"+new Date());
|
||||
updateStock(stockId);//刷新热度值
|
||||
|
||||
logger.info(asnDetailIds+"--整理113+"+new Date());
|
||||
//生成打印任务
|
||||
if(item.isBOM()||item.isBeExtend1()||item.isBeExtend2()||(item.getFeeType()!=null&&item.getFeeType().equals("OA"))) {
|
||||
//设备
|
||||
|
|
@ -2603,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());
|
||||
//上报SAP状态
|
||||
if(!asn.getCode().substring(0, 2).equals("RP")) {
|
||||
|
||||
|
|
@ -2618,6 +2622,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
}
|
||||
|
||||
}
|
||||
logger.info(asnDetailIds+"--整理116+"+new Date());
|
||||
commonDao.store(asn);
|
||||
|
||||
List<Long> asnids=new ArrayList<Long>();
|
||||
|
|
@ -2628,16 +2633,14 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
}else {
|
||||
List<ASNDetail> asds =commonDao.findByQuery(" from ASNDetail a where a.asn.id="+asn.getId()+
|
||||
" and ((a.bequality=1 and a.strBill=1) or a.bequality=0 ) ");
|
||||
if(asds.size()==asn.getAsnDetails().size()) {
|
||||
// createMoveDocByASN(asnids);
|
||||
}else {
|
||||
|
||||
List<ASNDetail> asnds =commonDao.findByQuery(" from ASNDetail a where a.asn.id="+asn.getId()+
|
||||
" and a.expectedQuantity=a.receivedQuantity "
|
||||
+ " and ((a.bequality=1 and a.strBill=1) or a.bequality=0 ) ");
|
||||
if(asds.size()==asnds.size()) {
|
||||
createMoveDocByASN(asnids);
|
||||
}
|
||||
}
|
||||
|
||||
if(asnDetail.getStrBill11()!=null&&asnDetail.getStrBill11().equals("1")) {
|
||||
if(asnDetail.getBf_qty()<=asnDetail.getReceivedQuantity()) {
|
||||
createMoveDocByASN(asnids);
|
||||
|
|
@ -2650,6 +2653,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
location.setStatus(WarehouseAreaStatus.OCCUPY);
|
||||
commonDao.store(location);
|
||||
}
|
||||
logger.info(asnDetailIds+"--整理117+"+new Date());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2731,16 +2735,16 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
}
|
||||
|
||||
public void updateStock(Long stockId) {
|
||||
logger.info("");
|
||||
Stock s =commonDao.load(Stock.class, stockId);
|
||||
List<Inventory> invs =commonDao.findByQuery(" from Inventory i where i.location.stock.id="+stockId);
|
||||
/**2025-05-06注释
|
||||
List<Inventory> invs =commonDao.findByQuery("select sum(i.) from Inventory i where i.location.stock.id="+stockId);
|
||||
double saleTime=0D;
|
||||
for(Inventory inv:invs) {
|
||||
ItemKey ik=commonDao.load(ItemKey.class, inv.getItemKey().getId());
|
||||
Item i=commonDao.load(Item.class, ik.getItem().getId());
|
||||
saleTime+=i.getSaleTime();
|
||||
}
|
||||
s.setSaleTime((int)Math.ceil(saleTime));
|
||||
s.setSaleTime((int)Math.ceil(saleTime));*/
|
||||
s.setStatus(WarehouseAreaStatus.OCCUPY);
|
||||
commonDao.store(s);
|
||||
logger.info("热度值:"+s.getSaleTime());
|
||||
|
|
@ -4020,6 +4024,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
}
|
||||
|
||||
public void storeReceivedRecord(List<Long> ids,Long zoneid,Boolean movementId,Long stockId ,Long locationId) {
|
||||
logger.info("-----------ReceivedRecord-0001"+ids);
|
||||
WarehouseArea z=commonDao.load(WarehouseArea.class, zoneid);//获取库区
|
||||
Stock stock=commonDao.load(Stock.class, stockId);//获取容器
|
||||
Location loc=null;
|
||||
|
|
@ -4031,6 +4036,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
|
||||
List<ReceivedRecord> receivedRecords=commonDao.findByQuery(" from ReceivedRecord "
|
||||
+ "receivedrecord where receivedrecord.beMoved=0 and receivedrecord.srcLP.LP='"+stock.getLP()+"' ");//根据这个容器号获取这个容器号的所有数据
|
||||
logger.info("-----------ReceivedRecord-0002"+ids);
|
||||
if(receivedRecords.size()>0) {
|
||||
ReceivedRecord rd=receivedRecords.get(0);
|
||||
if(!rd.getWarehouseArea().getName().equals(z.getName())) {
|
||||
|
|
@ -4040,8 +4046,8 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
|
||||
}
|
||||
ReceivedRecord r=commonDao.load(ReceivedRecord.class, id);//根据id或者该行数据
|
||||
ItemKey itemKey=r.getItemKey();
|
||||
|
||||
// ItemKey itemKey=r.getItemKey();
|
||||
logger.info("-----------ReceivedRecord-0003"+ids);
|
||||
if(z.getId()==1763) {
|
||||
if(locationId==null||locationId==0) {
|
||||
throw new BusinessException("料箱区,库位不能为空");
|
||||
|
|
@ -4052,6 +4058,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
}
|
||||
//查询库存
|
||||
Inventory srcInv =null;
|
||||
logger.info("-----------ReceivedRecord-0004"+ids);
|
||||
List<Inventory> Inventorys=commonDao.findByQuery(" from Inventory inv where inv.receivedRecordId="+r.getId()+" ");
|
||||
if(Inventorys.size()>0){
|
||||
srcInv=Inventorys.get(0);
|
||||
|
|
@ -4077,6 +4084,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
r.setSrcLPCode(stock.getLP());
|
||||
}
|
||||
r.setWarehouseArea(z);
|
||||
logger.info("-----------ReceivedRecord-0005"+ids);
|
||||
List<MoveDocDetail> MoveDocDetails=commonDao.findByQuery(" from MoveDocDetail mdd where mdd.receivedRecordId="+r.getId()+" ");
|
||||
if(MoveDocDetails.size()>0){
|
||||
MoveDocDetail mdd=MoveDocDetails.get(0);
|
||||
|
|
@ -4092,7 +4100,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
}
|
||||
}
|
||||
commonDao.store(r);
|
||||
|
||||
logger.info("-----------ReceivedRecord-0006"+ids);
|
||||
}else{
|
||||
ReceivedRecord r=commonDao.load(ReceivedRecord.class, id);//根据id或者该行数据
|
||||
List<ReceivedRecord> ReceivedRecords=commonDao.findByQuery(" from ReceivedRecord "
|
||||
|
|
@ -4155,6 +4163,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) {
|
|||
}else{
|
||||
throw new BusinessException("料箱内由已上架物料,不能转换");
|
||||
}
|
||||
logger.info("-----------ReceivedRecord-0008"+ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2532,7 +2532,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
|||
String px_sql = " order by l.gdType asc ";
|
||||
//库位高度
|
||||
if (st.getGdType().equals(TranType.gd_d)) {
|
||||
sql += " and 1=1 and l.gdType in('1','2') ";
|
||||
sql += " and 1=1 and l.gdType in('1','2','3') ";
|
||||
} else if (st.getGdType().equals(TranType.gd_z)) {
|
||||
sql += " and l.gdType !='1' ";
|
||||
} else if (st.getGdType().equals(TranType.gd_g)) {
|
||||
|
|
@ -3357,7 +3357,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
|||
String sql = " from LocationStorage l where l.warehouseArea.id=1766 and l.sqType=1 "
|
||||
+ " and l.type='存储点' and l.status='" + WarehouseAreaStatus.FREE + "' and l.gdType>="
|
||||
+ qwl.getGdType() + " and l.id!=" + qwl.getId();
|
||||
String px_sql = "order by l.gdType asc ";
|
||||
String px_sql = " order by l.gdType asc ";
|
||||
List<LocationStorage> lsq2 = this.commonDao.findByQuery(sql + px_sql);
|
||||
if (lsq2.size() <= 0) {
|
||||
throw new BusinessException("不存在合适的库位");
|
||||
|
|
@ -4800,11 +4800,11 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
|||
String px_sql = " order by l.gdType asc ";
|
||||
//库位高度
|
||||
if (st.getGdType().equals(TranType.gd_d)) {
|
||||
sql += " and 1=1 and l.gdType=1 ";
|
||||
sql += " and 1=1 ";
|
||||
} else if (st.getGdType().equals(TranType.gd_z)) {
|
||||
sql += " and l.gdType =2 ";
|
||||
sql += " and l.gdType !='1' ";
|
||||
} else if (st.getGdType().equals(TranType.gd_g)) {
|
||||
sql += " and l.gdType =3 ";
|
||||
sql += " and l.gdType ='3' ";
|
||||
}
|
||||
// sql += " and l.name in ('01-02-01','02-02-01','03-02-01','04-02-01') ";
|
||||
if (st.getLocationStorage()!=null) {
|
||||
|
|
@ -5436,7 +5436,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
|||
//浅位托盘有任务
|
||||
LibraryTask t1 = interfaceReqManager.storeLibraryTask(LibraryTaskType.byzl,
|
||||
LibraryTaskType.yk, qws.getLP(), qwl.getName(), lq2.getName(), libraryTask.getId()+"", seq++,
|
||||
null,"出库","1");
|
||||
null,"出库",libraryTask.getRelatedBill4());
|
||||
t1.setSeq(ttt1.getSeq()+1);
|
||||
t1.setRelationCode(ttt1.getRelationCode());
|
||||
commonDao.store(t1);
|
||||
|
|
@ -5454,13 +5454,13 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
|||
// 1 浅位搬到浅位
|
||||
LibraryTask t1 = interfaceReqManager.storeLibraryTask(LibraryTaskType.byzl,
|
||||
LibraryTaskType.yk, qws3.getLP(), qwl3.getName(), lq2.getName(), libraryTask.getId()+"", seq++,
|
||||
null,"出库","1");
|
||||
null,"出库",libraryTask.getRelatedBill4());
|
||||
|
||||
listTasks.add(t1);
|
||||
|
||||
LibraryTask t2 = interfaceReqManager.storeLibraryTask(LibraryTaskType.byzl,
|
||||
LibraryTaskType.yk, qws.getLP(), qwl.getName(), qwl3.getName(), libraryTask.getId()+"", seq++,
|
||||
null,"出库","1");
|
||||
null,"出库",libraryTask.getRelatedBill4());
|
||||
t2.setSeq(t1.getSeq()+1);
|
||||
t2.setRelationCode(t1.getRelationCode());//
|
||||
commonDao.store(t2);
|
||||
|
|
@ -5479,7 +5479,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
|||
//浅位托盘没有任务
|
||||
LibraryTask t1 = interfaceReqManager.storeLibraryTask(LibraryTaskType.byzl,
|
||||
LibraryTaskType.yk, qws.getLP(), qwl.getName(), lq2.getName(), libraryTask.getId()+"", seq++,
|
||||
null,"出库","1");
|
||||
null,"出库",libraryTask.getRelatedBill4());
|
||||
|
||||
listTasks.add(t1);
|
||||
|
||||
|
|
@ -5495,7 +5495,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc
|
|||
// 1 浅位搬到浅位
|
||||
LibraryTask t1 = interfaceReqManager.storeLibraryTask(LibraryTaskType.byzl,
|
||||
LibraryTaskType.yk, qws.getLP(), qwl.getName(), lq2.getName(), libraryTask.getId()+"", seq++,
|
||||
null,"出库","1");
|
||||
null,"出库",libraryTask.getRelatedBill4());
|
||||
|
||||
listTasks.add(t1);
|
||||
|
||||
|
|
|
|||
|
|
@ -1444,69 +1444,95 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements
|
|||
List<String> lx_codes=new ArrayList<String>();
|
||||
List<String> hj_codes=new ArrayList<String>();
|
||||
List<String> lk_codes=new ArrayList<String>();
|
||||
String shl="";
|
||||
if (lx1) {
|
||||
lx_codes.add("201");
|
||||
shl+="'201',";
|
||||
}
|
||||
if (lx2) {
|
||||
lx_codes.add("202");
|
||||
shl+="'202',";
|
||||
}
|
||||
if (lx3) {
|
||||
lx_codes.add("203");
|
||||
shl+="'203',";
|
||||
}
|
||||
if (lx4) {
|
||||
lx_codes.add("204");
|
||||
shl+="'204',";
|
||||
}
|
||||
if (lx5) {
|
||||
lx_codes.add("205");
|
||||
shl+="'205',";
|
||||
}
|
||||
if (lx6) {
|
||||
lx_codes.add("206");
|
||||
shl+="'206',";
|
||||
}
|
||||
if (lx7) {
|
||||
lx_codes.add("207");
|
||||
shl+="'207',";
|
||||
}
|
||||
if (lx8) {
|
||||
lx_codes.add("208");
|
||||
shl+="'208',";
|
||||
}
|
||||
if (lx9) {
|
||||
lx_codes.add("209");
|
||||
shl+="'209',";
|
||||
}
|
||||
if (lx10) {
|
||||
lx_codes.add("210");
|
||||
shl+="'210',";
|
||||
}
|
||||
if (lx11) {
|
||||
lx_codes.add("211");
|
||||
shl+="'211',";
|
||||
}
|
||||
if (lx12) {
|
||||
lx_codes.add("212");
|
||||
shl+="'212',";
|
||||
}
|
||||
if (lx13) {
|
||||
lx_codes.add("213");
|
||||
shl+="'213',";
|
||||
}
|
||||
if (lx14) {
|
||||
lx_codes.add("214");
|
||||
shl+="'214',";
|
||||
}
|
||||
if (lx15) {
|
||||
lx_codes.add("215");
|
||||
shl+="'215',";
|
||||
}
|
||||
if (hj1) {
|
||||
hj_codes.add("101");
|
||||
shl+="'101',";
|
||||
}
|
||||
if (hj2) {
|
||||
hj_codes.add("102");
|
||||
shl+="'102',";
|
||||
}
|
||||
if (hj3) {
|
||||
hj_codes.add("103");
|
||||
shl+="'103',";
|
||||
}
|
||||
if (hj4) {
|
||||
hj_codes.add("104");
|
||||
shl+="'104',";
|
||||
}
|
||||
if (hj5) {
|
||||
hj_codes.add("105");
|
||||
shl+="'105',";
|
||||
}
|
||||
if (hj6) {
|
||||
hj_codes.add("106");
|
||||
shl+="'106',";
|
||||
}if (hj7) {
|
||||
hj_codes.add("107");
|
||||
shl+="'107',";
|
||||
}
|
||||
|
||||
if (lk1) {
|
||||
lk_codes.add("601");
|
||||
}
|
||||
|
|
@ -1522,6 +1548,26 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements
|
|||
if (lk5) {
|
||||
lk_codes.add("605");
|
||||
}
|
||||
if(shl.length()>1) {
|
||||
shl=shl.substring(0, shl.length()-1);
|
||||
// List<String> agvTasktypes = commonDao.findByQuery("select t.endRegion from Task t "
|
||||
// + " where t.agvTask.beIssue=true "
|
||||
// + " and t.agvTask.classification not in ('拣货') "
|
||||
// + " and t.agvTask.status in ('ATPICK','ATCALL','ATWAIT','ATWORK') "
|
||||
// + " and t.endRegion in ("+shl+") group by t.endRegion "
|
||||
// );
|
||||
List<String> agvTasktypes = commonDao.findByQuery("select agvTask.targetArea from AgvTask agvTask "
|
||||
+ " where agvTask.beIssue=true "
|
||||
+ " and agvTask.classification not in ('拣货') "
|
||||
+ " and agvTask.status in ('ATPICK','ATCALL','ATWAIT','ATWORK') "
|
||||
+ " and agvTask.targetArea in ("+shl+") group by agvTask.targetArea "
|
||||
);
|
||||
if(agvTasktypes.size()>0) {
|
||||
throw new BusinessException(agvTasktypes.toString()+"有其它任务");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 得到工作站剩余任务行数
|
||||
Map<String, Integer> gzz_maps = gzzCount(waveDoc.getCode());// 所有工作站没完成的任务
|
||||
|
|
|
|||
|
|
@ -1275,9 +1275,14 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
|||
}
|
||||
|
||||
public void activeAll(List<Long> pickTicketIds) {
|
||||
synchronized (DefaultWaveDocManager.class) {
|
||||
// synchronized (DefaultWaveDocManager.class) {
|
||||
String errMsg = "";
|
||||
|
||||
Date date=new Date();
|
||||
// 1000*60*20,小于20分钟。
|
||||
if(!DefaultWaveDocManager.hotWave&&date.getTime()-DefaultWaveDocManager.hotWaveDate.getTime()<1200000) {
|
||||
throw new BusinessException("其他人正在创建波次,请稍后");
|
||||
}
|
||||
DefaultWaveDocManager.hotWave=false;
|
||||
for (Long id : pickTicketIds) {
|
||||
PickTicket pt = commonDao.load(PickTicket.class, id);
|
||||
errMsg += autoAllocator.allocatePickticket(pt);
|
||||
|
|
@ -1293,14 +1298,15 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
|||
}else {
|
||||
logger.info(pt.getCode()+"自动分配,无回传状态");
|
||||
}
|
||||
|
||||
shuaxinPick(pt);//刷新订单
|
||||
wmsOperationHisManager.storeOperationHis(pt.getId(), pt.getCode(), null, "", "出库管理", "自动分配", null, null, 0,
|
||||
0, 0, 0, "", "WMS");
|
||||
|
||||
}
|
||||
DefaultWaveDocManager.hotWave=true;
|
||||
DefaultWaveDocManager.hotWaveDate=DateUtil.formatStrToDateYMD("2023-02-02");
|
||||
LocalizedMessage.addLocalizedMessage(errMsg);
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
public List<Task> activePickTicketDetail(
|
||||
|
|
@ -2129,31 +2135,31 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void createPackageByASN(ASN asn, BOL bol) {
|
||||
for (ASNDetail detail : asn.getAsnDetails()) {
|
||||
Package pkg = new Package();
|
||||
pkg.setBol(bol);
|
||||
pkg.setCode(bussinessCodeManager.generatePackage());
|
||||
pkg.setDescription(detail.getItem().getName());
|
||||
pkg.setUnit(detail.getPackageUnit().getUnit());
|
||||
pkg.setQuantity(detail.getExpectedQuantity());
|
||||
pkg.setType(ProductPackageUnit.CASE);
|
||||
pkg.setDetails(new HashSet<PackageDetail>());
|
||||
|
||||
ItemKey itemKey = itemManager.getItemKey(
|
||||
new ItemKey("", detail.getItem(), detail.getLotInfo(), asn.getUpdateTime(), asn.getCode()),
|
||||
Boolean.FALSE);
|
||||
|
||||
PackageDetail pkgDetail = new PackageDetail();
|
||||
pkgDetail.setPkg(pkg);
|
||||
pkgDetail.setItemKey(itemKey);
|
||||
pkgDetail.setPackageUnit(detail.getPackageUnit());
|
||||
pkgDetail.setQuantity(1);
|
||||
pkg.getDetails().add(pkgDetail);
|
||||
bol.getPackages().add(pkg);
|
||||
|
||||
pkgDetail.refresh();
|
||||
commonDao.store(bol);
|
||||
}
|
||||
// for (ASNDetail detail : asn.getAsnDetails()) {
|
||||
// Package pkg = new Package();
|
||||
// pkg.setBol(bol);
|
||||
// pkg.setCode(bussinessCodeManager.generatePackage());
|
||||
// pkg.setDescription(detail.getItem().getName());
|
||||
// pkg.setUnit(detail.getPackageUnit().getUnit());
|
||||
// pkg.setQuantity(detail.getExpectedQuantity());
|
||||
// pkg.setType(ProductPackageUnit.CASE);
|
||||
// pkg.setDetails(new HashSet<PackageDetail>());
|
||||
//
|
||||
// ItemKey itemKey = itemManager.getItemKey(
|
||||
// new ItemKey("", detail.getItem(), detail.getLotInfo(), asn.getUpdateTime(), asn.getCode()),
|
||||
// Boolean.FALSE);
|
||||
//
|
||||
// PackageDetail pkgDetail = new PackageDetail();
|
||||
// pkgDetail.setPkg(pkg);
|
||||
// pkgDetail.setItemKey(itemKey);
|
||||
// pkgDetail.setPackageUnit(detail.getPackageUnit());
|
||||
// pkgDetail.setQuantity(1);
|
||||
// pkg.getDetails().add(pkgDetail);
|
||||
// bol.getPackages().add(pkg);
|
||||
//
|
||||
// pkgDetail.refresh();
|
||||
// commonDao.store(bol);
|
||||
// }
|
||||
}
|
||||
|
||||
// 根据参数创建好包箱
|
||||
|
|
@ -4218,7 +4224,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
|||
srcInv.setSOI(task.getBillCode());
|
||||
srcInv.setQuantity(pickedQuantity);
|
||||
srcInv.setQueuedQuantity(0);
|
||||
srcInv.setVersion(srcInv.getVersion());
|
||||
// srcInv.setVersion(srcInv.getVersion());
|
||||
srcInv.setTaskid(task.getId());
|
||||
if(wa!=null&&(wa.getLevels()==0||!wa.isBeBill())) {
|
||||
srcInv.setStatus("合单完成");
|
||||
|
|
@ -5943,7 +5949,9 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
|||
jsonobj2.put("LGBKZ", kuqu);
|
||||
array.add(jsonobj2);
|
||||
jsonobj.put("INPUT", array);
|
||||
interfaceReqManager.doWmsReqSap(getPropertiesParm("ldxt.SAP")+ApiURL.doWmsReqSap, jsonobj.toString(),"物料信息");
|
||||
if(getPropertiesParm("ldxt.bz").equals("1")) {
|
||||
interfaceReqManager.doWmsReqSap(getPropertiesParm("ldxt.SAP")+ApiURL.doWmsReqSap, jsonobj.toString(),"物料信息");
|
||||
}
|
||||
wmsOperationHisManager.storeOperationHis(item.getId(), item.getCode(), null, "", "物料信息", "回传", null, null,
|
||||
0, 0, 0, 0, "", "WMS");
|
||||
}
|
||||
|
|
@ -7279,9 +7287,9 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
|||
String barcode = "QAR/" + t.getBillCode() + "/" + ptd.getLineNumber() + "/" + item.getCode() + "/"
|
||||
+ item.getUnit() + "/";
|
||||
barcode += "/" + ymd.format(new Date());
|
||||
// if(dstLP!=null) {
|
||||
// barcode+="///"+dstLP.getLP();
|
||||
// }
|
||||
if(dstLP!=null) {
|
||||
barcode+="///"+dstLP.getLP();
|
||||
}
|
||||
logger.info(barcode);
|
||||
macs = printEquipment == null ? "" : printEquipment.getMac();
|
||||
printName = printEquipment == null ? "" : printEquipment.getPrintName();
|
||||
|
|
@ -9705,6 +9713,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
|||
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
|
||||
|
|
@ -9716,7 +9725,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
|||
//容器单总任务数
|
||||
List<Long> countTasks=new ArrayList<Long>();
|
||||
|
||||
|
||||
//判断是否在交单区,
|
||||
if(dstLoc.getZone().getId()==1787L){
|
||||
// List<Long> ids=new ArrayList<Long>();
|
||||
//去空格
|
||||
|
|
@ -9724,20 +9733,25 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
|||
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);
|
||||
//查询所有拣货任务
|
||||
List<Task> tasks=commonDao.findByQuery(hql1);
|
||||
|
||||
int ka=0;
|
||||
|
||||
for(Task t1:tasks) {
|
||||
PickTicketDetail ptd=commonDao.load(PickTicketDetail.class, t1.getPickTicketDetail().getId());
|
||||
if(ka==0) {
|
||||
//起点库位
|
||||
Location stloc=commonDao.load(Location.class, t1.getDstLoc().getId());
|
||||
if(ka==0) {
|
||||
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()+""
|
||||
|
|
@ -9754,6 +9768,11 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
|
|||
&&!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("加急交单位不能放货架");
|
||||
}
|
||||
}
|
||||
String m="";//PDA提示信息
|
||||
|
||||
|
|
|
|||
|
|
@ -75,9 +75,9 @@ public class DefaultTaskIssuedManager extends DefaultBaseManager implements Task
|
|||
boolean lx213, boolean lx214, boolean lx215, boolean hj101, boolean hj102, boolean hj103, boolean hj104,
|
||||
boolean hj105, boolean hj106, boolean hj107, boolean lk601, boolean lk602, boolean lk603, boolean lk604,
|
||||
boolean lk605, String des) {
|
||||
if(waveDocTask(pickTicketId)) {
|
||||
throw new BusinessException("该单号已经在波次中,不能单独下发!");
|
||||
}
|
||||
// if(waveDocTask(pickTicketId)) {
|
||||
// throw new BusinessException("该单号已经在波次中,不能单独下发!");
|
||||
// }
|
||||
if(upapickticket(pickTicketId)) {
|
||||
throw new BusinessException("该单号未全部分配,不能单独下发!");
|
||||
}
|
||||
|
|
@ -226,6 +226,7 @@ public class DefaultTaskIssuedManager extends DefaultBaseManager implements Task
|
|||
task.setStrBill1(UserHolder.getUser().getName());
|
||||
task.setDateBill1(new Date());
|
||||
task.setAgvStatus(1);
|
||||
task.setWaveDoc(null);
|
||||
commonDao.store(task);
|
||||
}
|
||||
}
|
||||
|
|
@ -404,6 +405,7 @@ public class DefaultTaskIssuedManager extends DefaultBaseManager implements Task
|
|||
task.setStrBill1(UserHolder.getUser().getName());
|
||||
task.setDateBill1(new Date());
|
||||
task.setAgvStatus(1);
|
||||
task.setWaveDoc(null);
|
||||
commonDao.store(task);
|
||||
}
|
||||
}
|
||||
|
|
@ -481,6 +483,7 @@ public class DefaultTaskIssuedManager extends DefaultBaseManager implements Task
|
|||
task.setStrBill1(UserHolder.getUser().getName());
|
||||
task.setDateBill1(new Date());
|
||||
task.setAgvStatus(1);
|
||||
task.setWaveDoc(null);
|
||||
commonDao.store(task);
|
||||
}
|
||||
}
|
||||
|
|
@ -512,6 +515,7 @@ public class DefaultTaskIssuedManager extends DefaultBaseManager implements Task
|
|||
task.setDateBill1(new Date());
|
||||
task.setYc_qty(task.getPlanQuantityMU());//下发数量
|
||||
task.setAgvStatus(1);
|
||||
task.setWaveDoc(null);
|
||||
commonDao.store(task);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2422,14 +2422,13 @@ public class DefaultWaveDocManager extends DefaultBaseManager implements
|
|||
@Override
|
||||
public void hotWaveDoc(Date date1,Date date2 ,Integer longtiem,Integer lxqQty,Integer hjqQty,Integer lkqQty,boolean ddq,String pickCode
|
||||
,boolean ddq1,boolean ddq2,boolean ddq3,boolean ddq4,boolean ddq5,boolean ddq6,boolean ddq7,boolean ddq8,boolean ddq9,Integer taskQty,boolean beUrgent) {
|
||||
synchronized (DefaultWaveDocManager.class) {
|
||||
// synchronized (DefaultWaveDocManager.class) {
|
||||
|
||||
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
|
||||
// SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date date=new Date();
|
||||
logger.info(date);
|
||||
// 1000*60*20,小于20分钟。
|
||||
if(!hotWave&&date.getTime()-hotWaveDate.getTime()<1200000) {
|
||||
throw new BusinessException("其它人正在创建波次,请稍后");
|
||||
throw new BusinessException("其他人正在创建波次,请稍后");
|
||||
}
|
||||
hotWave=false;
|
||||
List<Long> PickTicketDetailIds=null;
|
||||
|
|
@ -2494,10 +2493,10 @@ public class DefaultWaveDocManager extends DefaultBaseManager implements
|
|||
+ " where 1=1 and ptd.newLotInfo.propC2 not in("+hqlmave+") "
|
||||
+ " and ptd.pickTicket.billType.name='工单出库' ";
|
||||
if(date1==null){
|
||||
sql2+=" and CONVERT(varchar(100),ptd.pickTicket.orderDate, 23)<='"+sdf.format(date2)+"' ";
|
||||
sql2+=" and CONVERT(varchar(100),ptd.pickTicket.orderDate, 23)<='"+DateUtil.formatDateYMDToStr(date2)+"' ";
|
||||
}else{
|
||||
sql2+= " and CONVERT(varchar(100),ptd.pickTicket.orderDate, 23)>='"+sdf.format(date1)+"' ";
|
||||
sql2+= " and CONVERT(varchar(100),ptd.pickTicket.orderDate, 23)<='"+sdf.format(date2)+"' ";
|
||||
sql2+= " and CONVERT(varchar(100),ptd.pickTicket.orderDate, 23)>='"+DateUtil.formatDateYMDToStr(date1)+"' ";
|
||||
sql2+= " and CONVERT(varchar(100),ptd.pickTicket.orderDate, 23)<='"+DateUtil.formatDateYMDToStr(date2)+"' ";
|
||||
}
|
||||
sql2+= " and ptd.orderQuantity>=ptd.allocatedQuantity "
|
||||
+ " and ptd.pickedQuantity=0 and ptd.shippedQuantity=0 "
|
||||
|
|
@ -2703,16 +2702,13 @@ public class DefaultWaveDocManager extends DefaultBaseManager implements
|
|||
pickTicketManager.addTaskToWaveDocDetail(Tasks, date1, date2, longtiem, lxqQty, hjqQty, lkqQty, ddq9, pickCode, taskQty,0);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
hotWave=true;
|
||||
hotWaveDate=sdf.parse("2023-02-02");
|
||||
} catch (ParseException e) {
|
||||
hotWave=true;
|
||||
}
|
||||
hotWaveDate=DateUtil.formatStrToDateYMD("2023-02-02");
|
||||
|
||||
|
||||
// autoAllocator.initiandcallAGV(waveDoc.getId(), lxq, hjq, lkq);//下发任务
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
|
|||
import com.dev.energy.server.dao.CommonDao;
|
||||
import com.dev.energy.server.model.EntityFactory;
|
||||
import com.dev.energy.server.util.DateUtil;
|
||||
import com.dev.energy.server.web.security.UserHolder;
|
||||
import com.dev.swms.server.model.base.ContainerType;
|
||||
import com.dev.swms.server.model.base.Equipment;
|
||||
import com.dev.swms.server.model.base.Item;
|
||||
|
|
@ -140,10 +141,13 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
String type = json.has("type")?json.getString("type"):"1";
|
||||
JSONObject resultJson = new JSONObject();
|
||||
if("scanItemBarCode".equals(methodType)){
|
||||
|
||||
//收货整理查询
|
||||
String asn_code = json.has("asn_code")?json.getString("asn_code"):"";
|
||||
String item_code = json.has("item_code")?json.getString("item_code"):"";
|
||||
// logger.info("-----------itemCode="+item_code+"-0000--OPEN");
|
||||
resultJson=app.scanItemBarCode(asn_code, item_code,type,workerId, wId);
|
||||
// logger.info("-----------itemCode="+item_code+"-0000--END");
|
||||
} else if("scanItemSN".equals(methodType)){
|
||||
//收货整理序列号查询
|
||||
String asn_code = json.has("asn_code")?json.getString("asn_code"):"";
|
||||
|
|
@ -877,7 +881,6 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
ASNDetail ad=commonDao.load(ASNDetail.class, asnDetailId);
|
||||
Item item=commonDao.load(Item.class, ad.getItem().getId());
|
||||
item.setWeight(weight);
|
||||
// item.setSuggest(item.getWeight()/specs);
|
||||
BigDecimal bg1 = new BigDecimal(item.getWeight()/specs);
|
||||
double f2 = bg1.setScale(3, BigDecimal.ROUND_HALF_UP).doubleValue();
|
||||
if(f2<0.001){
|
||||
|
|
@ -952,7 +955,7 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
resultJson.put("msg", msg);
|
||||
return resultJson;
|
||||
}
|
||||
public synchronized JSONObject receiving(String mac,Long pqty,String asnDetailId,String serials,Date receiveDate,long locId,
|
||||
public JSONObject receiving(String mac,Long pqty,String asnDetailId,String serials,Date receiveDate,long locId,
|
||||
long z_id,long s_id,double receivedQuantity,long userId,long warehouseId,CommonDao commonDao,
|
||||
String lp1,String lp2){
|
||||
JSONObject resultJson = new JSONObject();
|
||||
|
|
@ -962,6 +965,10 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
boolean agv=true;
|
||||
if (userId > 0) {
|
||||
if (warehouseId > 0) {
|
||||
logger.info(asnDetailId+"--整理+"+new Date());
|
||||
// List<String> p2s=commonDao.findByQuery("select ad.lotInfo.propC2 from ASNDetail ad "
|
||||
// + "where ad.id in ("+asnDetailId+") group by ad.lotInfo.propC2 ");
|
||||
|
||||
if(z_id==1763&&locId==0) {
|
||||
status = "2";
|
||||
msg = "料箱区,必须扫描料箱格口码!";
|
||||
|
|
@ -978,8 +985,7 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
resultJson.put("data", data);
|
||||
return resultJson;
|
||||
}else {
|
||||
List<String> p2s=commonDao.findByQuery("select ad.lotInfo.propC2 from ASNDetail ad "
|
||||
+ "where ad.id in ("+asnDetailId+") group by ad.lotInfo.propC2 ");
|
||||
/** 2025-05-06注释
|
||||
if(p2s.size()>1) {
|
||||
status = "2";
|
||||
msg = " 容器不能LOC混放! ";
|
||||
|
|
@ -988,6 +994,7 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
resultJson.put("data", data);
|
||||
return resultJson;
|
||||
}
|
||||
*/
|
||||
}
|
||||
Stock stock =commonDao.load(Stock.class, s_id);//容器
|
||||
if(stock!=null) {
|
||||
|
|
@ -1006,9 +1013,11 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
}
|
||||
}
|
||||
}
|
||||
logger.info(asnDetailId+"--整理+"+new Date());
|
||||
/** 2025-05-06注释
|
||||
if(stock!=null) {
|
||||
List<String> p2s=commonDao.findByQuery("select ad.lotInfo.propC2 from ASNDetail ad "
|
||||
+ "where ad.id in ("+asnDetailId+") group by ad.lotInfo.propC2 ");
|
||||
// List<String> p2s=commonDao.findByQuery("select ad.lotInfo.propC2 from ASNDetail ad "
|
||||
// + "where ad.id in ("+asnDetailId+") group by ad.lotInfo.propC2 ");
|
||||
if(p2s.size()>1) {
|
||||
status = "2";
|
||||
msg = " 容器不能LOC混放! ";
|
||||
|
|
@ -1034,6 +1043,7 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
//走序列号收货
|
||||
if(serials!=null&&serials.length()>0){
|
||||
List<String> result = Arrays.asList(serials.split(","));
|
||||
|
|
@ -1077,9 +1087,9 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
msg = "容器码不存在,请重新扫描!";
|
||||
}else {
|
||||
if(z_id==1766) {
|
||||
List<Location> locs=commonDao.findByQuery(" from Location l where l.stock.id="+stock.getId()+" and l.code='"+stock.getLP()+"'");
|
||||
List<Long> locs=commonDao.findByQuery("select l.id from Location l where l.stock.id="+stock.getId()+" and l.code='"+stock.getLP()+"'");
|
||||
if(locs.size()>0) {
|
||||
locId=locs.get(0).getId();
|
||||
locId=locs.get(0);
|
||||
}else {
|
||||
status = "2";
|
||||
msg = "堆垛库,扫描的容器错误!";
|
||||
|
|
@ -1093,6 +1103,7 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
ASNManager asnManager = (ASNManager) ac.getBean("asnManager");
|
||||
List<Long> asnds=new ArrayList<Long>();
|
||||
asnds.add(ad.getId());
|
||||
logger.info(asnDetailId+"--整理+"+new Date());
|
||||
try{
|
||||
asnManager.receiveGoods(asnds, receiveDate, userId, locId, z_id, ad.getExpectedQuantity()-ad.getReceivedQuantity(), s_id,pqty,mac, stock==null?"":stock.getLP(), agv);
|
||||
|
||||
|
|
@ -1111,7 +1122,7 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
}
|
||||
|
||||
}else{
|
||||
|
||||
logger.info(asnDetailId+"--整理1--+"+new Date());
|
||||
Worker w= commonDao.load(Worker.class, userId);
|
||||
List<String> result = Arrays.asList(asnDetailId.split(","));
|
||||
double quantity=0;
|
||||
|
|
@ -1179,7 +1190,7 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
logger.info(asnDetailId+"--整理1--1+"+new Date());
|
||||
ASNManager asnManager = (ASNManager) ac.getBean("asnManager");
|
||||
List<Long> asnds=new ArrayList<Long>();
|
||||
asnds.add(ad.getId());
|
||||
|
|
@ -1258,7 +1269,7 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
asnManager.receiveGoods(asnds, receiveDate, userId, locId, z_id, qty, s_id,pqty, mac,stock==null?"":stock.getLP(), agv);
|
||||
msg="收货成功";
|
||||
status="1";
|
||||
|
||||
logger.info(asnDetailId+"--整理1--2+"+new Date());
|
||||
}catch(Exception e) {
|
||||
msg=e.toString();
|
||||
status="0";
|
||||
|
|
@ -1278,6 +1289,7 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
status = "2";
|
||||
msg = "无用户信息!";
|
||||
}
|
||||
logger.info(asnDetailId+"--整理1--3+"+new Date());
|
||||
resultJson.put("status", status);
|
||||
resultJson.put("msg", msg);
|
||||
resultJson.put("data", data);
|
||||
|
|
@ -1298,6 +1310,8 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
Warehouse warehouse=commonDao.load(Warehouse.class, warehouseId);//仓库
|
||||
if(ad!=null) {
|
||||
ad.setStrBill(true);
|
||||
ad.setRelatedBill5(w.getName());
|
||||
ad.setDeliveryDate(new Date());
|
||||
commonDao.store(ad);
|
||||
status="1";
|
||||
}
|
||||
|
|
@ -1637,26 +1651,56 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
List<Inventory> Inventorys=commonDao.findByQuery(" from Inventory inv where inv.id in ("+invIds.toString()+") ");
|
||||
ItemKey ik=null;
|
||||
Location lc=null;
|
||||
String barcode="";
|
||||
if(Inventorys.size()>0) {
|
||||
Inventory iv=Inventorys.get(0);
|
||||
lc=commonDao.load(Location.class, iv.getLocation().getId());
|
||||
ik=commonDao.load(ItemKey.class, iv.getItemKey().getId());
|
||||
}
|
||||
if(ik!=null&&lc!=null) {
|
||||
String wsql="select sum(r.receivedQuantity-r.shippedQuantity) from ReceivingInventory r where r.itemKey.item.id= "
|
||||
+ ik.getItem().getId()+" and r.location.id="+lc.getId()
|
||||
+" and r.strBill1='"+ncrCode+"' and r.receivedQuantity>r.shippedQuantity";
|
||||
List<Double> rdsqty=commonDao.findByQuery(wsql);
|
||||
if(rdsqty.size()>0) {
|
||||
double qys=rdsqty.get(0);
|
||||
if(quantity>qys) {
|
||||
flag=0;
|
||||
msg=msg+ncrCode+"库存数"+qys;
|
||||
|
||||
if(serials!=null&&serials.length()>0) {
|
||||
List<String> result = Arrays.asList(serials.split(","));
|
||||
int sh=result.size();
|
||||
for(String serial:result){
|
||||
barcode+="'"+serial+"',";
|
||||
}
|
||||
if(barcode.length()>1) {
|
||||
barcode.substring(0, barcode.length()-1);
|
||||
String wsql="select r.barCode from ReceivingInventory r where r.itemKey.item.id= "
|
||||
+ ik.getItem().getId()+" and r.location.id="+lc.getId()
|
||||
+" and r.strBill1='"+ncrCode+"' and r.receivedQuantity>r.shippedQuantity "
|
||||
+ " and r.barCode in("+barcode+") ";
|
||||
List<String> rdsqty=commonDao.findByQuery(wsql);
|
||||
if(rdsqty.size()>0) {
|
||||
int qys=rdsqty.size();
|
||||
if(quantity>qys) {
|
||||
flag=0;
|
||||
msg=msg+barcode+"序列号,库存数错误"+qys;
|
||||
}
|
||||
}else {
|
||||
flag=0;
|
||||
msg=msg+ncrCode+"号输入错误,序列号"+barcode;
|
||||
}
|
||||
}
|
||||
|
||||
}else {
|
||||
flag=0;
|
||||
msg=msg+ncrCode+"号输入错误";
|
||||
String wsql="select sum(r.receivedQuantity-r.shippedQuantity) from ReceivingInventory r where r.itemKey.item.id= "
|
||||
+ ik.getItem().getId()+" and r.location.id="+lc.getId()
|
||||
+" and r.strBill1='"+ncrCode+"' and r.receivedQuantity>r.shippedQuantity ";
|
||||
List<Double> rdsqty=commonDao.findByQuery(wsql);
|
||||
if(rdsqty.size()>0) {
|
||||
double qys=rdsqty.get(0);
|
||||
if(quantity>qys) {
|
||||
flag=0;
|
||||
msg=msg+ncrCode+"库存数"+qys;
|
||||
}
|
||||
}else {
|
||||
flag=0;
|
||||
msg=msg+ncrCode+"号输入错误";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2540,7 +2584,7 @@ public class ASNReceiveServlet extends HttpServlet {
|
|||
}
|
||||
msg="该容器已绑定"+codes+"槽位!";
|
||||
}else{
|
||||
List<Inventory> invs=commonDao.findByQuery(" from Inventory sw where sw.qtyOfMasterPack>0 and sw.LP.id="+s1.getId()+" ");
|
||||
List<Long> invs=commonDao.findByQuery("select sw.id from Inventory sw where sw.quantity>0 and sw.LP.id="+s1.getId()+" ");
|
||||
if(invs.size()>0) {
|
||||
msg="该容器有库存不能绑定";
|
||||
}else {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,174 @@
|
|||
package com.dev.swms.server.web.servlet;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.ServletConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.Session;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||
import org.springframework.web.context.support.WebApplicationContextUtils;
|
||||
|
||||
import com.dev.energy.server.dao.CommonDao;
|
||||
import com.dev.swms.server.model.base.ImageObj;
|
||||
import com.dev.swms.server.model.fee.Fee;
|
||||
|
||||
|
||||
/**
|
||||
* 托信息查询;
|
||||
* @author zcz
|
||||
* @create 2016年6月7日18:05:36
|
||||
*/
|
||||
public class ImageQueryServlet extends HttpServlet {
|
||||
private static final long serialVersionUID = 1L;
|
||||
protected static ApplicationContext ac;
|
||||
/**
|
||||
* Constructor of the object.
|
||||
*/
|
||||
public ImageQueryServlet() {
|
||||
super();
|
||||
}
|
||||
|
||||
public void init(ServletConfig sc) throws ServletException {
|
||||
super.init(sc);
|
||||
ac = WebApplicationContextUtils.getRequiredWebApplicationContext(sc.getServletContext());
|
||||
}
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
// TODO Auto-generated method stub
|
||||
this.doPost(request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* The doPost method of the servlet. <br>
|
||||
*
|
||||
* This method is called when a form has its tag value method equals to post.
|
||||
*
|
||||
* @param request the request send by the client to the server
|
||||
* @param response the response send by the server to the client
|
||||
* @throws ServletException if an error occurred
|
||||
* @throws IOException if an error occurred
|
||||
*/
|
||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
CommonDao commonDao = (CommonDao) ac.getBean("commonDao");
|
||||
Session session = ((HibernateDaoSupport)commonDao).getSessionFactory().openSession();
|
||||
|
||||
String type;
|
||||
String id;
|
||||
int currentPage;
|
||||
int pageSize;
|
||||
List<ImageObj> imageObjs;
|
||||
int recordTotal;
|
||||
int totalPage;
|
||||
try {
|
||||
request.setCharacterEncoding("utf-8");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
type = StringUtils.trimToEmpty(request.getParameter("type"));
|
||||
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,"
|
||||
+ "f.imageType from SignFile f ";
|
||||
|
||||
String hql_="select count(*) from SignFile f where f.objectType='"+type+"' and f.objectId="+id;
|
||||
|
||||
if(type.equals("D")){
|
||||
hql+=" where f.id="+id;
|
||||
}else if(type.equals("OAP")){
|
||||
Fee f=commonDao.load(Fee.class, Long.parseLong(id));
|
||||
//订单:关务-CUSTOMSORDER;箱单-INVOICEBOX;仓库:asn-CHECKRELEA;PickTicket-PickTicket
|
||||
List<Long> signFileId = commonDao.findByQuery(" select sf.id from SignFile sf where sf.viewName=:viewName and sf.objectType in('CustomsOrder','InvoiceBox','CHECKRELEA','PickTicket')",
|
||||
new String[] { "viewName"},new Object[] {""});
|
||||
if(signFileId.size()>0){
|
||||
String ids=StringUtils.strip(signFileId.toString(),"[]");
|
||||
hql+="where f.id in ("+ids+")";
|
||||
}else{
|
||||
hql+="where f.id is null";
|
||||
}
|
||||
}else{
|
||||
hql+="where f.objectType='"+type+"' and f.objectId="+id;
|
||||
}
|
||||
|
||||
|
||||
currentPage = Integer.parseInt(request.getParameter("currentPage")==null?"1":request.getParameter("currentPage"));
|
||||
pageSize = Integer.parseInt(request.getParameter("pageSize")==null?"1":request.getParameter("pageSize"));
|
||||
Query query = session.createQuery(hql);
|
||||
query.setFirstResult((currentPage-1)*pageSize);
|
||||
query.setMaxResults(pageSize);
|
||||
List<Object> fs= (List<Object>)query.list();
|
||||
|
||||
imageObjs = new ArrayList<ImageObj>();
|
||||
|
||||
for (int i = 0; i < fs.size(); i++) {
|
||||
Object[] obj = (Object[]) fs.get(i);
|
||||
ImageObj imageObj = new ImageObj();
|
||||
imageObj.setId((Long) obj[0]);
|
||||
String url=(String) obj[1];
|
||||
System.out.println((String) obj[1]);
|
||||
imageObj.setFileUrl(url);
|
||||
if(url.indexOf(".pdf")>0||url.indexOf(".PDF")>0){
|
||||
imageObj.setImageType("2");
|
||||
// imageObj.setFileUrl((String) obj[3]);
|
||||
}else{
|
||||
imageObj.setImageType("1");
|
||||
}
|
||||
imageObjs.add(imageObj);
|
||||
}
|
||||
Query query_ = session.createQuery(hql);
|
||||
List<Long> list = query_.list();
|
||||
recordTotal = list.size();
|
||||
|
||||
int pageNo = 1;
|
||||
|
||||
// String query = request.getParameter("query");
|
||||
String offset = request.getParameter("pager.offset");
|
||||
if(offset != null){
|
||||
try{
|
||||
pageNo = Integer.valueOf(offset)/ pageSize + 1;
|
||||
if(pageNo <=0)
|
||||
pageNo = 1;
|
||||
}catch(Exception e){
|
||||
pageNo = 1;
|
||||
}
|
||||
}
|
||||
if("false".equals(query)){//分页;
|
||||
}else{
|
||||
pageNo = 1;
|
||||
}
|
||||
totalPage = recordTotal/pageSize;
|
||||
if(recordTotal%pageSize!=0){
|
||||
totalPage+=1;
|
||||
}
|
||||
request.setAttribute("list", imageObjs);
|
||||
request.setAttribute("pageSize", pageSize);
|
||||
request.setAttribute("recordTotal", recordTotal);
|
||||
request.setAttribute("currentPage", currentPage);
|
||||
request.setAttribute("totalPage", totalPage);
|
||||
request.setAttribute("aorptid", id);
|
||||
request.setAttribute("type",type);
|
||||
request.getRequestDispatcher("imageView.jsp").forward(request, response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
session.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialization of the servlet. <br>
|
||||
*
|
||||
* @throws ServletException if an error occurs
|
||||
*/
|
||||
public void init() throws ServletException {
|
||||
// Put your code here
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -146,8 +146,6 @@ public class MoveServlet extends HttpServlet {
|
|||
String stockCode =json.has("stockCode")?json.getString("stockCode"):"";
|
||||
resultJson=app.queryStockPutList(stockCode, workerId, wId);
|
||||
}
|
||||
|
||||
|
||||
PrintWriter out = null;
|
||||
try {
|
||||
// response.setContentType(resultJson.toString());
|
||||
|
|
|
|||
|
|
@ -1,8 +1,16 @@
|
|||
package com.dev.swms.server.web.servlet;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.ServletConfig;
|
||||
import javax.servlet.ServletException;
|
||||
|
|
@ -12,11 +20,23 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
import org.apache.commons.fileupload.FileItem;
|
||||
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
|
||||
import org.apache.commons.fileupload.servlet.ServletFileUpload;
|
||||
import org.apache.commons.httpclient.HttpClient;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.web.context.support.WebApplicationContextUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
import com.dev.energy.server.dao.CommonDao;
|
||||
import com.dev.energy.server.model.Entity;
|
||||
import com.dev.swms.server.model.base.Worker;
|
||||
import com.dev.swms.server.model.interfaceLog.InterfaceLog;
|
||||
import com.dev.swms.server.service.interfaceLog.ImageFileManager;
|
||||
import com.dev.swms.server.service.interfaceLog.InterfaceManager;
|
||||
import com.dev.swms.server.service.interfaceLog.QueryAppManager;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
public class ReadWeightServlet extends HttpServlet{
|
||||
private static Logger logger = Logger.getLogger(ReadWeightServlet.class);
|
||||
|
|
@ -36,23 +56,7 @@ public class ReadWeightServlet extends HttpServlet{
|
|||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
|
||||
response.setContentType("application/json");
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
// 返回JSON数据
|
||||
JSONObject resultObject = new JSONObject();
|
||||
// 获取post提交的回复案件的信息
|
||||
String postResult = reqMailbox(request);
|
||||
String result="";
|
||||
if(postResult!=null&&!"".equals(postResult)){
|
||||
InterfaceManager app = (InterfaceManager) ac.getBean("interfaceManager");
|
||||
app.storeInterfaceLog("","WMS", "YC", "称重", postResult, null);
|
||||
}else{
|
||||
result="空的传值";
|
||||
}
|
||||
//实现逻辑...
|
||||
response.getOutputStream().write(result.toString().getBytes("UTF-8"));
|
||||
|
||||
this.doPost(request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -78,8 +82,162 @@ public class ReadWeightServlet extends HttpServlet{
|
|||
* 跳转到Get方法
|
||||
*/
|
||||
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
logger.info("称重");
|
||||
doGet(request, response);
|
||||
logger.info("==========app========"+new Date());
|
||||
request.setCharacterEncoding("UTF-8");
|
||||
CommonDao commonDao = (CommonDao) ac.getBean("commonDao");
|
||||
// QueryAppManager app = (QueryAppManager) ac.getBean("queryAppManager");
|
||||
JSONObject resultJson = new JSONObject();
|
||||
String returnCode="500";
|
||||
String msg="";
|
||||
String status="0";
|
||||
InterfaceManager app12 = (InterfaceManager) ac.getBean("interfaceManager");
|
||||
InterfaceLog log=new InterfaceLog();
|
||||
try {
|
||||
DiskFileItemFactory factory = new DiskFileItemFactory();
|
||||
logger.info("==========app========"+request.toString()+"---"+new Date());
|
||||
ServletFileUpload upload = new ServletFileUpload(factory);
|
||||
upload.setHeaderEncoding("UTF-8");
|
||||
List<FileItem> items=upload.parseRequest(request);
|
||||
Map params = new HashMap();
|
||||
for(Object object:items){
|
||||
FileItem fileItem = (FileItem) object;
|
||||
if (fileItem.isFormField()) {
|
||||
logger.info("KEY="+fileItem.getFieldName()+"--V-"+fileItem);
|
||||
params.put(fileItem.getFieldName(), fileItem.getString("utf-8"));
|
||||
//如果你页面编码是utf-8的
|
||||
}
|
||||
}
|
||||
log= app12.storeInterfaceLog("整理称重","WMSItem", "YC", "称重", params.toString(), null);
|
||||
logger.info("==========app1========"+params.toString()+"---"+new Date());
|
||||
String methodType = params.get("methodType").toString()==null?"":params.get("methodType").toString();
|
||||
String objectType = "ItemPicture";
|
||||
String taskCode = params.containsKey("taskCode")?params.get("taskCode").toString():"";
|
||||
|
||||
String itemCode =params.containsKey("itemCode")?params.get("itemCode").toString():"";
|
||||
String weight =params.containsKey("weight")?params.get("weight").toString():"";
|
||||
String length =params.containsKey("length")?params.get("length").toString():"";
|
||||
String width =params.containsKey("width")?params.get("width").toString():"";
|
||||
String height =params.containsKey("height")?params.get("height").toString():"";
|
||||
// String fileImage =json.has("fileImage")?json.getString("fileImage"):"";
|
||||
String packNumber =params.containsKey("packNumber")?params.get("packNumber").toString():"";
|
||||
String fileDateTime =params.containsKey("fileDateTime")?params.get("fileDateTime").toString():"";
|
||||
|
||||
if(methodType==null||methodType.equals("")) {
|
||||
msg=msg+methodType+"不能空";
|
||||
}
|
||||
if(itemCode==null||itemCode.equals("")) {
|
||||
msg=msg+itemCode+"不能空";
|
||||
}
|
||||
if(weight==null||weight.equals("")) {
|
||||
msg=msg+weight+"不能空";
|
||||
}
|
||||
//上传图片
|
||||
if(msg.equals("")&&"picturesUpload".equals(methodType)){
|
||||
List<Long> listLong= commonDao.findByQuery("select i.id from Item i "
|
||||
+ "where i.code='"+itemCode.trim()+"'");
|
||||
long ad_id = 0L;
|
||||
if(listLong.size()>0) {
|
||||
ad_id=listLong.get(0);
|
||||
}else {
|
||||
msg=itemCode+"不存在";
|
||||
}
|
||||
|
||||
if(msg.equals("")){
|
||||
String longName="";
|
||||
Worker worker = commonDao.get(Worker.class,1080L);
|
||||
if(worker!=null){
|
||||
longName=worker.getName();
|
||||
ImageFileManager imageFileManager = (ImageFileManager) ac.getBean("imageFileManager");
|
||||
for(FileItem item:items){
|
||||
if(!item.isFormField()){
|
||||
String name = item.getName();
|
||||
if (name != null && name.length()>0) {
|
||||
try {
|
||||
name = name.substring(name.lastIndexOf(File.separator) + 1);//文件名
|
||||
InputStream inputStream = item.getInputStream();
|
||||
|
||||
imageFileManager.importImageItem(ad_id,inputStream, weight, length,
|
||||
width, height, packNumber, fileDateTime, taskCode,
|
||||
objectType,name,longName);
|
||||
status="1";
|
||||
msg="上传成功";
|
||||
returnCode="200";
|
||||
} catch (Exception e) {
|
||||
msg=e.getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
msg="用户不存在!";
|
||||
}
|
||||
}
|
||||
}else if(msg.equals("")&&"AppItemImage".equals(methodType)){
|
||||
//app上传图片
|
||||
String specs =params.containsKey("specs")?params.get("specs").toString():"";
|
||||
List<Long> listLong= commonDao.findByQuery("select i.id from Item i "
|
||||
+ "where i.code='"+itemCode.trim()+"'");
|
||||
long ad_id = 0L;
|
||||
if(listLong.size()>0) {
|
||||
ad_id=listLong.get(0);
|
||||
}else {
|
||||
msg=itemCode+"不存在";
|
||||
}
|
||||
|
||||
if(msg.equals("")){
|
||||
String longName="";
|
||||
Worker worker = commonDao.get(Worker.class,1080L);
|
||||
if(worker!=null){
|
||||
ImageFileManager imageFileManager = (ImageFileManager) ac.getBean("imageFileManager");
|
||||
longName=worker.getName();
|
||||
for(FileItem item:items){
|
||||
if(!item.isFormField()){
|
||||
String name = item.getName();
|
||||
if (name != null && name.length()>0) {
|
||||
try {
|
||||
name = name.substring(name.lastIndexOf(File.separator) + 1);//文件名
|
||||
InputStream inputStream = item.getInputStream();
|
||||
imageFileManager.importImageItem(ad_id,inputStream, weight, length,
|
||||
width, height, specs, fileDateTime, taskCode,
|
||||
objectType,name,longName);
|
||||
status="1";
|
||||
msg="上传成功";
|
||||
returnCode="200";
|
||||
} catch (Exception e) {
|
||||
msg=e.getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
msg="用户不存在!";
|
||||
}
|
||||
}
|
||||
|
||||
}else {
|
||||
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
msg=e.toString();
|
||||
}
|
||||
resultJson.put("returnCode", returnCode);
|
||||
resultJson.put("returnFlag", status);
|
||||
resultJson.put("returnDesc", msg);
|
||||
resultJson.put("resultInfo", "");
|
||||
logger.info(new Date()+"result========="+resultJson.toString());
|
||||
PrintWriter out = null;
|
||||
try {
|
||||
response.setContentType(resultJson.toString());
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
out = response.getWriter();
|
||||
out.print(resultJson.toString());
|
||||
app12.updateResponse(log,"" , resultJson.toString());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class SWMSLoginServlet extends LoginServlet {
|
|||
session.setAttribute(LOCALE,locale);//当前语言环境
|
||||
session.setAttribute(Constant.MODULE , "e2wms");
|
||||
// SecurityContextHolder.addSecurityContext(req.getSession());
|
||||
}
|
||||
}
|
||||
|
||||
private Warehouse queryWarehouse(String loginName) {
|
||||
WarehouseManager warehouseManager = (WarehouseManager) ac.getBean("warehouseManager");
|
||||
|
|
|
|||
|
|
@ -753,6 +753,9 @@
|
|||
<constructor-arg index="7">
|
||||
<ref local="interfaceReqManager" />
|
||||
</constructor-arg>
|
||||
<constructor-arg index="8">
|
||||
<ref local="wmsOperationHisManager" />
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
|
@ -1414,6 +1417,9 @@
|
|||
<bean
|
||||
class="com.dev.swms.server.service.interfaceLog.pojo.DefaultImageFileManager"
|
||||
parent="baseManager">
|
||||
<constructor-arg index="0">
|
||||
<ref bean="pickTicketManager" />
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ CREATE TABLE WorkOrderAllocationInfo (
|
|||
WorkOrderNumber NVARCHAR(50),
|
||||
LineNumber INT,
|
||||
MaterialNumber NVARCHAR(50),
|
||||
Quantity INT,
|
||||
Quantity float,
|
||||
Remarks NVARCHAR(200),
|
||||
LocationNumber NVARCHAR(50),
|
||||
Factory NVARCHAR(50),
|
||||
|
|
@ -35,13 +35,13 @@ GO
|
|||
|
||||
-----------2025-04-02
|
||||
|
||||
ALTER TABLE ITEM_KEY add PROP_LC5 varchar(50) COLLATE Chinese_PRC_CI_AS NULL;
|
||||
ALTER TABLE ITEM_KEY add PROP_LC5 varchar(250) COLLATE Chinese_PRC_CI_AS NULL;
|
||||
GO
|
||||
ALTER TABLE ITEM_KEY add PROP_LC6 varchar(50) COLLATE Chinese_PRC_CI_AS NULL;
|
||||
ALTER TABLE ITEM_KEY add PROP_LC6 varchar(250) COLLATE Chinese_PRC_CI_AS NULL;
|
||||
GO
|
||||
ALTER TABLE ASN_DETAIL add PROP_LC5 varchar(50) COLLATE Chinese_PRC_CI_AS NULL;
|
||||
ALTER TABLE ASN_DETAIL add PROP_LC5 varchar(250) COLLATE Chinese_PRC_CI_AS NULL;
|
||||
GO
|
||||
ALTER TABLE ASN_DETAIL add PROP_LC6 varchar(50) COLLATE Chinese_PRC_CI_AS NULL;
|
||||
ALTER TABLE ASN_DETAIL add PROP_LC6 varchar(250) COLLATE Chinese_PRC_CI_AS NULL;
|
||||
GO
|
||||
|
||||
|
||||
|
|
@ -81,6 +81,63 @@ UPDATE STATISTICS ITEM;
|
|||
UPDATE STATISTICS TASK;
|
||||
UPDATE STATISTICS INVENTORY;
|
||||
|
||||
|
||||
--------2025-04-25
|
||||
ALTER TABLE TASK add item_Code varchar(50) COLLATE Chinese_PRC_CI_AS NULL;
|
||||
GO
|
||||
GO
|
||||
|
||||
ALTER TABLE SIGN_FILE add LENGTH float(20) NULL;
|
||||
GO
|
||||
ALTER TABLE SIGN_FILE add WIDTH float(20) NULL;
|
||||
GO
|
||||
ALTER TABLE SIGN_FILE add HEIGHT float(20) NULL;
|
||||
GO
|
||||
ALTER TABLE SIGN_FILE add WEIGHT float(20) NULL;
|
||||
GO
|
||||
ALTER TABLE SIGN_FILE add VOLUME float(20) NULL;
|
||||
GO
|
||||
ALTER TABLE SIGN_FILE add PACK_NUMBER int NULL;
|
||||
GO
|
||||
update SIGN_FILE set LENGTH=0 where LENGTH is null;
|
||||
GO
|
||||
update SIGN_FILE set WIDTH=0 where WIDTH is null;
|
||||
GO
|
||||
update SIGN_FILE set HEIGHT=0 where HEIGHT is null;
|
||||
GO
|
||||
update SIGN_FILE set WEIGHT=0 where WEIGHT is null;
|
||||
GO
|
||||
update SIGN_FILE set VOLUME=0 where VOLUME is null;
|
||||
GO
|
||||
update SIGN_FILE set PACK_NUMBER=0 where PACK_NUMBER is null;
|
||||
GO
|
||||
|
||||
--------2025-05-06
|
||||
ALTER TABLE Item add be_Image_File tinyint NULL;
|
||||
GO
|
||||
update Item set be_Image_File=0 where be_Image_File is null;
|
||||
GO
|
||||
|
||||
|
||||
CREATE NONCLUSTERED INDEX [IDX_INVENTORY_STOCK_ID]
|
||||
ON [dbo].[INVENTORY] (
|
||||
[LP] ASC
|
||||
)
|
||||
----非空索引
|
||||
CREATE INDEX FK_default_Warehouse_Area_ID_Null ON Item (default_Warehouse_Area_ID) WHERE default_Warehouse_Area_ID IS NULL;
|
||||
|
||||
CREATE INDEX FK_default_Warehouse_Area_ID_Null ON Item (default_Warehouse_Area_ID) WHERE default_Warehouse_Area_ID IS NULL;
|
||||
|
||||
---//修改字段类型
|
||||
ALTER TABLE Employees
|
||||
ALTER COLUMN Name VARCHAR(30);
|
||||
|
||||
ALTER TABLE INTERFACE_LOG
|
||||
ALTER COLUMN REQUEST VARCHAR(200);
|
||||
ALTER TABLE INTERFACE_LOG
|
||||
ALTER COLUMN FILE_NAME VARCHAR(200);
|
||||
---修改字段名
|
||||
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;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<pages>
|
||||
<maintainPage id="maintainItemPicturePage" title="料号相片"
|
||||
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"
|
||||
span="1" readOnly="false" required="false" reserve="false"
|
||||
forceOverride="true" inVisible="false" trimSpace="true"
|
||||
isPrecision="false" />
|
||||
|
||||
</inputUIs>
|
||||
</search>
|
||||
<datasource type="hql"><![CDATA[select
|
||||
signFile.id,
|
||||
signFile.imageType,
|
||||
signFile.fileName,
|
||||
signFile.fileDate,
|
||||
signFile.fileDate,
|
||||
round(signFile.length,2),
|
||||
round(signFile.width,2),
|
||||
round(signFile.height,2),
|
||||
round(signFile.weight,2),
|
||||
round(signFile.volume,6),
|
||||
signFile.packNumber,
|
||||
signFile.remark
|
||||
from SignFile signFile
|
||||
WHERE 1=1 and signFile.objectType='ItemPicture'
|
||||
ORDER BY signFile.id DESC
|
||||
]]></datasource>
|
||||
<columns>
|
||||
<column id="signFile.id" title="序号" visible="false" horizonAlign="center" verticalAlign="middle"/>
|
||||
<column id="signFile.imageType" title="类型" visible="false" horizonAlign="center" verticalAlign="middle" format="enumFormat" formatParam="ImageType"/>
|
||||
<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.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"/>
|
||||
</columns>
|
||||
<buttons>
|
||||
<commit id="deleteImage1" title="delete2" enableType="multi" invisible="false" confirmMessage="确认是否删除图片?">
|
||||
<mappings>
|
||||
<mapping id="ids" className="list"/>
|
||||
</mappings>
|
||||
<actions>
|
||||
<action managerName="imageFileManager" methodName="deleteSignFile" parameter="ids"/>
|
||||
</actions>
|
||||
<forwards>
|
||||
<forward name="refreshParent" newEnabled="true" editEnabled="true"/>
|
||||
<forward name="refreshWindow" newEnabled="true" editEnabled="true"/>
|
||||
</forwards>
|
||||
</commit>
|
||||
<popup id="selectImageButton" title="照片查看" enableType="single" invisible="false" containId="true" pageId="editItemImagePage"/>
|
||||
</buttons>
|
||||
|
||||
</maintainPage>
|
||||
</pages>
|
||||
|
|
@ -258,7 +258,6 @@
|
|||
</popup>
|
||||
<commit id="deleteLocations" title="deleteLocations" enableType="multi"
|
||||
invisible="false" confirmMessage="maintainLocationPage.deleteLocations.confirmMessage">
|
||||
<enableExpression><![CDATA[(${location.disabled}=='false')]]></enableExpression>
|
||||
<mappings>
|
||||
<mapping id="ids" className="list"/>
|
||||
</mappings>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,15 @@
|
|||
plantInfo.code
|
||||
from PlantInfo plantInfo
|
||||
where 1=1 order by plantInfo.name asc ]]></hql>
|
||||
</list>
|
||||
</list>
|
||||
<list id="pl.code" title="LOC" row="1" 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>
|
||||
<checkbox id="carrierType.disabled" title="00030D3C97851197274983400"
|
||||
row="3" col="1" defaultValue="false" span="1" readOnly="false"
|
||||
required="false" reserve="false" forceOverride="true" inVisible="false" />
|
||||
|
|
@ -33,6 +41,7 @@
|
|||
where 1=1
|
||||
/~carrierType.disabled: and pl.disabled = {carrierType.disabled}~/
|
||||
/~carrierType.code: and pl.plantInfo.code like {carrierType.code}~/
|
||||
/~pl.code: and pl.code like {pl.code}~/
|
||||
]]></datasource>
|
||||
<columns>
|
||||
<column id="carrierType.id" title="carrierType.id" visible="false" />
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
<menuItem title="menu_maintainPositionPage" pageId="maintainPositionPage"/>
|
||||
<menuItem title="menu_maintainDockPage" pageId="maintainDockPage"/>
|
||||
<menuItem title="物料信息" pageId="maintainItemPage"/>
|
||||
<menuItem title="物料图片信息" pageId="maintainItemPicturePage"/>
|
||||
<menuItem title="容器类型管理" pageId="maintainContainerTypePage"/>
|
||||
<menuItem title="容器/热度值管理" pageId="maintainStockPage"/>
|
||||
<menuItem title="库区作业时效管理" pageId="maintainShiXiaoPage"/>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@
|
|||
</inputUIs>
|
||||
</search>
|
||||
<datasource type="hql"><![CDATA[ select t.id,
|
||||
t.methodName,
|
||||
t.type,
|
||||
t.fromCellCode,
|
||||
t.toCellCode,
|
||||
|
|
@ -80,7 +79,6 @@ and (1=1
|
|||
]]></datasource>
|
||||
<columns>
|
||||
<column id="t.id" title="单号" visible="true" horizonAlign="center" verticalAlign="middle" />
|
||||
<column id="t.methodName" title="libraryTask.methodName" dataType="enum" format="enumFormat" formatParam="LibraryTaskType" visible="true" horizonAlign="center" verticalAlign="middle" />
|
||||
<column id="t.type" title="libraryTask.type" dataType="enum" format="enumFormat" formatParam="LibraryTaskType" visible="true" horizonAlign="center" verticalAlign="middle" />
|
||||
<column id="t.fromCellCode" title="libraryTask.fromCellCode" visible="true" horizonAlign="center" verticalAlign="middle" />
|
||||
<column id="t.toCellCode" title="libraryTask.toCellCode" visible="true" horizonAlign="center" verticalAlign="middle" />
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@
|
|||
<text id="ad.strBill2" title="序列号" row="13" col="1" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="true" trimSpace="true">
|
||||
<visibleExpression><![CDATA[ ${ad.item.beMarkWeight}=='true']]></visibleExpression>
|
||||
</text>
|
||||
<date id="asnDetail.lotInfo.propD2" title="到期日"
|
||||
<date id="ad.lotInfo.propD2" title="到期日"
|
||||
row="10" col="1" readOnly="false" required="true" reserve="true"
|
||||
forceOverride="false" inVisible="false" trimSpace="true"
|
||||
isPrecision="true" showTime="false" defaultCurrentDate="false" >
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@
|
|||
ad.strBill11,
|
||||
ad.lotInfo.propC2,
|
||||
ad.lotInfo.propC9,
|
||||
ad.strBill2,
|
||||
ad.expectedQuantity,
|
||||
ad.ftl_qty,
|
||||
ad.receivedQuantity,
|
||||
|
|
@ -162,6 +163,8 @@
|
|||
horizonAlign="center" />
|
||||
<column id="ad.lotInfo.propC9" title="工厂" visible="true"
|
||||
horizonAlign="center" />
|
||||
<column id="ad.strBill2" title="序列号" visible="true"
|
||||
horizonAlign="center" />
|
||||
<column id="ad.expectedQuantity" title="收货数量"
|
||||
visible="true" horizonAlign="center" verticalAlign="middle" />
|
||||
<column id="ad.ftl_qty" title="质检完成数量"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
t.endRegion,
|
||||
t.seedWall.code,
|
||||
srcLoc.code,
|
||||
pickTicketDetail.item.name,
|
||||
pickTicketDetail.item.code,
|
||||
t.planQuantity,
|
||||
t.movedQuantityMU
|
||||
FROM Task t
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@
|
|||
pickTicket.id,
|
||||
pickTicket.sourceType,
|
||||
pickTicket.orderDate,
|
||||
pickTicket.orderDate,
|
||||
pickTicket.relatedBill1,
|
||||
pickTicket.relatedBill2,
|
||||
pickTicket.workerName1,
|
||||
|
|
@ -77,10 +76,8 @@
|
|||
<column id="pickTicket.id" title="pickTicket" visible="false" />
|
||||
<column id="pickTicket.sourceType" width="80" title="出库类型"
|
||||
visible="true" horizonAlign="center" />
|
||||
<column id="pickTicket.orderDate1" width="120" title="订单日期"
|
||||
<column id="pickTicket.orderDate1" width="120" title="需求日期"
|
||||
visible="true" horizonAlign="center" format="dateFormatter"/>
|
||||
<column id="pickTicket.orderDate2" width="120" title="订单时间"
|
||||
visible="true" horizonAlign="center" format="dateTiemFormatter"/>
|
||||
<column id="pickTicket.relatedBill1" width="130" title="申请编号"
|
||||
visible="true" horizonAlign="center" dataType="enum" />
|
||||
<column id="pickTicket.relatedBill2" width="130" title="流程编号"
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@
|
|||
agv.status,
|
||||
agv.createTime,
|
||||
agv.createTime,
|
||||
agv.dateTime3,
|
||||
agv.dateTime2,
|
||||
agv.dateTime3,
|
||||
agv.jobPriorityType,
|
||||
t.oldGzz,
|
||||
|
|
@ -292,9 +292,9 @@
|
|||
<column id="t.seedWall.name" title="分拨墙" visible="true" horizonAlign="center" />
|
||||
<column id="agv.robotJobId" title="AGV任务号" visible="false" horizonAlign="center" />
|
||||
<column id="agv.status" title="AGV任务状态" width="80" visible="false" horizonAlign="center" dataType="enum" format="enumFormat" formatParam="STATUS" />
|
||||
<column id="agv.createTimel234" title="AGV生成日期" visible="false" horizonAlign="center" format="dateFormatter" />
|
||||
<column id="agv.createTimel314" title="AGV生成时间" visible="false" horizonAlign="center" format="dateTiemFormatter" />
|
||||
<column id="agv.dateTime3234" title="到输送线日期" visible="false" horizonAlign="center" format="dateFormatter" />
|
||||
<column id="agv.createTimel2324" title="AGV生成日期" visible="false" horizonAlign="center" format="dateFormatter" />
|
||||
<column id="agv.createTimel3134" title="AGV生成时间" visible="false" horizonAlign="center" format="dateTiemFormatter" />
|
||||
<column id="agv.dateTime22314" title="agv开始搬运时间" visible="false" horizonAlign="center" format="dateTiemFormatter" />
|
||||
<column id="agv.dateTime3314" title="到输送线时间" visible="false" horizonAlign="center" format="dateTiemFormatter" />
|
||||
<column id="agv.jobPriorityType" title="AGV等级" width="80" visible="false" horizonAlign="center" />
|
||||
<column id="t.oldGzz" title="新工作站" width="80" visible="false" horizonAlign="center" />
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@
|
|||
<value>jdbc:sqlserver://47.103.100.52:1433;DatabaseName=zwlgtest</value>
|
||||
</property>
|
||||
<property name="username">
|
||||
<!-- <value>WMSDB</value> -->
|
||||
<value>WMSDB</value>
|
||||
<!-- <value>sa</value> -->
|
||||
<value>wmsdb</value>
|
||||
<!-- <value>wmsdb</value> -->
|
||||
</property>
|
||||
<property name="password">
|
||||
<!-- <value>AmecDDbb32A</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=true
|
||||
hibernate.show_sql=false
|
||||
hibernate.format_sql=false
|
||||
hibernate.hbm2ddl.auto=none
|
||||
ldxt.bz=0
|
||||
|
|
|
|||
|
|
@ -419,6 +419,11 @@
|
|||
<display-name>libraryTaskServlet</display-name>
|
||||
<servlet-class>com.dev.swms.server.web.servlet.LibraryTaskServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>imageQueryServlet</servlet-name>
|
||||
<servlet-class>com.dev.swms.server.web.servlet.ImageQueryServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>asnImageServlet</servlet-name>
|
||||
<url-pattern>*.asnImageServlet</url-pattern>
|
||||
|
|
@ -492,8 +497,10 @@
|
|||
<servlet-name>loginService</servlet-name>
|
||||
<url-pattern>*.login</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>imageQueryServlet</servlet-name>
|
||||
<url-pattern>/iqs</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>warehouseService</servlet-name>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,127 @@
|
|||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>中微</title>
|
||||
<link href="css/basic.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="js/date/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="js/jquery-1.6.2.js"></script>
|
||||
<script type="text/javascript" src="js/jquery.media.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('a.media').media({width:700, height:500});
|
||||
});
|
||||
</script>
|
||||
<%
|
||||
// 获取请求的上下文
|
||||
String context = request.getContextPath();
|
||||
%>
|
||||
<script type="text/javascript">
|
||||
|
||||
//当前第几页数据
|
||||
var currentPage = ${currentPage};
|
||||
|
||||
// 总页数
|
||||
var totalPage = ${totalPage};
|
||||
var aorptid = ${aorptid};
|
||||
var type = "${type}";
|
||||
|
||||
|
||||
function submitForm(actionUrl){
|
||||
var formElement = document.getElementById("stuForm");
|
||||
formElement.action = actionUrl;
|
||||
formElement.submit();
|
||||
}
|
||||
|
||||
//第一页
|
||||
function firstPage(){
|
||||
if(currentPage == 1){
|
||||
alert("已经是第一页数据");
|
||||
return false;
|
||||
}else{
|
||||
submitForm("<%=context %>/iqs?aorptid="+aorptid+"&type="+type+"¤tPage=1&pageSize=1");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//下一页
|
||||
function nextPage(){
|
||||
console.log(0813);
|
||||
if(currentPage == totalPage){
|
||||
alert("已经是最后一页数据");
|
||||
return false;
|
||||
}else{
|
||||
submitForm("<%=context %>/iqs?aorptid="+aorptid+"&type="+type+"&pageSize=1¤tPage="+(currentPage+1));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//上一页
|
||||
function previousPage(){
|
||||
if(currentPage == 1){
|
||||
alert("已经是第一页数据");
|
||||
return false;
|
||||
}else{
|
||||
submitForm("<%=context %>/iqs?aorptid="+aorptid+"&type="+type+"&pageSize=1¤tPage="+(currentPage-1));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//尾页
|
||||
function lastPage(){
|
||||
if(currentPage == totalPage){
|
||||
alert("已经是最后一页数据");
|
||||
return false;
|
||||
}else{
|
||||
submitForm("<%=context %>/iqs?aorptid="+aorptid+"&type="+type+"&pageSize=1¤tPage="+totalPage);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form action="#" id="stuForm" method="post">
|
||||
|
||||
</form>
|
||||
|
||||
<div style="height:650px;overflow-x:auto;background-color: #EAEAEA">
|
||||
<table border="1" style="height:60%; weight:70%;" cellpadding="10" cellspacing="1" bgcolor="#EAEAEA">
|
||||
<!-- <tr> -->
|
||||
<!-- <td>序号</td> -->
|
||||
<!-- <td>图片</td> -->
|
||||
<!-- </tr> -->
|
||||
<c:forEach var="elt" items="${list }" >
|
||||
<tr>
|
||||
<%-- <td>${elt.id } </td> --%>
|
||||
<%-- <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>
|
||||
</c:if>
|
||||
<c:if test="${elt.imageType==2 }">
|
||||
<%-- <td>${elt.fileUrl}</td> --%>
|
||||
<td><img src="${elt.fileUrl}" style="height:25%; weight:25%;"></td>
|
||||
<%-- <td><iframe src="${ctx}/<s:property value='${elt.fileUrl}'/>" width="800" height="638" scroll="no"></iframe></td> --%>
|
||||
</c:if>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
|
||||
<tr>
|
||||
<!--<a class="media" href="img/22.pdf">PDF File</a> -->
|
||||
</tr>
|
||||
</table>
|
||||
总共:${recordTotal}条记录
|
||||
<a href="#" onclick="firstPage();">首页</a>
|
||||
<a href="#" onclick="previousPage();">上一页</a>
|
||||
<a href="#" onclick="nextPage();">下一页</a>
|
||||
<a href="#" onclick="lastPage();">尾页</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue