新增不良品分配,app补打标签、拣货界面加是否一包一个显示
							parent
							
								
									2f43563fbe
								
							
						
					
					
						commit
						0096abc7a4
					
				| 
						 | 
					@ -137,47 +137,7 @@ public class Item extends Entity {
 | 
				
			||||||
    private String barcode;//
 | 
					    private String barcode;//
 | 
				
			||||||
    private boolean beExtend1=false;//扩展1
 | 
					    private boolean beExtend1=false;//扩展1
 | 
				
			||||||
    private boolean beExtend2=false;//扩展2
 | 
					    private boolean beExtend2=false;//扩展2
 | 
				
			||||||
    
 | 
					    private boolean beUnpacking=false;//是否最小包装
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    public boolean isBeExtend1() {
 | 
					 | 
				
			||||||
		return beExtend1;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	public void setBeExtend1(boolean beExtend1) {
 | 
					 | 
				
			||||||
		this.beExtend1 = beExtend1;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	public boolean isBeExtend2() {
 | 
					 | 
				
			||||||
		return beExtend2;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	public void setBeExtend2(boolean beExtend2) {
 | 
					 | 
				
			||||||
		this.beExtend2 = beExtend2;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	public boolean isBeInventory() {
 | 
					 | 
				
			||||||
		return beInventory;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	public void setBeInventory(boolean beInventory) {
 | 
					 | 
				
			||||||
		this.beInventory = beInventory;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	public boolean isBeInv() {
 | 
					 | 
				
			||||||
		return beInv;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	public void setBeInv(boolean beInv) {
 | 
					 | 
				
			||||||
		this.beInv = beInv;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	public boolean isBeSAPItem() {
 | 
					 | 
				
			||||||
		return beSAPItem;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	public void setBeSAPItem(boolean beSAPItem) {
 | 
					 | 
				
			||||||
		this.beSAPItem = beSAPItem;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private Double multipleOrder=0d;//
 | 
						private Double multipleOrder=0d;//
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
| 
						 | 
					@ -230,6 +190,55 @@ public class Item extends Entity {
 | 
				
			||||||
	private Number largeHeight;
 | 
						private Number largeHeight;
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    public boolean isBeUnpacking() {
 | 
				
			||||||
 | 
							return beUnpacking;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setBeUnpacking(boolean beUnpacking) {
 | 
				
			||||||
 | 
							this.beUnpacking = beUnpacking;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public boolean isBeExtend1() {
 | 
				
			||||||
 | 
							return beExtend1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setBeExtend1(boolean beExtend1) {
 | 
				
			||||||
 | 
							this.beExtend1 = beExtend1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public boolean isBeExtend2() {
 | 
				
			||||||
 | 
							return beExtend2;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setBeExtend2(boolean beExtend2) {
 | 
				
			||||||
 | 
							this.beExtend2 = beExtend2;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public boolean isBeInventory() {
 | 
				
			||||||
 | 
							return beInventory;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setBeInventory(boolean beInventory) {
 | 
				
			||||||
 | 
							this.beInventory = beInventory;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public boolean isBeInv() {
 | 
				
			||||||
 | 
							return beInv;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setBeInv(boolean beInv) {
 | 
				
			||||||
 | 
							this.beInv = beInv;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public boolean isBeSAPItem() {
 | 
				
			||||||
 | 
							return beSAPItem;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setBeSAPItem(boolean beSAPItem) {
 | 
				
			||||||
 | 
							this.beSAPItem = beSAPItem;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						
 | 
				
			||||||
	public WarehouseArea getWarehouseArea() {
 | 
						public WarehouseArea getWarehouseArea() {
 | 
				
			||||||
		return warehouseArea;
 | 
							return warehouseArea;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -178,6 +178,7 @@
 | 
				
			||||||
		<property name="beSAPItem" type="boolean" column="Be_SAP_Item" />
 | 
							<property name="beSAPItem" type="boolean" column="Be_SAP_Item" />
 | 
				
			||||||
		<property name="beExtend1" column="be_Extend1" type="boolean" />
 | 
							<property name="beExtend1" column="be_Extend1" type="boolean" />
 | 
				
			||||||
		<property name="beExtend2" column="be_Extend2" type="boolean" />
 | 
							<property name="beExtend2" column="be_Extend2" type="boolean" />
 | 
				
			||||||
 | 
							<property name="beUnpacking" column="BE_UNPACKING" type="boolean" />
 | 
				
			||||||
	</class>
 | 
						</class>
 | 
				
			||||||
	<query name="getItemsCountByCompanyID">
 | 
						<query name="getItemsCountByCompanyID">
 | 
				
			||||||
		<![CDATA[SELECT COUNT(item) FROM Item item WHERE item.company.id = :companyId]]>
 | 
							<![CDATA[SELECT COUNT(item) FROM Item item WHERE item.company.id = :companyId]]>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -141,8 +141,8 @@ public class Task extends VersionalEntity {
 | 
				
			||||||
	private String strBill5;//合单人
 | 
						private String strBill5;//合单人
 | 
				
			||||||
	private String strBill6;//是否未未拆包装
 | 
						private String strBill6;//是否未未拆包装
 | 
				
			||||||
	private String strBill7;//库位的容器
 | 
						private String strBill7;//库位的容器
 | 
				
			||||||
	private String strBill8;//
 | 
						private String strBill8;//拆分号分组
 | 
				
			||||||
	private String strBill9;//
 | 
						private String strBill9;//头物料
 | 
				
			||||||
	private String strBill10;//退料属性(T)
 | 
						private String strBill10;//退料属性(T)
 | 
				
			||||||
	private Date dateBill1=new Date();//下发日期
 | 
						private Date dateBill1=new Date();//下发日期
 | 
				
			||||||
	private Date dateBill2;//合单移动日期
 | 
						private Date dateBill2;//合单移动日期
 | 
				
			||||||
| 
						 | 
					@ -155,8 +155,25 @@ public class Task extends VersionalEntity {
 | 
				
			||||||
	private String  positionStatus;//位置状态
 | 
						private String  positionStatus;//位置状态
 | 
				
			||||||
	private String oldGzz;//原工作站
 | 
						private String oldGzz;//原工作站
 | 
				
			||||||
	private String oldZrw;//原子任务
 | 
						private String oldZrw;//原子任务
 | 
				
			||||||
 | 
						private boolean beUnpacking=false;//是否最小包装
 | 
				
			||||||
 | 
						private String ncrCode;//不良品的NCR号
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
 | 
						public String getNcrCode() {
 | 
				
			||||||
 | 
							return ncrCode;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setNcrCode(String ncrCode) {
 | 
				
			||||||
 | 
							this.ncrCode = ncrCode;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public boolean isBeUnpacking() {
 | 
				
			||||||
 | 
							return beUnpacking;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public void setBeUnpacking(boolean beUnpacking) {
 | 
				
			||||||
 | 
							this.beUnpacking = beUnpacking;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public String getOldGzz() {
 | 
						public String getOldGzz() {
 | 
				
			||||||
		return oldGzz;
 | 
							return oldGzz;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -173,7 +173,8 @@
 | 
				
			||||||
		<property name="dateBill8" column="dateBill8" type="timestamp" />
 | 
							<property name="dateBill8" column="dateBill8" type="timestamp" />
 | 
				
			||||||
		<property name="oldGzz" column="OLD_GZZ" type="string" length="100" />
 | 
							<property name="oldGzz" column="OLD_GZZ" type="string" length="100" />
 | 
				
			||||||
		<property name="oldZrw" column="OLD_ZRW" type="string" length="100" />
 | 
							<property name="oldZrw" column="OLD_ZRW" type="string" length="100" />
 | 
				
			||||||
		
 | 
							<property name="beUnpacking" column="BE_UNPACKING" type="boolean" />
 | 
				
			||||||
 | 
							<property name="ncrCode" column="NCR_CODE" type="string" length="50" />
 | 
				
			||||||
	</class>
 | 
						</class>
 | 
				
			||||||
	<!-- <query name="getNotAllPickTasksByWaveDocId"> -->
 | 
						<!-- <query name="getNotAllPickTasksByWaveDocId"> -->
 | 
				
			||||||
	<!-- <![CDATA[ select task from Task task -->
 | 
						<!-- <![CDATA[ select task from Task task -->
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -142,6 +142,7 @@ public class DefaultItemManager extends DefaultBaseManager implements
 | 
				
			||||||
		i.setBeInventory(item.isBeInventory());
 | 
							i.setBeInventory(item.isBeInventory());
 | 
				
			||||||
		i.setBeExtend1(item.isBeExtend1());
 | 
							i.setBeExtend1(item.isBeExtend1());
 | 
				
			||||||
		i.setBeExtend2(item.isBeExtend2());
 | 
							i.setBeExtend2(item.isBeExtend2());
 | 
				
			||||||
 | 
							i.setBeUnpacking(item.isBeUnpacking());
 | 
				
			||||||
		double a=length*width*height;
 | 
							double a=length*width*height;
 | 
				
			||||||
		if(i.getPackNumber()>0) {
 | 
							if(i.getPackNumber()>0) {
 | 
				
			||||||
			i.setVolume(a/i.getPackNumber());
 | 
								i.setVolume(a/i.getPackNumber());
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2081,7 +2081,8 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
 | 
				
			||||||
												+ " MAX(item.STR_EXTEND1) as STR_EXTEND1,MAX(item.unit)  as unit,"
 | 
																	+ " MAX(item.STR_EXTEND1) as STR_EXTEND1,MAX(item.unit)  as unit,"
 | 
				
			||||||
												+ "max(item.be_Extend1) as be_Extend1,max(item.be_Extend2) as be_Extend2, "
 | 
																	+ "max(item.be_Extend1) as be_Extend1,max(item.be_Extend2) as be_Extend2, "
 | 
				
			||||||
												+ "max(ik.PROP_LC2) as propLC2,max(ik.PROP_LC3) as propLC3,max(pt.sourceType) as sourceType ,"
 | 
																	+ "max(ik.PROP_LC2) as propLC2,max(ik.PROP_LC3) as propLC3,max(pt.sourceType) as sourceType ,"
 | 
				
			||||||
												+ " max(lt.TO_CELL_CODE)  as END_REGION ,max(z.LEVELS) as LEVELS,max(ptd.strBill13) as strBill13"
 | 
																	+ " max(lt.TO_CELL_CODE)  as END_REGION ,max(z.LEVELS) as LEVELS,max(ptd.strBill13) as strBill13,"
 | 
				
			||||||
 | 
																	+ " item.BE_UNPACKING as BE_UNPACKING "
 | 
				
			||||||
												  + " from task t   "
 | 
																	  + " from task t   "
 | 
				
			||||||
												  + " left join PICK_TICKET_DETAIL ptd on ptd.id=t.PICK_TICKET_DETAIL_ID   "
 | 
																	  + " left join PICK_TICKET_DETAIL ptd on ptd.id=t.PICK_TICKET_DETAIL_ID   "
 | 
				
			||||||
												  + " left join PICK_TICKET pt on pt.id=ptd.PICK_TICKET_ID   "
 | 
																	  + " left join PICK_TICKET pt on pt.id=ptd.PICK_TICKET_ID   "
 | 
				
			||||||
| 
						 | 
					@ -2115,7 +2116,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
						sql.append(" group by t.END_REGION,t.BILLCODE,item.id,item.code,item.BE_MARK_WEIGHT,loc.id,"
 | 
											sql.append(" group by t.END_REGION,t.BILLCODE,item.id,item.code,item.BE_MARK_WEIGHT,loc.id,"
 | 
				
			||||||
								+ "loc.code,ik.PROP_C1,ik.PROP_C2,ik.PROP_C3,"
 | 
													+ "loc.code,ik.PROP_C1,ik.PROP_C2,ik.PROP_C3,"
 | 
				
			||||||
								+ "ik.PROP_D1,ik.PROP_D2,item.ISBOM ");
 | 
													+ "ik.PROP_D1,ik.PROP_D2,item.ISBOM,item.BE_UNPACKING ");
 | 
				
			||||||
						sql.append(" order by max(lt.finish_Date) ,min(t.skips ),max(loc.code) asc, item.id,t.BILLCODE ");
 | 
											sql.append(" order by max(lt.finish_Date) ,min(t.skips ),max(loc.code) asc, item.id,t.BILLCODE ");
 | 
				
			||||||
						
 | 
											
 | 
				
			||||||
						
 | 
											
 | 
				
			||||||
| 
						 | 
					@ -2271,7 +2272,15 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
 | 
				
			||||||
									obj.put("isScode", "false");//是否扫描容器
 | 
														obj.put("isScode", "false");//是否扫描容器
 | 
				
			||||||
								}
 | 
													}
 | 
				
			||||||
								String receiver=arrier[30]==null?"":arrier[30].toString();
 | 
													String receiver=arrier[30]==null?"":arrier[30].toString();
 | 
				
			||||||
 | 
													String beUnpacking=arrier[31]==null?"":arrier[31].toString();
 | 
				
			||||||
 | 
													
 | 
				
			||||||
								obj.put("receiver", receiver);
 | 
													obj.put("receiver", receiver);
 | 
				
			||||||
 | 
													if(beUnpacking.equals("1")||beUnpacking.equals("true")) {
 | 
				
			||||||
 | 
														beUnpacking="true";
 | 
				
			||||||
 | 
													}else {
 | 
				
			||||||
 | 
														beUnpacking="false";
 | 
				
			||||||
 | 
													}
 | 
				
			||||||
 | 
													obj.put("beUnpacking", beUnpacking);
 | 
				
			||||||
								array.add(obj);
 | 
													array.add(obj);
 | 
				
			||||||
								break;
 | 
													break;
 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
| 
						 | 
					@ -3447,6 +3456,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
 | 
				
			||||||
							obj.put("propLC2",thb.getPropLC3());
 | 
												obj.put("propLC2",thb.getPropLC3());
 | 
				
			||||||
							obj.put("be_Extend1",item.isBeExtend1());
 | 
												obj.put("be_Extend1",item.isBeExtend1());
 | 
				
			||||||
							obj.put("be_Extend2",item.isBeExtend2());
 | 
												obj.put("be_Extend2",item.isBeExtend2());
 | 
				
			||||||
 | 
												obj.put("beUnpacking",item.isBeUnpacking());//是否最小包装
 | 
				
			||||||
							if(thb.getSourceType()!=null&&thb.getSourceType().equals("313")) {
 | 
												if(thb.getSourceType()!=null&&thb.getSourceType().equals("313")) {
 | 
				
			||||||
								obj.put("be_Supernova","true");//是否超发
 | 
													obj.put("be_Supernova","true");//是否超发
 | 
				
			||||||
							}else {
 | 
												}else {
 | 
				
			||||||
| 
						 | 
					@ -6170,6 +6180,9 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
 | 
				
			||||||
				int y=0;
 | 
									int y=0;
 | 
				
			||||||
				for(String id :result){
 | 
									for(String id :result){
 | 
				
			||||||
//					try{
 | 
					//					try{
 | 
				
			||||||
 | 
										if (unQty == 0) {
 | 
				
			||||||
 | 
											break;
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
						 t=commonDao.load(Task.class, Long.parseLong(id));
 | 
											 t=commonDao.load(Task.class, Long.parseLong(id));
 | 
				
			||||||
						 ptd=commonDao.load(PickTicketDetail.class, t.getPickTicketDetail().getId());
 | 
											 ptd=commonDao.load(PickTicketDetail.class, t.getPickTicketDetail().getId());
 | 
				
			||||||
						 pt=commonDao.load(PickTicket.class, ptd.getPickTicket().getId());
 | 
											 pt=commonDao.load(PickTicket.class, ptd.getPickTicket().getId());
 | 
				
			||||||
| 
						 | 
					@ -6203,9 +6216,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
 | 
				
			||||||
						String macs="";
 | 
											String macs="";
 | 
				
			||||||
						String printName="";
 | 
											String printName="";
 | 
				
			||||||
						double qty=0;//当前拣货数量
 | 
											double qty=0;//当前拣货数量
 | 
				
			||||||
						if (unQty == 0) {
 | 
											
 | 
				
			||||||
							break;
 | 
					 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
						if(quantity>t.getPlanQuantity()){
 | 
											if(quantity>t.getPlanQuantity()){
 | 
				
			||||||
							qty=t.getPlanQuantity();
 | 
												qty=t.getPlanQuantity();
 | 
				
			||||||
							quantity=quantity-t.getPlanQuantity();
 | 
												quantity=quantity-t.getPlanQuantity();
 | 
				
			||||||
| 
						 | 
					@ -6639,6 +6650,9 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
 | 
				
			||||||
							int y=0;
 | 
												int y=0;
 | 
				
			||||||
							for(String id :result){
 | 
												for(String id :result){
 | 
				
			||||||
//								try{
 | 
					//								try{
 | 
				
			||||||
 | 
													if (unQty == 0) {
 | 
				
			||||||
 | 
														break;
 | 
				
			||||||
 | 
													}
 | 
				
			||||||
									 t=commonDao.load(Task.class, Long.parseLong(id));
 | 
														 t=commonDao.load(Task.class, Long.parseLong(id));
 | 
				
			||||||
									 ptd=commonDao.load(PickTicketDetail.class, t.getPickTicketDetail().getId());
 | 
														 ptd=commonDao.load(PickTicketDetail.class, t.getPickTicketDetail().getId());
 | 
				
			||||||
									 pt=commonDao.load(PickTicket.class, ptd.getPickTicket().getId());
 | 
														 pt=commonDao.load(PickTicket.class, ptd.getPickTicket().getId());
 | 
				
			||||||
| 
						 | 
					@ -6667,9 +6681,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
 | 
				
			||||||
									String macs="";
 | 
														String macs="";
 | 
				
			||||||
									String printName="";
 | 
														String printName="";
 | 
				
			||||||
									double qty=0;//拣货数量
 | 
														double qty=0;//拣货数量
 | 
				
			||||||
									if (unQty == 0) {
 | 
														
 | 
				
			||||||
										break;
 | 
					 | 
				
			||||||
									}
 | 
					 | 
				
			||||||
									if(quantity>t.getPlanQuantity()){
 | 
														if(quantity>t.getPlanQuantity()){
 | 
				
			||||||
										qty=t.getPlanQuantity();
 | 
															qty=t.getPlanQuantity();
 | 
				
			||||||
										quantity=quantity-t.getPlanQuantity();
 | 
															quantity=quantity-t.getPlanQuantity();
 | 
				
			||||||
| 
						 | 
					@ -9842,7 +9854,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
 | 
				
			||||||
									}else {
 | 
														}else {
 | 
				
			||||||
									if(hx.length()>0) {
 | 
														if(hx.length()>0) {
 | 
				
			||||||
										int hs=Integer.parseInt(hx);
 | 
															int hs=Integer.parseInt(hx);
 | 
				
			||||||
										if(hs>30) {
 | 
															if(hs>15) {
 | 
				
			||||||
											data1.put("soi", "2");//2绿色颜色
 | 
																data1.put("soi", "2");//2绿色颜色
 | 
				
			||||||
										}else {
 | 
															}else {
 | 
				
			||||||
											data1.put("soi", "0");//0无颜色
 | 
																data1.put("soi", "0");//0无颜色
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3194,9 +3194,11 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven
 | 
				
			||||||
		stock.setType(status);
 | 
							stock.setType(status);
 | 
				
			||||||
		commonDao.store(stock);
 | 
							commonDao.store(stock);
 | 
				
			||||||
		for (Inventory inventory : inventories) {
 | 
							for (Inventory inventory : inventories) {
 | 
				
			||||||
 | 
								if(inventory.getStatus().equals("整理中")) {
 | 
				
			||||||
			inventory.setStatus(status);
 | 
								inventory.setStatus(status);
 | 
				
			||||||
			inventory.setMoveStatus(null);
 | 
								inventory.setMoveStatus(null);
 | 
				
			||||||
			commonDao.store(inventory); 
 | 
								commonDao.store(inventory); 
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -416,12 +416,14 @@ public interface PickTicketManager extends BaseManager {
 | 
				
			||||||
	/**美务转换*/
 | 
						/**美务转换*/
 | 
				
			||||||
	@Transactional
 | 
						@Transactional
 | 
				
			||||||
	void mwzh(List<Long> ids,Date date,int qty,String driver,String cph,String remark);
 | 
						void mwzh(List<Long> ids,Date date,int qty,String driver,String cph,String remark);
 | 
				
			||||||
	
 | 
						//手工分配
 | 
				
			||||||
	@Transactional
 | 
						@Transactional
 | 
				
			||||||
	void manualAllocate(Map clientParams,List<Long>  id);
 | 
						void manualAllocate(Map clientParams,List<Long>  id);
 | 
				
			||||||
	@Transactional
 | 
						@Transactional
 | 
				
			||||||
	void manualAllocate(Long ptdid,Long invid);
 | 
						void manualAllocate(Long ptdid,Long invid);
 | 
				
			||||||
	
 | 
						//不良品手工分配
 | 
				
			||||||
 | 
						@Transactional
 | 
				
			||||||
 | 
						void defectiveManualAllocate(Map clientParams,List<Long>  id);
 | 
				
			||||||
	/**取消分配*/
 | 
						/**取消分配*/
 | 
				
			||||||
	@Transactional
 | 
						@Transactional
 | 
				
			||||||
	void cancellAllocate(List<Long> ids);
 | 
						void cancellAllocate(List<Long> ids);
 | 
				
			||||||
| 
						 | 
					@ -705,9 +707,12 @@ public interface PickTicketManager extends BaseManager {
 | 
				
			||||||
		void createSeedWallArrangeTask();
 | 
							void createSeedWallArrangeTask();
 | 
				
			||||||
		@Transactional
 | 
							@Transactional
 | 
				
			||||||
		void createAGVtask(List<Long> ids,Long id);
 | 
							void createAGVtask(List<Long> ids,Long id);
 | 
				
			||||||
		
 | 
							//打印标签
 | 
				
			||||||
		@Transactional
 | 
							@Transactional
 | 
				
			||||||
		void updatePrintTask(List<Long> ids,Long pId,int nuber);
 | 
							void updatePrintTask(List<Long> ids,Long pId,int nuber);
 | 
				
			||||||
 | 
							//记录标签补打次数
 | 
				
			||||||
 | 
							@Transactional
 | 
				
			||||||
 | 
							void reprintPrintTask(String barCode,Long pId,int nuber,Long workerId);
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		@Transactional
 | 
							@Transactional
 | 
				
			||||||
		Task createTask(Inventory inventory, PickTicketDetail ptd, double allocateQty);
 | 
							Task createTask(Inventory inventory, PickTicketDetail ptd, double allocateQty);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -73,6 +73,7 @@ import com.dev.swms.server.model.count.CountRecord;
 | 
				
			||||||
import com.dev.swms.server.model.count.CountStatus;
 | 
					import com.dev.swms.server.model.count.CountStatus;
 | 
				
			||||||
import com.dev.swms.server.model.delivery.PlantLocation;
 | 
					import com.dev.swms.server.model.delivery.PlantLocation;
 | 
				
			||||||
import com.dev.swms.server.model.interfaceLog.InterfaceLog;
 | 
					import com.dev.swms.server.model.interfaceLog.InterfaceLog;
 | 
				
			||||||
 | 
					import com.dev.swms.server.model.interfaceLog.OperationHis;
 | 
				
			||||||
import com.dev.swms.server.model.interfaces.InterfaceWmsOut;
 | 
					import com.dev.swms.server.model.interfaces.InterfaceWmsOut;
 | 
				
			||||||
import com.dev.swms.server.model.inventory.AgvTask;
 | 
					import com.dev.swms.server.model.inventory.AgvTask;
 | 
				
			||||||
import com.dev.swms.server.model.inventory.Configuration;
 | 
					import com.dev.swms.server.model.inventory.Configuration;
 | 
				
			||||||
| 
						 | 
					@ -2878,7 +2879,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
 | 
				
			||||||
		task.setPlanQuantityMU(allocateQty);
 | 
							task.setPlanQuantityMU(allocateQty);
 | 
				
			||||||
		task.setInventoryStatus(inventory.getStatus());
 | 
							task.setInventoryStatus(inventory.getStatus());
 | 
				
			||||||
		task.setCreateTime(new Date());
 | 
							task.setCreateTime(new Date());
 | 
				
			||||||
		
 | 
							task.setStrBill10(inventory.getStatuss());
 | 
				
			||||||
		task.setWarehouseArea(inventory.getLocation().getZone());
 | 
							task.setWarehouseArea(inventory.getLocation().getZone());
 | 
				
			||||||
		task.setBarCode(inventory.getBarCode());
 | 
							task.setBarCode(inventory.getBarCode());
 | 
				
			||||||
		task.setSrcLP(inventory.getLocation().getStock());
 | 
							task.setSrcLP(inventory.getLocation().getStock());
 | 
				
			||||||
| 
						 | 
					@ -4141,10 +4142,10 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
 | 
				
			||||||
					invsql += " AND inv.itemKey.lotInfo.propD2 is null ";
 | 
										invsql += " AND inv.itemKey.lotInfo.propD2 is null ";
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				//是否是退料
 | 
									//是否是退料
 | 
				
			||||||
				if(task.getStrBill10()!=null) {
 | 
									if(task.getStrBill10()!=null&&task.getStrBill10().length()>0) {
 | 
				
			||||||
					invsql += " AND inv.statuss='"+task.getStrBill10()+"' ";
 | 
										invsql += " AND inv.statuss='"+task.getStrBill10()+"' ";
 | 
				
			||||||
				}else {
 | 
									}else {
 | 
				
			||||||
					invsql += " AND inv.statuss is null ";
 | 
										invsql += " AND (inv.statuss is null or inv.statuss='' ) ";
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			invsql+=" order by inv.queuedQuantity desc ";
 | 
								invsql+=" order by inv.queuedQuantity desc ";
 | 
				
			||||||
| 
						 | 
					@ -7220,6 +7221,9 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
 | 
				
			||||||
					 w = this.load(Worker.class, t.getWorker4().getId());  
 | 
										 w = this.load(Worker.class, t.getWorker4().getId());  
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				PrintEquipment printEquipment = commonDao.load(PrintEquipment.class, pId);
 | 
									PrintEquipment printEquipment = commonDao.load(PrintEquipment.class, pId);
 | 
				
			||||||
 | 
									if(printEquipment==null) {
 | 
				
			||||||
 | 
										throw new BusinessException("请选择打印机");
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
				SimpleDateFormat ymd = new SimpleDateFormat("yyyyMMdd");
 | 
									SimpleDateFormat ymd = new SimpleDateFormat("yyyyMMdd");
 | 
				
			||||||
				SimpleDateFormat ymd1 = new SimpleDateFormat("yyyy-MM-dd");
 | 
									SimpleDateFormat ymd1 = new SimpleDateFormat("yyyy-MM-dd");
 | 
				
			||||||
				String macs = "";
 | 
									String macs = "";
 | 
				
			||||||
| 
						 | 
					@ -10066,4 +10070,145 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick
 | 
				
			||||||
		data=obj.toString();
 | 
							data=obj.toString();
 | 
				
			||||||
		return data;
 | 
							return data;
 | 
				
			||||||
	}	
 | 
						}	
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						public void reprintPrintTask(String barCode,Long pId,int nuber,Long workerId) {
 | 
				
			||||||
 | 
							if(barCode!=null&&barCode.length()>0) {
 | 
				
			||||||
 | 
								String billCode="";//料号
 | 
				
			||||||
 | 
								String itemcode="";//子任务号
 | 
				
			||||||
 | 
								String itemNuber="";//行号
 | 
				
			||||||
 | 
								String [] str=null;
 | 
				
			||||||
 | 
								if(barCode.indexOf("/")!=-1){
 | 
				
			||||||
 | 
									str=barCode.split("/");
 | 
				
			||||||
 | 
									if(str.length>=2){
 | 
				
			||||||
 | 
										billCode=str[1].trim();
 | 
				
			||||||
 | 
										itemNuber=str[2].trim();
 | 
				
			||||||
 | 
										itemcode=str[3].trim();
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									if(nuber<=0) {
 | 
				
			||||||
 | 
										throw new BusinessException("打印张数必须大于0"); 
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									String sql ="select t.id from Task t where t.movedQuantityMU>0 and "
 | 
				
			||||||
 | 
											+ " t.billCode='"+billCode+"' and t.itemKey.item.code='"+itemcode+"'"
 | 
				
			||||||
 | 
													+ " and t.pickTicketDetail.lineNumber='"+itemNuber+"'";
 | 
				
			||||||
 | 
								List<Long> list=commonDao.findByQuery(sql);
 | 
				
			||||||
 | 
									if(list.size()>0) {
 | 
				
			||||||
 | 
										updatePrintTask(list, pId, nuber);
 | 
				
			||||||
 | 
										OperationHis his =null;
 | 
				
			||||||
 | 
										String hql=" from OperationHis o where o.sourceType='补打标签' and actionName='补打标签' ";
 | 
				
			||||||
 | 
										List<OperationHis> ohs=commonDao.findByQuery(hql);
 | 
				
			||||||
 | 
										if(ohs.size()>0) {
 | 
				
			||||||
 | 
											his=ohs.get(0);
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
										if(his==null) {
 | 
				
			||||||
 | 
											his= (OperationHis) EntityFactory.getEntity(OperationHis.class);
 | 
				
			||||||
 | 
											his.setSourceId(pId);
 | 
				
			||||||
 | 
											his.setSourceNo(barCode);
 | 
				
			||||||
 | 
											his.setSourceType("补打标签");
 | 
				
			||||||
 | 
											his.setActionName("补打标签");
 | 
				
			||||||
 | 
											his.setQuantity(his.getQuantity()+1);
 | 
				
			||||||
 | 
											
 | 
				
			||||||
 | 
											his.setRemark("补打标签");
 | 
				
			||||||
 | 
											his.setWarehouseId(1L);
 | 
				
			||||||
 | 
											his.setExtendStr1("WMS");
 | 
				
			||||||
 | 
											his.setUserId(workerId);
 | 
				
			||||||
 | 
											his.setUpdateTime(new Date());
 | 
				
			||||||
 | 
											this.commonDao.store(his);
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
					//					wmsOperationHisManager.storeOperationHis(pId, barCode, null, "", "补打标签", "补打标签", null, null, 0,
 | 
				
			||||||
 | 
					//							nuber, 0, 0, "", "WMS");
 | 
				
			||||||
 | 
									}else {
 | 
				
			||||||
 | 
										throw new BusinessException("二维码查询失败"); 
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						public void defectiveManualAllocate(Map params, List<Long> id) {
 | 
				
			||||||
 | 
							PickTicketDetail ptd = commonDao.load(PickTicketDetail.class, id.get(0));
 | 
				
			||||||
 | 
							PickTicket pt = null;
 | 
				
			||||||
 | 
							if (ptd != null) {
 | 
				
			||||||
 | 
								pt = commonDao.load(PickTicket.class, ptd.getPickTicket().getId());
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							List<Task> tasks=new ArrayList<Task>();
 | 
				
			||||||
 | 
							Set<Map.Entry<Long, List>> itor = params.entrySet();
 | 
				
			||||||
 | 
							double allocatedQuantity = 0;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							for (Map.Entry<Long, List> me : itor) {
 | 
				
			||||||
 | 
								ReceivingInventory rd = this.load(ReceivingInventory.class, Long.parseLong(me.getKey().toString()));
 | 
				
			||||||
 | 
								double rd_qty=rd.getReceivedQuantity()-rd.getShippedQuantity();
 | 
				
			||||||
 | 
								double quantity = Double.parseDouble(me.getValue().get(0).toString());
 | 
				
			||||||
 | 
								double unallocateQty = ptd.getOrderQuantity() - ptd.getAllocatedQuantity();
 | 
				
			||||||
 | 
								if(rd_qty<=0) {
 | 
				
			||||||
 | 
									throw new BusinessException("不良品数量不足");
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if(quantity>rd_qty) {
 | 
				
			||||||
 | 
									throw new BusinessException("输入数量不能大于库存数量");
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if(rd.getStrBill1()==null||rd.getStrBill1().length()==0) {
 | 
				
			||||||
 | 
									throw new BusinessException("NCR号不能为空");
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if (unallocateQty == 0) {
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if (quantity > unallocateQty) {
 | 
				
			||||||
 | 
									allocatedQuantity = unallocateQty;
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									allocatedQuantity = quantity;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								//
 | 
				
			||||||
 | 
								String hql=" from Inventory inv where inv.location.id="+rd.getLocation().getId()
 | 
				
			||||||
 | 
										+" and inv.itemKey.item.id="+rd.getItemKey().getItem().getId()
 | 
				
			||||||
 | 
										+" and inv.itemKey.lotInfo.propC2='"+rd.getItemKey().getLotInfo().getPropC2()+"' "
 | 
				
			||||||
 | 
										+" and inv.itemKey.lotInfo.propC9='"+rd.getItemKey().getLotInfo().getPropC9()+"' "
 | 
				
			||||||
 | 
										+ " and inv.quantity-inv.queuedQuantity>"+allocatedQuantity
 | 
				
			||||||
 | 
										+ "  ";
 | 
				
			||||||
 | 
									if(rd.getBarCode()!=null&&rd.getBarCode().length()>0) {
 | 
				
			||||||
 | 
										hql=" and inv.barCode='"+rd.getBarCode()+"' ";
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								List<Inventory> invsList=commonDao.findByQuery(hql);
 | 
				
			||||||
 | 
					//			for(Inventory inventory:invsList) {
 | 
				
			||||||
 | 
					//				
 | 
				
			||||||
 | 
					//			}
 | 
				
			||||||
 | 
								if(invsList.size()>0) {
 | 
				
			||||||
 | 
									Inventory inventory=invsList.get(0);
 | 
				
			||||||
 | 
									Task task = createTask(inventory, ptd, allocatedQuantity);
 | 
				
			||||||
 | 
									task.setNcrCode(rd.getStrBill1());
 | 
				
			||||||
 | 
									commonDao.store(task);
 | 
				
			||||||
 | 
									tasks.add(task);
 | 
				
			||||||
 | 
									inventory.setQueuedQuantity(inventory.getQueuedQuantity()+allocatedQuantity);
 | 
				
			||||||
 | 
									commonDao.store(inventory);
 | 
				
			||||||
 | 
									ptd.setAllocatedQuantity(ptd.getAllocatedQuantity() + allocatedQuantity);
 | 
				
			||||||
 | 
									if(task.getBarCode()!=null&&!task.getBarCode().equals("")) {
 | 
				
			||||||
 | 
										if(ptd.getStrBill14()!=null&&ptd.getStrBill14().length()>0) {
 | 
				
			||||||
 | 
											if(ptd.getStrBill15()!=null&&ptd.getStrBill15().equals("1")) {
 | 
				
			||||||
 | 
												ptd.setStrBill14(task.getBarCode());
 | 
				
			||||||
 | 
											}else {
 | 
				
			||||||
 | 
												if(!task.getBarCode().equals(ptd.getStrBill14())) {
 | 
				
			||||||
 | 
													throw new BusinessException("" + "必须分配该序列号"+ptd.getStrBill14());
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										}else {
 | 
				
			||||||
 | 
											ptd.setStrBill14(task.getBarCode());
 | 
				
			||||||
 | 
											ptd.setStrBill15("1");
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									commonDao.store(ptd);
 | 
				
			||||||
 | 
								}else {
 | 
				
			||||||
 | 
									throw new BusinessException("库存汇总库存不足!");
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
							//回传状态,工单出库才回传
 | 
				
			||||||
 | 
							if (pt != null && pt.getCode().indexOf("CP") == -1
 | 
				
			||||||
 | 
									&&pt.getBillType().getName().indexOf("工单")>=0&&tasks.size()>0) {
 | 
				
			||||||
 | 
					//			List<Long> pdids = new ArrayList<Long>();
 | 
				
			||||||
 | 
					//			pdids.add(ptd.getId());
 | 
				
			||||||
 | 
								interfaceReqManager.wmsSapZhuantaihuichuang(tasks, 0,"",1);// 状态回传
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if(pt!=null) {
 | 
				
			||||||
 | 
							refreshOrderQuantity(pt);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -457,6 +457,7 @@ public class ASNReceiveServlet extends HttpServlet {
 | 
				
			||||||
			String billCode =json.has("taskCode")?json.getString("taskCode"):"";//子任务好
 | 
								String billCode =json.has("taskCode")?json.getString("taskCode"):"";//子任务好
 | 
				
			||||||
			String sid=json.has("s_id")?json.getString("s_id"):"";//容器
 | 
								String sid=json.has("s_id")?json.getString("s_id"):"";//容器
 | 
				
			||||||
			String str_loc=json.has("str_loc")?json.getString("str_loc"):"";//LOC
 | 
								String str_loc=json.has("str_loc")?json.getString("str_loc"):"";//LOC
 | 
				
			||||||
 | 
								
 | 
				
			||||||
			String applicant=json.has("applicantName")?json.getString("applicantName"):"";//申请人
 | 
								String applicant=json.has("applicantName")?json.getString("applicantName"):"";//申请人
 | 
				
			||||||
			String location_id=json.has("location_id")?json.getString("location_id"):"0";//合单库位
 | 
								String location_id=json.has("location_id")?json.getString("location_id"):"0";//合单库位
 | 
				
			||||||
			if(sid==null||sid.equals("")) {
 | 
								if(sid==null||sid.equals("")) {
 | 
				
			||||||
| 
						 | 
					@ -472,6 +473,8 @@ public class ASNReceiveServlet extends HttpServlet {
 | 
				
			||||||
			String mac =json.has("mac")?json.getString("mac"):"";
 | 
								String mac =json.has("mac")?json.getString("mac"):"";
 | 
				
			||||||
			String pqty =json.has("pqty")?json.getString("pqty"):"1";
 | 
								String pqty =json.has("pqty")?json.getString("pqty"):"1";
 | 
				
			||||||
			String itemCode =json.has("item_code")?json.getString("item_code"):"";
 | 
								String itemCode =json.has("item_code")?json.getString("item_code"):"";
 | 
				
			||||||
 | 
								String beUnpacking=json.has("beUnpacking")?json.getString("beUnpacking"):"";//是否最小包装
 | 
				
			||||||
 | 
								
 | 
				
			||||||
			try {
 | 
								try {
 | 
				
			||||||
				resultJson=app.picking(taskId,s_id,billCode,serials,itemCode,mac,quantity,lsCode,Long.parseLong(number), workerId, wId,false,applicant,loc_id);
 | 
									resultJson=app.picking(taskId,s_id,billCode,serials,itemCode,mac,quantity,lsCode,Long.parseLong(number), workerId, wId,false,applicant,loc_id);
 | 
				
			||||||
				try {
 | 
									try {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,6 +32,7 @@ import com.dev.swms.server.model.shipping.PrintEquipment;
 | 
				
			||||||
import com.dev.swms.server.model.shipping.PrintTask;
 | 
					import com.dev.swms.server.model.shipping.PrintTask;
 | 
				
			||||||
import com.dev.swms.server.service.base.WorkerManager;
 | 
					import com.dev.swms.server.service.base.WorkerManager;
 | 
				
			||||||
import com.dev.swms.server.service.interfaceLog.QueryAppManager;
 | 
					import com.dev.swms.server.service.interfaceLog.QueryAppManager;
 | 
				
			||||||
 | 
					import com.dev.swms.server.service.shipping.PickTicketManager;
 | 
				
			||||||
import com.dev.swms.server.service.shipping.WaveDocManager;
 | 
					import com.dev.swms.server.service.shipping.WaveDocManager;
 | 
				
			||||||
import org.apache.log4j.Logger;
 | 
					import org.apache.log4j.Logger;
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					@ -128,6 +129,14 @@ private static Logger logger = Logger.getLogger(PrintServlet.class);
 | 
				
			||||||
			String pc1 =json.has("pc1")?json.getString("pc1"):"";
 | 
								String pc1 =json.has("pc1")?json.getString("pc1"):"";
 | 
				
			||||||
			long ptId = json.has("ptId")?Long.parseLong(json.getString("ptId").equals("")?"0":json.getString("ptId")):0;
 | 
								long ptId = json.has("ptId")?Long.parseLong(json.getString("ptId").equals("")?"0":json.getString("ptId")):0;
 | 
				
			||||||
			resultJson=this.printTask(itemId,ptId,barCodes, pc1,commonDao);
 | 
								resultJson=this.printTask(itemId,ptId,barCodes, pc1,commonDao);
 | 
				
			||||||
 | 
							}else if("reprintPrintTask".equals(methodType)){
 | 
				
			||||||
 | 
								//补打标签
 | 
				
			||||||
 | 
								String barCodes =json.has("barCodes")?json.getString("barCodes"):"";
 | 
				
			||||||
 | 
								long ptId = json.has("ptId")?Long.parseLong(json.getString("ptId").equals("")?"0":json.getString("ptId")):0;
 | 
				
			||||||
 | 
								long quantity = json.has("quantity")?Long.parseLong(json.getString("quantity").equals("")?"0":json.getString("quantity")):0;
 | 
				
			||||||
 | 
								String mac =json.has("mac")?json.getString("mac"):"";
 | 
				
			||||||
 | 
								String printName =json.has("printName")?json.getString("printName"):"";
 | 
				
			||||||
 | 
								resultJson=this.reprintPrintTask(ptId,barCodes, quantity,workerId,commonDao);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		logger.info("======"+resultJson.toString());
 | 
							logger.info("======"+resultJson.toString());
 | 
				
			||||||
		PrintWriter out = null;
 | 
							PrintWriter out = null;
 | 
				
			||||||
| 
						 | 
					@ -438,5 +447,31 @@ private static Logger logger = Logger.getLogger(PrintServlet.class);
 | 
				
			||||||
		resultJson.put("data", data);
 | 
							resultJson.put("data", data);
 | 
				
			||||||
		return resultJson;
 | 
							return resultJson;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						/**
 | 
				
			||||||
 | 
						 * 打印确认
 | 
				
			||||||
 | 
						 * @param ptId
 | 
				
			||||||
 | 
						 * @param commonDao
 | 
				
			||||||
 | 
						 * @return
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public  synchronized JSONObject reprintPrintTask(long ptId,String barCodes,Long qty,Long workerId,CommonDao commonDao){
 | 
				
			||||||
 | 
							JSONObject resultJson = new JSONObject();
 | 
				
			||||||
 | 
							String status="0";
 | 
				
			||||||
 | 
							String msg="";
 | 
				
			||||||
 | 
							String data="";
 | 
				
			||||||
 | 
							if(ptId>0){
 | 
				
			||||||
 | 
								try {
 | 
				
			||||||
 | 
									PickTicketManager pick = (PickTicketManager) ac.getBean("pickTicketManager");
 | 
				
			||||||
 | 
									pick.reprintPrintTask(barCodes,ptId,  qty.intValue(),workerId);
 | 
				
			||||||
 | 
									status="1";
 | 
				
			||||||
 | 
								} catch (Exception e) {
 | 
				
			||||||
 | 
									msg=e.getMessage();
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}else{
 | 
				
			||||||
 | 
								msg="ptId参数为null或参数错误!";
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							resultJson.put("status", status);
 | 
				
			||||||
 | 
							resultJson.put("msg", msg);
 | 
				
			||||||
 | 
							resultJson.put("data", data);
 | 
				
			||||||
 | 
							return resultJson;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -144,7 +144,7 @@ public class XLSExportGenerator implements ExportExcelGenerator, ApplicationCont
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	        
 | 
						        
 | 
				
			||||||
	      }
 | 
						      }
 | 
				
			||||||
	      return data;
 | 
						      return data.trim();
 | 
				
			||||||
	   }
 | 
						   }
 | 
				
			||||||
   
 | 
					   
 | 
				
			||||||
   public void delFile(String filePath){
 | 
					   public void delFile(String filePath){
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -455,3 +455,18 @@ ALTER TABLE   LOCATION_STORAGE    add be_auto tinyint  NULL;
 | 
				
			||||||
GO
 | 
					GO
 | 
				
			||||||
update LOCATION_STORAGE set be_auto=0 where be_auto is null;
 | 
					update LOCATION_STORAGE set be_auto=0 where be_auto is null;
 | 
				
			||||||
GO
 | 
					GO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--------2025-02-19
 | 
				
			||||||
 | 
					ALTER TABLE   ITEM    add BE_UNPACKING tinyint  NULL;
 | 
				
			||||||
 | 
					GO
 | 
				
			||||||
 | 
					update ITEM set BE_UNPACKING=0 where BE_UNPACKING is null;
 | 
				
			||||||
 | 
					GO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ALTER TABLE   task    add BE_UNPACKING tinyint  NULL;
 | 
				
			||||||
 | 
					GO
 | 
				
			||||||
 | 
					update task set BE_UNPACKING=0 where BE_UNPACKING is null;
 | 
				
			||||||
 | 
					GO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ALTER TABLE   task    add NCR_CODE varchar(50) COLLATE Chinese_PRC_CI_AS  NULL;
 | 
				
			||||||
 | 
					GO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -88,7 +88,7 @@
 | 
				
			||||||
                 <checkbox id="item.beMarkWeight" title="是否序列管理" row="6" col="3" defaultValue="false" span="1" readOnly="true" required="false" reserve="false" forceOverride="true" inVisible="false"/>
 | 
					                 <checkbox id="item.beMarkWeight" title="是否序列管理" row="6" col="3" defaultValue="false" span="1" readOnly="true" required="false" reserve="false" forceOverride="true" inVisible="false"/>
 | 
				
			||||||
                 <!-- <text id="item.isBOM" title="是否有效期" row="6" col="3" defaultValue="false" span="1" readOnly="true" required="false" reserve="false" forceOverride="true" inVisible="false"/> -->
 | 
					                 <!-- <text id="item.isBOM" title="是否有效期" row="6" col="3" defaultValue="false" span="1" readOnly="true" required="false" reserve="false" forceOverride="true" inVisible="false"/> -->
 | 
				
			||||||
                 <booleanList id="item.isBOM" title="是否有效期" row="6" col="4" span="1" readOnly="false" required="true" reserve="false" forceOverride="true" inVisible="false"/>
 | 
					                 <booleanList id="item.isBOM" title="是否有效期" row="6" col="4" span="1" readOnly="false" required="true" reserve="false" forceOverride="true" inVisible="false"/>
 | 
				
			||||||
                 
 | 
					                 <checkbox id="item.beUnpacking" title="是否一包一个" row="7" col="1" defaultValue="false" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false"/>
 | 
				
			||||||
		</inputUIs>
 | 
							</inputUIs>
 | 
				
			||||||
		<buttons>
 | 
							<buttons>
 | 
				
			||||||
			<commit id="save" title="save" enableType="none">
 | 
								<commit id="save" title="save" enableType="none">
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -193,7 +193,7 @@
 | 
				
			||||||
 /~inventory.SOI: AND task.billCode LIKE {inventory.SOI}~/
 | 
					 /~inventory.SOI: AND task.billCode LIKE {inventory.SOI}~/
 | 
				
			||||||
  /~task.strBill4: AND task.strBill4 LIKE {task.strBill4}~/
 | 
					  /~task.strBill4: AND task.strBill4 LIKE {task.strBill4}~/
 | 
				
			||||||
 /~propC2: AND itemKey.lotInfo.propC2 like {propC2} ~/)
 | 
					 /~propC2: AND itemKey.lotInfo.propC2 like {propC2} ~/)
 | 
				
			||||||
  /~billType.name: AND billType.id = {billType.name}~/
 | 
					  /~billType.name: AND pickTicket.billType.id = {billType.name}~/
 | 
				
			||||||
 /~szone.id: AND szone.id = {szone.id}~/
 | 
					 /~szone.id: AND szone.id = {szone.id}~/
 | 
				
			||||||
 order by task.pickTicketDetail.pickTicket.orderDate,task.id desc
 | 
					 order by task.pickTicketDetail.pickTicket.orderDate,task.id desc
 | 
				
			||||||
 ]]></datasource>
 | 
					 ]]></datasource>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,135 @@
 | 
				
			||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<pages>
 | 
				
			||||||
 | 
						<maintainPage id="maintainReceivingInventoryManualPage"
 | 
				
			||||||
 | 
							title="maintainReceivingInventoryManualPage" width="950" height="550"
 | 
				
			||||||
 | 
							autoQuery="true">
 | 
				
			||||||
 | 
							<search>
 | 
				
			||||||
 | 
								<inputUIs>
 | 
				
			||||||
 | 
									<hidden id="pickTicketDetail.id" reserve="false" />
 | 
				
			||||||
 | 
									<text id="itemKeyLot" title="NCR"
 | 
				
			||||||
 | 
										row="2" span="1" readOnly="false" required="false" reserve="false"
 | 
				
			||||||
 | 
										forceOverride="true" inVisible="false" trimSpace="true" />
 | 
				
			||||||
 | 
									<remote id="location.id" title="location" row="2" col="2"
 | 
				
			||||||
 | 
										readOnly="false" required="false" reserve="false" forceOverride="false"
 | 
				
			||||||
 | 
										inVisible="false" editModel="normal" manualEditable="true"
 | 
				
			||||||
 | 
										displayColumn="2" displayedTableHead="序号,库位编码,库位名称">
 | 
				
			||||||
 | 
										<hql><![CDATA[ select location.id, location.code, location.name
 | 
				
			||||||
 | 
					 from Location location 
 | 
				
			||||||
 | 
					 where upper(location.code) like upper(:param) 
 | 
				
			||||||
 | 
					 and location.warehouse = #{SESSION_WAREHOUSE}
 | 
				
			||||||
 | 
					 and location.type <> 'COUNT' and location.disabled=false
 | 
				
			||||||
 | 
					 ]]></hql>
 | 
				
			||||||
 | 
									</remote>
 | 
				
			||||||
 | 
									
 | 
				
			||||||
 | 
									<text id="inventory.barCode" title="序列号" row="5" col="2"
 | 
				
			||||||
 | 
										span="1" readOnly="false" required="false" reserve="false"
 | 
				
			||||||
 | 
										forceOverride="true" inVisible="false" trimSpace="true" />
 | 
				
			||||||
 | 
									<date id="inventory.storageDate" title="inventory.storageDate"
 | 
				
			||||||
 | 
										row="6" span="1" readOnly="false" required="false" reserve="false"
 | 
				
			||||||
 | 
										forceOverride="true" inVisible="false" showTime="false"
 | 
				
			||||||
 | 
										manualEditable="true" defaultCurrentDate="false" />
 | 
				
			||||||
 | 
									<list id="inventory.propC2" title="LOC" row="6" 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>	
 | 
				
			||||||
 | 
								</inputUIs>
 | 
				
			||||||
 | 
							</search>
 | 
				
			||||||
 | 
							<datasource type="hql" displayRowCount="1"><![CDATA[SELECT rd.id,
 | 
				
			||||||
 | 
					 rd.receivedQuantity-rd.shippedQuantity,
 | 
				
			||||||
 | 
					 rd.location.zone.code,
 | 
				
			||||||
 | 
					 rd.location.code,
 | 
				
			||||||
 | 
					 rd.itemKey.item.code,
 | 
				
			||||||
 | 
					  rd.itemKey.lotInfo.propC1,
 | 
				
			||||||
 | 
					  rd.barCode,
 | 
				
			||||||
 | 
					  rd.strBill1,
 | 
				
			||||||
 | 
					 rd.itemKey.lotInfo.propC2,
 | 
				
			||||||
 | 
					 rd.itemKey.lotInfo.propC3,
 | 
				
			||||||
 | 
					 rd.itemKey.lotInfo.propC5,
 | 
				
			||||||
 | 
					 rd.itemKey.lotInfo.propC9,
 | 
				
			||||||
 | 
					 rd.itemKey.item.unit,
 | 
				
			||||||
 | 
					 rd.receivedQuantity-rd.shippedQuantity,
 | 
				
			||||||
 | 
					 rd.receiveDate,
 | 
				
			||||||
 | 
					 rd.itemKey.lotInfo.propC6,
 | 
				
			||||||
 | 
					 rd.itemKey.lotInfo.propC7,
 | 
				
			||||||
 | 
					  rd.strBill2
 | 
				
			||||||
 | 
					 FROM ReceivingInventory rd 
 | 
				
			||||||
 | 
					 LEFT JOIN rd.location location 
 | 
				
			||||||
 | 
					 LEFT JOIN rd.location.zone
 | 
				
			||||||
 | 
					 LEFT JOIN rd.itemKey.item item
 | 
				
			||||||
 | 
					 LEFT JOIN rd.itemKey
 | 
				
			||||||
 | 
					 WHERE 1=1 
 | 
				
			||||||
 | 
					 and item.id=(select d.item.id from PickTicketDetail d where d.id={id} )
 | 
				
			||||||
 | 
					 and rd.location.type not in('RECEIVE','SHIP')
 | 
				
			||||||
 | 
					 AND (rd.receivedQuantity-rd.shippedQuantity) > 0 
 | 
				
			||||||
 | 
					 AND location.warehouse = #{SESSION_WAREHOUSE} 
 | 
				
			||||||
 | 
					 /~location.id: AND rd.location.id = {location.id}~/
 | 
				
			||||||
 | 
					 /~itemKeyLot: AND rd.strBill1 LIKE {itemKeyLot}~/
 | 
				
			||||||
 | 
					 /~inventory.barCode: AND rd.barCode LIKE {inventory.barCode}~/
 | 
				
			||||||
 | 
					 /~inventory.propC2: AND rd.itemKey.lotInfo.propC2 LIKE {inventory.propC2}~/
 | 
				
			||||||
 | 
					 /~inventory.storageDate: AND rd.storageDate = {inventory.storageDate}~/
 | 
				
			||||||
 | 
					 	order by rd.receiveDate asc,rd.id asc
 | 
				
			||||||
 | 
					 ]]></datasource>
 | 
				
			||||||
 | 
							<columns>
 | 
				
			||||||
 | 
								<column id="inventory.id" title="ID" visible="false" />
 | 
				
			||||||
 | 
								<column id="inputQuantity" title="inputAllocateQuantity"
 | 
				
			||||||
 | 
									visible="true" horizonAlign="center" verticalAlign="middle" inputUI="text"
 | 
				
			||||||
 | 
									inputUIValidator="integerRequired" />
 | 
				
			||||||
 | 
								<column id="location.zone.code" title="库区" visible="true"
 | 
				
			||||||
 | 
									horizonAlign="left" width="100" />
 | 
				
			||||||
 | 
								<column id="location.code" title="库位" visible="true"
 | 
				
			||||||
 | 
									horizonAlign="left" width="100" />
 | 
				
			||||||
 | 
								<column id="item.code" title="料号" visible="true"
 | 
				
			||||||
 | 
									horizonAlign="left" width="130"/>
 | 
				
			||||||
 | 
								<column id="inventory.itemKey.propC1" width="100"
 | 
				
			||||||
 | 
									title="maintainInventoryPage.itemKeyId" visible="true" horizonAlign="left" />
 | 
				
			||||||
 | 
								<column id="inventory.barCode" width="80"
 | 
				
			||||||
 | 
									title="序列号" visible="true" horizonAlign="left" />
 | 
				
			||||||
 | 
								<column id="rd.strBill1" width="100"
 | 
				
			||||||
 | 
									title="NCR" visible="true" horizonAlign="left" />	
 | 
				
			||||||
 | 
								<column id="inventory.itemKey.propC2" width="100"
 | 
				
			||||||
 | 
									title="LOC" visible="true" horizonAlign="left" />
 | 
				
			||||||
 | 
								<column id="inventory.itemKey.propC3" width="100"
 | 
				
			||||||
 | 
									title="特殊标记" visible="true" horizonAlign="left" />
 | 
				
			||||||
 | 
								<column id="inventory.itemKey.propC5" width="100"
 | 
				
			||||||
 | 
									title="特殊库存" visible="true" horizonAlign="left" />
 | 
				
			||||||
 | 
								<column id="inventory.itemKey.propC9" width="100"
 | 
				
			||||||
 | 
									title="工厂" visible="true" horizonAlign="left" />	
 | 
				
			||||||
 | 
								<column id="inventory.packageUnit.unit" title="packageUnit"
 | 
				
			||||||
 | 
									visible="true" horizonAlign="left" width="70" />
 | 
				
			||||||
 | 
								<column id="inventory.quantity" title="inventory.quantity"
 | 
				
			||||||
 | 
									visible="true" horizonAlign="right" width="75" />
 | 
				
			||||||
 | 
								<column id="inventory.storageDate" title="inventory.storageDate"
 | 
				
			||||||
 | 
									visible="true" horizonAlign="left" />
 | 
				
			||||||
 | 
								<column id="inventory.itemKey.propC6" width="100"
 | 
				
			||||||
 | 
									title="申请人号" visible="true" horizonAlign="left" />
 | 
				
			||||||
 | 
								<column id="inventory.itemKey.propC7" width="100"
 | 
				
			||||||
 | 
									title="申请人" visible="true" horizonAlign="left" />		
 | 
				
			||||||
 | 
								<column id="inventory.SOI" title="inventory.SOI" visible="true"
 | 
				
			||||||
 | 
									horizonAlign="left" />
 | 
				
			||||||
 | 
							</columns>
 | 
				
			||||||
 | 
							<buttons>
 | 
				
			||||||
 | 
								<commit id="22allocate31" title="modifyPickTicketManualPage.allocate"
 | 
				
			||||||
 | 
									enableType="multi" invisible="false">
 | 
				
			||||||
 | 
									<mappings>
 | 
				
			||||||
 | 
										<mapping id="map" className="map" />
 | 
				
			||||||
 | 
										<mapping id="parentIds" className="list" />
 | 
				
			||||||
 | 
									</mappings>
 | 
				
			||||||
 | 
									<actions>
 | 
				
			||||||
 | 
										<action managerName="pickTicketManager" methodName="defectiveManualAllocate"
 | 
				
			||||||
 | 
											parameter="map,parentIds" />
 | 
				
			||||||
 | 
									</actions>
 | 
				
			||||||
 | 
									<forwards>
 | 
				
			||||||
 | 
										<forward name="refreshWindow" newEnabled="true"
 | 
				
			||||||
 | 
											editEnabled="true" />
 | 
				
			||||||
 | 
										<forward name="closeWindow" newEnabled="true" editEnabled="true" />
 | 
				
			||||||
 | 
										<forward name="refreshParent" newEnabled="true"
 | 
				
			||||||
 | 
											editEnabled="true" />
 | 
				
			||||||
 | 
									</forwards>
 | 
				
			||||||
 | 
								</commit>
 | 
				
			||||||
 | 
							</buttons>
 | 
				
			||||||
 | 
						</maintainPage>
 | 
				
			||||||
 | 
					</pages>
 | 
				
			||||||
| 
						 | 
					@ -75,6 +75,12 @@
 | 
				
			||||||
							editEnabled="true" />
 | 
												editEnabled="true" />
 | 
				
			||||||
					</forwards>
 | 
										</forwards>
 | 
				
			||||||
				</commit>
 | 
									</commit>
 | 
				
			||||||
 | 
									<popup id="341allocateASD" title="不良品分配"
 | 
				
			||||||
 | 
										enableType="single" invisible="false" containId="true"
 | 
				
			||||||
 | 
										pageId="maintainReceivingInventoryManualPage" >
 | 
				
			||||||
 | 
										<enableExpression><![CDATA[(${pickTicketDetail.orderQuantity}-${pickTicketDetail.allocatedQuantity}>0)  ]]></enableExpression>
 | 
				
			||||||
 | 
										</popup>
 | 
				
			||||||
 | 
									
 | 
				
			||||||
			</buttons>
 | 
								</buttons>
 | 
				
			||||||
		</detail>
 | 
							</detail>
 | 
				
			||||||
	</modifyDetailPage>
 | 
						</modifyDetailPage>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -44,7 +44,7 @@ where location.code like :param
 | 
				
			||||||
 ]]></hql>
 | 
					 ]]></hql>
 | 
				
			||||||
			</remote>
 | 
								</remote>
 | 
				
			||||||
			<checkbox id="beUrgent" title="是否回传SAP" row="17" col="1" defaultValue="true" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false" />
 | 
								<checkbox id="beUrgent" title="是否回传SAP" row="17" col="1" defaultValue="true" span="1" readOnly="false" required="false" reserve="false" forceOverride="true" inVisible="false" />
 | 
				
			||||||
			<text id="operator" title="NCR"
 | 
								<text id="task.ncrCode" title="NCR"
 | 
				
			||||||
				row="19" span="1" readOnly="false" required="false" reserve="false"
 | 
									row="19" span="1" readOnly="false" required="false" reserve="false"
 | 
				
			||||||
				forceOverride="true" inVisible="false" trimSpace="true" isPrecision="true" />
 | 
									forceOverride="true" inVisible="false" trimSpace="true" isPrecision="true" />
 | 
				
			||||||
		</inputUIs>
 | 
							</inputUIs>
 | 
				
			||||||
| 
						 | 
					@ -59,12 +59,12 @@ where location.code like :param
 | 
				
			||||||
					<mapping id="task.planQuantity" className="double" />
 | 
										<mapping id="task.planQuantity" className="double" />
 | 
				
			||||||
					<mapping id="workerId" className="long" />
 | 
										<mapping id="workerId" className="long" />
 | 
				
			||||||
					<mapping id="beUrgent" className="boolean" />
 | 
										<mapping id="beUrgent" className="boolean" />
 | 
				
			||||||
					<mapping id="operator" className="string" />
 | 
										<mapping id="task.ncrCode" className="string" />
 | 
				
			||||||
					<mapping id="loc_id" className="long" />
 | 
										<mapping id="loc_id" className="long" />
 | 
				
			||||||
				</mappings>
 | 
									</mappings>
 | 
				
			||||||
				<actions>
 | 
									<actions>
 | 
				
			||||||
					<action managerName="pickTicketManager" methodName="newPickConfirm"
 | 
										<action managerName="pickTicketManager" methodName="newPickConfirm"
 | 
				
			||||||
						parameter="task.id,task.dstLP.id,task.srcLoc.id,task.itemKey.propC1,task.planQuantity,workerId,beUrgent,operator,loc_id" />
 | 
											parameter="task.id,task.dstLP.id,task.srcLoc.id,task.itemKey.propC1,task.planQuantity,workerId,beUrgent,task.ncrCode,loc_id" />
 | 
				
			||||||
				</actions>
 | 
									</actions>
 | 
				
			||||||
				<forwards>
 | 
									<forwards>
 | 
				
			||||||
					<forward name="refreshParent" newEnabled="true"
 | 
										<forward name="refreshParent" newEnabled="true"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue