no message
							parent
							
								
									81ceb4bd40
								
							
						
					
					
						commit
						18caf5e04f
					
				| 
						 | 
				
			
			@ -117,7 +117,7 @@
 | 
			
		|||
        	<one-to-many class="com.dev.swms.server.model.base.SignFile"/>
 | 
			
		||||
        </set>
 | 
			
		||||
        
 | 
			
		||||
        <property name="invQuantity" formula="(select  COALESCE(sum(inv.QUANTITY-inv.QUEUED_QUANTITY),0)   from  INVENTORY inv left join ITEM_KEY_INVENTORY iki  on  iki.id=inv.ITEM_KEY_INVENTORY_ID left join ITEM_KEY ik on ik.id=iki.ITEM_KEY_ID  where ik.ITEM_ID=ID and iki.WAREHOUSE_ID=warehouse_ID    )" />
 | 
			
		||||
        <property name="invQuantity" formula="(select  COALESCE(sum(inv.QUANTITY-inv.QUEUED_QUANTITY),0)   from  INVENTORY inv left join ITEM_KEY_INVENTORY iki  on  iki.id=inv.ITEM_KEY_INVENTORY_ID left join ITEM_KEY ik on ik.id=iki.ITEM_KEY_ID left join LOCATION loc on loc.id=inv.LOCATION_ID   where ik.ITEM_ID=ID and iki.WAREHOUSE_ID=warehouse_ID and loc.type not  in('SHIP')    )" />
 | 
			
		||||
   
 | 
			
		||||
	 </class>
 | 
			
		||||
	<query name="getItemsCountByCompanyID">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -1,138 +0,0 @@
 | 
			
		|||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE hibernate-mapping PUBLIC 
 | 
			
		||||
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
 | 
			
		||||
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
 | 
			
		||||
 | 
			
		||||
