no message
							parent
							
								
									6204fbf1a8
								
							
						
					
					
						commit
						e09d38cea5
					
				| 
						 | 
				
			
			@ -2115,22 +2115,15 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven
 | 
			
		|||
 | 
			
		||||
	@Override
 | 
			
		||||
	public void shuaxin() {
 | 
			
		||||
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
 | 
			
		||||
		 List<ItemKey> ItemKeys =  commonDao.findByQuery(" from ItemKey ik where ik.item.company.id=:id ",
 | 
			
		||||
		 new String[] { "id"},new Object[] {1L});
 | 
			
		||||
		 for(ItemKey ik :ItemKeys){
 | 
			
		||||
			 String pc=ik.getLotInfo().getPropC1();
 | 
			
		||||
			 System.out.println(pc);
 | 
			
		||||
			 String date=pc.substring(0,10);
 | 
			
		||||
			 try {
 | 
			
		||||
				Date rq=sdf.parse(date);
 | 
			
		||||
				ik.getLotInfo().setPropD1(rq);
 | 
			
		||||
				commonDao.store(ik);
 | 
			
		||||
			} catch (ParseException e) {
 | 
			
		||||
				// TODO Auto-generated catch block
 | 
			
		||||
				e.printStackTrace();
 | 
			
		||||
			}
 | 
			
		||||
		String hql=" from Inventory inv where inv.itemKeyInventory.itemKey.item.company.id=30 and inv.quantity>0";
 | 
			
		||||
		List<Inventory> list=commonDao.findByQuery(hql);
 | 
			
		||||
		for(Inventory inv:list){
 | 
			
		||||
			String loc_hql=" from Location loc where loc.code='"+inv.getLocation().getCode()+"' and loc.warehouse.id=1001 ";
 | 
			
		||||
			List<Location> locations=commonDao.findByQuery(loc_hql);
 | 
			
		||||
			inv.setLocation(locations.get(0));
 | 
			
		||||
			commonDao.store(inv);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	@Override
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -135,19 +135,19 @@
 | 
			
		|||
            	<enableExpression><![CDATA[   ${inventory.queuedQuantity}==0]]></enableExpression>
 | 
			
		||||
            </popup>
 | 
			
		||||
            
 | 
			
		||||
<!-- 			<commit id="shuaxin" title="刷新" enableType="none" invisible="false"> -->
 | 
			
		||||
<!--                 <mappings> -->
 | 
			
		||||
<!--                     <mapping id="ids" className="list"/> -->
 | 
			
		||||
<!--                 </mappings> -->
 | 
			
		||||
<!--                 <actions> -->
 | 
			
		||||
<!--                     <action managerName="inventoryManager" methodName="shuaxin" /> -->
 | 
			
		||||
<!--                 </actions> -->
 | 
			
		||||
<!--                 <forwards> -->
 | 
			
		||||
<!--                    <forward name="refreshParent" newEnabled="true" editEnabled="true"/> -->
 | 
			
		||||
<!--                    <forward name="closeWindow" newEnabled="true" editEnabled="true"/> -->
 | 
			
		||||
<!--                    <forward name="refreshWindow" newEnabled="true" editEnabled="true"/> -->
 | 
			
		||||
<!--                 </forwards> -->
 | 
			
		||||
<!--             </commit> -->
 | 
			
		||||
<!-- 			<commit id="shuaxin" title="刷新" enableType="none" invisible="false">
 | 
			
		||||
                <mappings>
 | 
			
		||||
                    <mapping id="ids" className="list"/>
 | 
			
		||||
                </mappings>
 | 
			
		||||
                <actions>
 | 
			
		||||
                    <action managerName="inventoryManager" methodName="shuaxin" />
 | 
			
		||||
                </actions>
 | 
			
		||||
                <forwards>
 | 
			
		||||
                   <forward name="refreshParent" newEnabled="true" editEnabled="true"/>
 | 
			
		||||
                   <forward name="closeWindow" newEnabled="true" editEnabled="true"/>
 | 
			
		||||
                   <forward name="refreshWindow" newEnabled="true" editEnabled="true"/>
 | 
			
		||||
                </forwards>
 | 
			
		||||
            </commit> -->
 | 
			
		||||
		</buttons>
 | 
			
		||||
    </maintainPage>
 | 
			
		||||
</pages>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -1,153 +0,0 @@
 | 
			
		|||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
 | 
			
		||||
<pages>
 | 
			
		||||
    <maintainPage id="maintainInventoryPage" title="maintainInventoryPage" autoQuery="false">
 | 
			
		||||
        <search>
 | 
			
		||||
            <inputUIs>
 | 
			
		||||
            	<list id="company.id" title="asn.company" row="1" col="1" span="1" width="120" defaultValue="" readOnly="false" required="true" reserve="false" forceOverride="true">
 | 
			
		||||
                    <hql><![CDATA[select company.id, company.name from Structure company
 | 
			
		||||
 where company.beCompany = true and company.warehouse = #{SESSION_WAREHOUSE} 
 | 
			
		||||
 and company.disabled=false
 | 
			
		||||
 and (company.id in (select u.organization.id from UserOrganize u where u.user=#{SESSION_USERS})
 | 
			
		||||
 or 0=(select COALESCE(max(u.id),0) from UserOrganize u where u.user=#{SESSION_USERS})
 | 
			
		||||
 )
 | 
			
		||||
]]></hql>
 | 
			
		||||
             	</list>
 | 
			
		||||
          <!--       <list id="zone.id" title="zone" row="2" col="1" span="1" width="120px" defaultValue="1" readOnly="false" required="false" reserve="false" forceOverride="true">
 | 
			
		||||
                    <hql><![CDATA[select zone.id, zone.name from WarehouseArea zone
 | 
			
		||||
 where 1=1 
 | 
			
		||||
 and zone.warehouse = #{SESSION_WAREHOUSE} 
 | 
			
		||||
 and zone.disabled=false]]></hql>
 | 
			
		||||
                </list> -->
 | 
			
		||||
                <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 location.code like :param 
 | 
			
		||||
 and location.warehouse = #{SESSION_WAREHOUSE}
 | 
			
		||||
 and location.type <> 'COUNT' and location.disabled=false
 | 
			
		||||
 ]]></hql>
 | 
			
		||||
                </remote>
 | 
			
		||||
                <text id="item.code" title="item.code" row="3" col="1" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false"/>
 | 
			
		||||
                <text id="item.name" title="item.name" row="3" col="2" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false"/>
 | 
			
		||||
                 <list id="inventory.status" title="质量状态" row="4" width="120px" readOnly="false" required="false" reserve="false" forceOverride="true">
 | 
			
		||||
                <hql><![CDATA[select  commonCode.code,commonCode.code from CommonCode commonCode 
 | 
			
		||||
 where commonCode.codeType='质量状态'
 | 
			
		||||
 order by commonCode.id asc]]></hql>
 | 
			
		||||
            </list>
 | 
			
		||||
             <text id="item.strExtend2" title="旧货品代码" row="4" col="2" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false"/>
 | 
			
		||||
                
 | 
			
		||||
            <dateRanger id="date" title="日期" row="5" span="2" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" showTime="false" manualEditable="true" defaultCurrentDate="false" fromDate="date1" toDate="date2"/>
 | 
			
		||||
            <text id="propLC1" title="特殊备注" row="6" col="1" span="2" width="320" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false"/>
 | 
			
		||||
            <text id="propC1" title="到货日期" row="7" col="1" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false"/>
 | 
			
		||||
            <text id="strExtend3" title="颜色" row="7" col="2" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false"/>
 | 
			
		||||
            <text id="item.feeType" title="货类型" row="8" col="1" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false"/>
 | 
			
		||||
            <text id="propLC2" title="门店名称" row="8" col="2" readOnly="false" required="false" reserve="false" forceOverride="false" inVisible="false" trimSpace="false"/>
 | 
			
		||||
                   
 | 
			
		||||
            </inputUIs>
 | 
			
		||||
        </search>
 | 
			
		||||
        <datasource type="hql"><![CDATA[SELECT 
 | 
			
		||||
 inventory.id,
 | 
			
		||||
 company.name,
 | 
			
		||||
 location.code, 
 | 
			
		||||
 item.code,
 | 
			
		||||
 item.feeType,
 | 
			
		||||
 item.name, 
 | 
			
		||||
 item.specs, 
 | 
			
		||||
 item.strExtend3,
 | 
			
		||||
 inventory.status,
 | 
			
		||||
 itemKey.lotInfo.propC1,
 | 
			
		||||
 itemKey.lotInfo.propLC1, 
 | 
			
		||||
 itemKey.lotInfo.propLC2, 
 | 
			
		||||
 inventory.quantity,
 | 
			
		||||
 inventory.queuedQuantity,
 | 
			
		||||
 item.strExtend2,
 | 
			
		||||
 CAST(round(item.volume*inventory.quantity,3) as string),
 | 
			
		||||
 DATE_FORMAT(itemKey.lotInfo.propD1,'%Y-%m-%d %H:%i')
 | 
			
		||||
 FROM Inventory inventory
 | 
			
		||||
 LEFT JOIN inventory.location as location
 | 
			
		||||
 LEFT JOIN inventory.itemKeyInventory as itemKeyInventory
 | 
			
		||||
 LEFT JOIN itemKeyInventory.itemKey as itemKey
 | 
			
		||||
 LEFT JOIN itemKey.item as item
 | 
			
		||||
 LEFT JOIN item.company as company
 | 
			
		||||
 WHERE 1=1
 | 
			
		||||
 and item.warehouse = #{SESSION_WAREHOUSE}
 | 
			
		||||
 and (company.id in (select u.organization.id from UserOrganize u where u.user=#{SESSION_USERS})
 | 
			
		||||
 or 0=(select COALESCE(max(u.id),0) from UserOrganize u where u.user=#{SESSION_USERS})
 | 
			
		||||
 )
 | 
			
		||||
 /~company.id: AND company.id = {company.id}~/
 | 
			
		||||
 /~location.id: AND location.id = {location.id}~/
 | 
			
		||||
 /~item.code: AND (item.code) LIKE ({item.code})  ~/
 | 
			
		||||
 /~item.strExtend2: AND upper(item.strExtend2) LIKE upper({item.strExtend2})~/
 | 
			
		||||
 /~item.name: AND item.name LIKE {item.name}~/
 | 
			
		||||
 /~inventory.status: AND inventory.status = {inventory.status}~/
 | 
			
		||||
 /~propLC1: AND  (itemKey.lotInfo.propLC1) like upper({propLC1})~/
 | 
			
		||||
 /~propC1: AND (itemKey.lotInfo.propC1) like upper({propC1})~/
 | 
			
		||||
 /~date1: AND STR_TO_DATE(DATE_FORMAT(itemKey.lotInfo.propD1,'%Y-%m-%d'),'%Y-%m-%d') >= {date1} ~/
 | 
			
		||||
 /~date2: AND STR_TO_DATE(DATE_FORMAT(itemKey.lotInfo.propD1,'%Y-%m-%d'),'%Y-%m-%d') <= {date2} ~/
 | 
			
		||||
 /~strExtend3: AND (item.strExtend3) LIKE upper({strExtend3})~/
 | 
			
		||||
 /~item.feeType: AND (item.feeType) LIKE upper({item.feeType})~/
 | 
			
		||||
 /~propLC2: AND  (itemKey.lotInfo.propLC2) like upper({propLC2})~/
 | 
			
		||||
 ]]></datasource>
 | 
			
		||||
        <columns>
 | 
			
		||||
            <column id="inventory.id" title="ID" visible="false"/>
 | 
			
		||||
            <column id="company.name" title="company.name" visible="true" horizonAlign="left"/>
 | 
			
		||||
            <column id="location.code" title="location.code" visible="true" width="80" horizonAlign="left" />
 | 
			
		||||
            <column id="item.code" title="item.code" visible="true" horizonAlign="left" />
 | 
			
		||||
            <column id="item.feeType" title="货类型" width="70" visible="true" horizonAlign="left" />
 | 
			
		||||
            <column id="item.name" title="item.name" visible="true" horizonAlign="left"/>
 | 
			
		||||
            <column id="item.specs" title="item.specs" visible="true" horizonAlign="left"/>
 | 
			
		||||
            <column id="itemKey.item.strExtend3" title="颜色" visible="true" horizonAlign="left"/>
 | 
			
		||||
            <column id="inventory.status" title="质量状态" width="80" visible="true" horizonAlign="left"/>
 | 
			
		||||
            <column id="itemKey.lotInfo.propC1" title="到货日期" visible="true" horizonAlign="left"/>
 | 
			
		||||
            <column id="itemKey.lotInfo.propLC1" title="特殊备注" visible="true" horizonAlign="left"/>  
 | 
			
		||||
            <column id="itemKey.lotInfo.propLC2" title="门店名称" visible="true" horizonAlign="left"/>    
 | 
			
		||||
            <column id="inventory.quantity" title="inventory.quantity" width="60" visible="true" horizonAlign="right"/>
 | 
			
		||||
            <column id="inventory.queuedQuantity" title="inventory.queuedQuantity" width="60" visible="true" horizonAlign="right"/>
 | 
			
		||||
            <column id="item.strExtend2" title="旧货品代码" visible="true" horizonAlign="right"/>
 | 
			
		||||
            <column id="item.volume" title="体积" visible="true" horizonAlign="right"/>
 | 
			
		||||
            <column id="itemKey.lotInfo.propD1" title="日期" visible="true" horizonAlign="left"/>
 | 
			
		||||
        </columns>
 | 
			
		||||
        <buttons>
 | 
			
		||||
            <popup id="modify" title="editInventory" enableType="single" invisible="false" containId="true" pageId="modifyInventoryPage">
 | 
			
		||||
                <enableExpression><![CDATA[ ${inventory.location.type} != 'RECEIVE' && ${inventory.location.type} != 'SHIP' 
 | 
			
		||||
					&& ${inventory.location.type} != 'QUALITY' && ${inventory.location.type} != 'BAD']]></enableExpression>
 | 
			
		||||
            </popup>
 | 
			
		||||
            <popup id="importInv" title="importInv" enableType="none" invisible="false" containId="false" pageId="importInvPage"/>
 | 
			
		||||
			<popup id="editLot" title="maintainInventoryPage.editLot" enableType="single" invisible="false" containId="true" pageId="editLotPage">
 | 
			
		||||
                <enableExpression><![CDATA[ ${inventory.queuedQuantity} == 0]]></enableExpression>
 | 
			
		||||
            </popup>
 | 
			
		||||
            <popup id="move" title="moveInventory" enableType="single" invisible="false" containId="true" pageId="moveInventoryPage">
 | 
			
		||||
                 <enableExpression><![CDATA[   ${inventory.quantity} - ${inventory.queuedQuantity} >0]]></enableExpression>
 | 
			
		||||
            </popup>
 | 
			
		||||
            
 | 
			
		||||
            <popup id="lockInventory" title="lockInventory" enableType="multi" invisible="false" containId="true" pageId="locakInventoryByCondition">
 | 
			
		||||
                <enableExpression><![CDATA[${inventory.status}=="-" && (${inventory.location.type} == 'STORAGE'||${inventory.location.type} == 'TRANSIT') && (${inventory.qtyOfMasterPack} - ${inventory.queuedQuantity} > 0)]]></enableExpression>
 | 
			
		||||
            </popup>
 | 
			
		||||
            <popup id="unlockInventory" title="unlockInventory" enableType="multi" invisible="false" containId="true" pageId="unlockInventoryByCondition">
 | 
			
		||||
                <enableExpression><![CDATA[${inventory.status}!="-" && (${inventory.location.type} == 'STORAGE'||${inventory.location.type} == 'TRANSIT') && (${inventory.qtyOfMasterPack} - ${inventory.queuedQuantity} > 0)]]></enableExpression>
 | 
			
		||||
            </popup>
 | 
			
		||||
            <popup id="invBatchMove" title="库内批量移位" enableType="none" invisible="false" containId="false" pageId="invBatchMovePage"/>
 | 
			
		||||
            <popup id="updateItem" title="货品调整" enableType="multi" invisible="false" containId="true" pageId="editupdateItemPage"/>
 | 
			
		||||
            <popup id="updateStatus" title="状态调整" enableType="multi" invisible="false" containId="true" pageId="editupdateStatusPage">
 | 
			
		||||
            	<enableExpression><![CDATA[   ${inventory.queuedQuantity}==0]]></enableExpression>
 | 
			
		||||
            </popup>
 | 
			
		||||
            <popup id="updatepropLC1" title="特殊备注调整" enableType="multi" invisible="false" containId="true" pageId="editupdatepropLC1Page">
 | 
			
		||||
            	<enableExpression><![CDATA[   ${inventory.queuedQuantity}==0]]></enableExpression>
 | 
			
		||||
            </popup>
 | 
			
		||||
            
 | 
			
		||||
<!-- 			<commit id="shuaxin" title="刷新" enableType="none" invisible="false"> -->
 | 
			
		||||
<!--                 <mappings> -->
 | 
			
		||||
<!--                     <mapping id="ids" className="list"/> -->
 | 
			
		||||
<!--                 </mappings> -->
 | 
			
		||||
<!--                 <actions> -->
 | 
			
		||||
<!--                     <action managerName="inventoryManager" methodName="shuaxin" /> -->
 | 
			
		||||
<!--                 </actions> -->
 | 
			
		||||
<!--                 <forwards> -->
 | 
			
		||||
<!--                    <forward name="refreshParent" newEnabled="true" editEnabled="true"/> -->
 | 
			
		||||
<!--                    <forward name="closeWindow" newEnabled="true" editEnabled="true"/> -->
 | 
			
		||||
<!--                    <forward name="refreshWindow" newEnabled="true" editEnabled="true"/> -->
 | 
			
		||||
<!--                 </forwards> -->
 | 
			
		||||
<!--             </commit> -->
 | 
			
		||||
		</buttons>
 | 
			
		||||
    </maintainPage>
 | 
			
		||||
</pages>
 | 
			
		||||
		Loading…
	
		Reference in New Issue