tvpl.api

<back to all web services

SearchProcurementItemRequest

Requires Authentication
The following routes are available for this service:
GET/procurement/item/search
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;

public class dtos
{

    public static class SearchProcurementItemRequest extends PagingRequest
    {
        public Integer batchId = null;
        public Integer departmentId = null;
        public Integer approvalStatus = null;
        
        public Integer getBatchId() { return batchId; }
        public SearchProcurementItemRequest setBatchId(Integer value) { this.batchId = value; return this; }
        public Integer getDepartmentId() { return departmentId; }
        public SearchProcurementItemRequest setDepartmentId(Integer value) { this.departmentId = value; return this; }
        public Integer getApprovalStatus() { return approvalStatus; }
        public SearchProcurementItemRequest setApprovalStatus(Integer value) { this.approvalStatus = value; return this; }
    }

    public static class PagingRequest
    {
        public Integer page = null;
        public Integer limit = null;
        
        public Integer getPage() { return page; }
        public PagingRequest setPage(Integer value) { this.page = value; return this; }
        public Integer getLimit() { return limit; }
        public PagingRequest setLimit(Integer value) { this.limit = value; return this; }
    }

    public static class PageResponse<AuditLog> implements IResponseRequest
    {
        public Integer code = null;
        public String message = null;
        public ArrayList<AuditLog> data = null;
        public Pagination pagination = null;
        
        public Integer getCode() { return code; }
        public PageResponse<AuditLog> setCode(Integer value) { this.code = value; return this; }
        public String getMessage() { return message; }
        public PageResponse<AuditLog> setMessage(String value) { this.message = value; return this; }
        public ArrayList<AuditLog> getData() { return data; }
        public PageResponse<AuditLog> setData(ArrayList<AuditLog> value) { this.data = value; return this; }
        public Pagination getPagination() { return pagination; }
        public PageResponse<AuditLog> setPagination(Pagination value) { this.pagination = value; return this; }
    }

    public static class AuditLog extends MongoObject implements IEntityId, ICreated, IUpdate
    {
        public String userName = null;
        public Integer userId = null;
        public Integer documentId = null;
        public String action = null;
        public String description = null;
        public Date createdDate = null;
        public Date updatedDate = null;
        public String ipAddress = null;
        public String userAgent = null;
        
        public String getUserName() { return userName; }
        public AuditLog setUserName(String value) { this.userName = value; return this; }
        public Integer getUserId() { return userId; }
        public AuditLog setUserId(Integer value) { this.userId = value; return this; }
        public Integer getDocumentId() { return documentId; }
        public AuditLog setDocumentId(Integer value) { this.documentId = value; return this; }
        public String getAction() { return action; }
        public AuditLog setAction(String value) { this.action = value; return this; }
        public String getDescription() { return description; }
        public AuditLog setDescription(String value) { this.description = value; return this; }
        public Date getCreatedDate() { return createdDate; }
        public AuditLog setCreatedDate(Date value) { this.createdDate = value; return this; }
        public Date getUpdatedDate() { return updatedDate; }
        public AuditLog setUpdatedDate(Date value) { this.updatedDate = value; return this; }
        public String getIpAddress() { return ipAddress; }
        public AuditLog setIpAddress(String value) { this.ipAddress = value; return this; }
        public String getUserAgent() { return userAgent; }
        public AuditLog setUserAgent(String value) { this.userAgent = value; return this; }
    }

    public static class MongoObject implements IMongoModel
    {
        public String id = null;
        
        public String getId() { return id; }
        public MongoObject setId(String value) { this.id = value; return this; }
    }

    public static class Pagination
    {
        public Long total = null;
        public Integer pages = null;
        public Long offset = null;
        public Integer limit = null;
        public Integer currentPage = null;
        
        public Long getTotal() { return total; }
        public Pagination setTotal(Long value) { this.total = value; return this; }
        public Integer getPages() { return pages; }
        public Pagination setPages(Integer value) { this.pages = value; return this; }
        public Long getOffset() { return offset; }
        public Pagination setOffset(Long value) { this.offset = value; return this; }
        public Integer getLimit() { return limit; }
        public Pagination setLimit(Integer value) { this.limit = value; return this; }
        public Integer getCurrentPage() { return currentPage; }
        public Pagination setCurrentPage(Integer value) { this.currentPage = value; return this; }
    }

}

Java SearchProcurementItemRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /procurement/item/search HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	code: 0,
	message: String,
	data: 
	[
		{
			id: 0,
			batchId: 0,
			departmentId: 0,
			equipmentId: 0,
			productName: String,
			technicalSpec: String,
			unit: String,
			quantity: 0,
			purpose: String,
			note: String,
			approvalStatus: 0,
			approvalNote: String,
			approvedAt: "0001-01-01T00:00:00.0000000+07:06",
			approvedBy: 0,
			createdAt: "0001-01-01T00:00:00.0000000+07:06",
			createdBy: 0,
			updatedAt: "0001-01-01T00:00:00.0000000+07:06",
			updatedBy: 0,
			isDeleted: False,
			deletedAt: "0001-01-01T00:00:00.0000000+07:06",
			deletedBy: 0,
			departmentName: String,
			createdByName: String,
			approvedByName: String
		}
	]
}