<hibernate-mapping>
 | 
			
		||||
    <class name="com.dev.swms.server.model.base.Item" table="ITEM">
 | 
			
		||||
        <id name="id" column="ID" type="long">
 | 
			
		||||
            <generator class="native">
 | 
			
		||||
                <param name="sequence">wms_item</param>
 | 
			
		||||
                <param name="parameters">START WITH 1000</param>
 | 
			
		||||
            </generator>
 | 
			
		||||
        </id>
 | 
			
		||||
        <discriminator column="DISCRIMINATOR" type="string"/>
 | 
			
		||||
         <many-to-one name="warehouse" class="com.dev.swms.server.model.base.Warehouse">
 | 
			
		||||
			<column name="warehouse_ID"  unique-key="UK_ITEM"/>
 | 
			
		||||
		</many-to-one>
 | 
			
		||||
		<many-to-one name="company" class="com.dev.swms.server.model.base.Structure">
 | 
			
		||||
			<column name="COMPANY_ID" not-null="true" unique-key="UK_ITEM"/>
 | 
			
		||||
		</many-to-one>
 | 
			
		||||
        <property name="code" type="string">
 | 
			
		||||
            <column name="CODE" not-null="true" length="20" unique-key="UK_ITEM"/>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="name" type="string">
 | 
			
		||||
            <column name="NAME" length="100"/>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="shortName" type="string">
 | 
			
		||||
            <column name="short_Name" length="100"/>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="specs" type="string">
 | 
			
		||||
            <column name="SPECS" length="100"/>
 | 
			
		||||
        </property>
 | 
			
		||||
		<property name="isBOM" type="true_false" column="ISBOM" not-null="true"/>
 | 
			
		||||
		<property name="validPeriod" column="VALID_PERIOD" type="int"/>
 | 
			
		||||
		<property name="alertLeadingDays" column="ALERT_LEADING_DAYS" type="int"/>
 | 
			
		||||
		<many-to-one name="lotRule" class="com.dev.swms.server.model.rules.LotRule">
 | 
			
		||||
			<column name="RULE_LOT_ID"/>
 | 
			
		||||
		</many-to-one>
 | 
			
		||||
		<property name="feeType" type="string" column="FEE_TYPE" length="50"/>
 | 
			
		||||
		<!-- 新增属性 -->
 | 
			
		||||
		<property name="largeClass" type="string" column="LARGE_CLASS" length="50"/>
 | 
			
		||||
		<property name="centerClass" type="string" column="CENTER_CLASS" length="50"/>
 | 
			
		||||
		<property name="smallClass" type="string" column="SMALL_CLASS" length="50"/>
 | 
			
		||||
		<property name="singleItem" type="boolean" column="SINGLE_ITEM"/>
 | 
			
		||||
		<property name="price" type="double" column="PRICE"/>
 | 
			
		||||
		<property name="cycleDate" column="CYCLE_DATE" type="date"/>
 | 
			
		||||
		<property name="beWeight" type="boolean" column="BE_WEIGHT"/>
 | 
			
		||||
		<property name="description" type="string">
 | 
			
		||||
			<column name="DESCRIPTION" length="255"/>
 | 
			
		||||
		</property>
 | 
			
		||||
		<property name="disabled" column="DISABLED" type="boolean"/>	
 | 
			
		||||
		
 | 
			
		||||
		<property name="strExtend1" column="STR_EXTEND1" type="string" length="150"/>
 | 
			
		||||
        <property name="strExtend2" column="STR_EXTEND2" type="string" length="150"/>
 | 
			
		||||
        <property name="strExtend3" column="STR_EXTEND3" type="string" length="150"/>
 | 
			
		||||
        <property name="strExtend4" column="STR_EXTEND4" type="string" length="150"/>
 | 
			
		||||
        <property name="strExtend5" column="STR_EXTEND5" type="string" length="150"/>
 | 
			
		||||
        
 | 
			
		||||
        <property name="goodType" column="GOOD_TYPE" type="string" length="50"/>
 | 
			
		||||
        <property name="storageType" column="STORAGE_TYPE" type="string" length="50"/>
 | 
			
		||||
        <property name="brand" column="BRAND" type="string" length="50"/>
 | 
			
		||||
        <property name="department" column="DEPARTMENT" type="string" length="50"/>
 | 
			
		||||
        <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="roughWeight" column="ROUGH_WEIGHT" type="double"/>
 | 
			
		||||
        <property name="volume" column="VOLUME" type="double"/>
 | 
			
		||||
        <property name="unit" column="UNIT" type="string" length="50"/>
 | 
			
		||||
        <property name="CAcoefficient" column="CA_COEFFICIENT" type="double" />
 | 
			
		||||
        <property name="CAname" column="CA_NAME" type="string" />  
 | 
			
		||||
        <property name="bearTime" column="BEAR_TIME" type="integer" />
 | 
			
		||||
        <property name="saleTime" column="SALE_TIME" type="integer" />  
 | 
			
		||||
        <property name="balanceNumber" column="BALANCE_NUMBER" type="integer" /> 
 | 
			
		||||
        <property name="suggest" column="SUGGEST" type="integer"/>
 | 
			
		||||
        <many-to-one name="location" class="com.dev.swms.server.model.base.Location">
 | 
			
		||||
			<column name="LOCATION_ID" />
 | 
			
		||||
		</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="50"/>
 | 
			
		||||
         
 | 
			
		||||
         <property name="beMarkWeight" type="boolean" column="BE_MARK_WEIGHT"/>
 | 
			
		||||
         
 | 
			
		||||
         <property name="beMachin" type="boolean" column="BE_MACHIN"/>
 | 
			
		||||
         
 | 
			
		||||
         <property name="shipRules" type="string" column="SHIP_RULES"/>
 | 
			
		||||
		 <property name="packNumber" type="integer" column="PACK_NUMBER"/>
 | 
			
		||||
		 <property name="multipleOrder" type="double" column="MULTIPLE_ORDER"/>
 | 
			
		||||
		 <property name="codePat" type="integer" column="CODE_PAT"/>
 | 
			
		||||
		<property name="sourceId" column="sourceId" type="string" length="255"/>
 | 
			
		||||
		<property name="sourceType" column="sourceType" type="string" length="255"/>
 | 
			
		||||
		
 | 
			
		||||
		<property name="produceDate" column="PRODUCE_DATE" type="date"/>
 | 
			
		||||
		<property name="dueDate" column="DUE_DATE" type="date"/>
 | 
			
		||||
		
 | 
			
		||||
		<property name="boxVolume" type="double" column="BOX_VOLUME"/>
 | 
			
		||||
		<property name="beType" type="boolean" column="BE_TYPE"/>
 | 
			
		||||
		<set name="suppliers" table="SUPPLIER_ITEM" lazy="true">
 | 
			
		||||
           <key column="ITEM_ID"/>
 | 
			
		||||
           <many-to-many class="com.dev.swms.server.model.base.Structure" column="ORGANIZATION_ID"/>
 | 
			
		||||
        </set>
 | 
			
		||||
		<set name="packageUnits" lazy="false" inverse="true" cascade="all-delete-orphan" order-by="CONVERT_FIGURE">
 | 
			
		||||
			<key column="ITEM_ID"/>
 | 
			
		||||
			<one-to-many class="com.dev.swms.server.model.base.PackageUnit"/>
 | 
			
		||||
		</set>
 | 
			
		||||
		<set name="components" lazy="true" inverse="true" cascade="all-delete-orphan">
 | 
			
		||||
			<key column="BOM_ID"/>
 | 
			
		||||
			<one-to-many class="com.dev.swms.server.model.base.BOMComponent"/>
 | 
			
		||||
		</set>
 | 
			
		||||
		<set name="storageRules" lazy="true" inverse="true" cascade="all-delete-orphan">
 | 
			
		||||
			<key column="ITEM_ID"/>
 | 
			
		||||
			<one-to-many class="com.dev.swms.server.model.rules.ItemStorageRule"/>
 | 
			
		||||
		</set>
 | 
			
		||||
		 <set name="files" table="SIGN_FILE" lazy="true" inverse="true" cascade="all-delete-orphan">
 | 
			
		||||
        	<key column="ITEM_ID"/>
 | 
			
		||||
        	<one-to-many class="com.dev.swms.server.model.base.SignFile"/>
 | 
			
		||||
        </set>
 | 
			
		||||
        
 | 
			
		||||
        <property name="invQuantity" formula="(select  COALESCE(sum(inv.QUANTITY-inv.QUEUED_QUANTITY),0)   from  INVENTORY inv left join ITEM_KEY_INVENTORY iki  on  iki.id=inv.ITEM_KEY_INVENTORY_ID left join ITEM_KEY ik on ik.id=iki.ITEM_KEY_ID  where ik.ITEM_ID=ID and iki.WAREHOUSE_ID=warehouse_ID    )" />
 | 
			
		||||
   
 | 
			
		||||
	 </class>
 | 
			
		||||
	<query name="getItemsCountByCompanyID">
 | 
			
		||||
		<![CDATA[SELECT COUNT(item) FROM Item item WHERE item.company.id = :companyId]]>
 | 
			
		||||
	</query>
 | 
			
		||||
	<query name="getItemsByCompanyID">
 | 
			
		||||
		<![CDATA[FROM Item AS item LEFT JOIN item.company AS company WHERE company.id = :companyId]]>
 | 
			
		||||
	</query>
 | 
			
		||||
	<query name="getItemsByCode">
 | 
			
		||||
		<![CDATA[FROM Item item  WHERE item.code = :code]]>
 | 
			
		||||
	</query>
 | 
			
		||||
	<query name="getItemsByLotRule">
 | 
			
		||||
		<![CDATA[select count(item) FROM Item item  WHERE item.lotRule = :lotRule]]>
 | 
			
		||||
	</query>
 | 
			
		||||
	<query name="getItemByCompanyAndCode">
 | 
			
		||||
		<![CDATA[FROM Item item  WHERE item.code = :code AND item.company.id = :companyId]]>
 | 
			
		||||
	</query>
 | 
			
		||||
</hibernate-mapping>
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue