mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 19:54:00 +09:00
change products
This commit is contained in:
@@ -4,7 +4,9 @@ import java.util.Date;
|
||||
|
||||
import org.apache.ibatis.type.Alias;
|
||||
|
||||
import com.no1.wms.account.AccountDto;
|
||||
import com.no1.wms.category.CategoryDto;
|
||||
import com.no1.wms.vendor.VendorDto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
@@ -14,17 +16,18 @@ import lombok.Data;
|
||||
@Alias("ProductDto")
|
||||
public class ProductDto {
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String company_name;
|
||||
private String kan_code;
|
||||
private String vendor_id;
|
||||
private Date registration_date;
|
||||
private String manager_id;
|
||||
private boolean activation;
|
||||
|
||||
|
||||
private String id;//id
|
||||
private String name;//제품명
|
||||
private String company_name;//회사명
|
||||
private String kan_code;//분류코드
|
||||
private String vendor_id;//거래처 id
|
||||
private Date registration_date;//등록날짜
|
||||
private String manager_id;//담당자
|
||||
private boolean activation;//활성화
|
||||
|
||||
private VendorDto vendorDto;
|
||||
private AccountDto accountDto;
|
||||
private CategoryDto categoryDto;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -12,39 +12,22 @@
|
||||
<result column="registration_date" property="registration_date" />
|
||||
<result column="manager_id" property="manager_id" />
|
||||
<result column="activation" property="activation" />
|
||||
<association property="vendorDto" javaType="AccountDto">
|
||||
<id column="personal_authority_id" property="personalAuthorityId" />
|
||||
|
||||
<association property="vendorDto" javaType="VendorDto">
|
||||
<id column="vendor_name" property="name" />
|
||||
<result column="president_name" property="president_name" />
|
||||
</association>
|
||||
<association property="accountDto" javaType="AccountDto">
|
||||
<id column="personal_authority_id" property="personalAuthorityId" />
|
||||
|
||||
<id column="account_name" property="name" />
|
||||
</association>
|
||||
<association property="accountDto" javaType="AccountDto">
|
||||
<association property="categoryDto" javaType="CategoryDto">
|
||||
<id column="personal_authority_id" property="personalAuthorityId" />
|
||||
|
||||
<result column="cls_nm_1" property="cls_nm_1" />
|
||||
<result column="cls_nm_2" property="cls_nm_2" />
|
||||
<result column="cls_nm_3" property="cls_nm_3" />
|
||||
<result column="cls_nm_4" property="cls_nm_4" />
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- insert -->
|
||||
|
||||
|
||||
@@ -55,9 +38,19 @@
|
||||
|
||||
|
||||
<!-- select -->
|
||||
<select id="productList" parameterType="map" resultType="CategoryDto">
|
||||
select * from product where activation != 0
|
||||
order by registration_date limit #{start} , #{count}
|
||||
<select id="productList" parameterType="map" resultType="productDto">
|
||||
SELECT
|
||||
p.id, p.name, p.company_name, p.kan_code, p.vendor_id, p.registration_date,
|
||||
p.manager_id, p.activation,
|
||||
v.name as vendor_name, v.president_name,
|
||||
a.name as account_name,
|
||||
pc.cls_nm_1, pc.cls_nm_2, pc.cls_nm_3, pc.cls_nm_4
|
||||
FROM product as p
|
||||
left join vendor as v on p.vendor_id = v.id
|
||||
left join account as a on p.manager_id = a.id
|
||||
left join product_category as pc on p.kan_code = pc.kan_code
|
||||
WHERE p.activation != 0
|
||||
ORDER BY p.registration_date limit #{start} , #{count}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@@ -47,12 +47,17 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${list }" var="dto">
|
||||
<tr class="detailTr" data-kan_code="${dto.kan_code}" >
|
||||
<td>${dto.cls_nm_1 }</td>
|
||||
<td>${dto.cls_nm_2 }</td>
|
||||
<td>${dto.cls_nm_3 }</td>
|
||||
<td>${dto.cls_nm_4 }</td>
|
||||
<td>${dto.kan_code }</td>
|
||||
<tr class="detailTr" data-productId="${dto.id}" >
|
||||
<td>${dto.name }</td>
|
||||
<td>${dto.company_name }</td>
|
||||
<!-- <td>${dto.categoryDto.cls_nm_4 }</td>
|
||||
<td>${dto.vendorDto.name }</td>
|
||||
<td>${dto.registration_date }</td>
|
||||
<td>${dto.accountDto.name }</td>-->
|
||||
<td>1</td>
|
||||
<td>2</td>
|
||||
<td>3</td>
|
||||
<td>4</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user