init
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
package com.sw.inbound.model.exception
|
||||
|
||||
class ApiException {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.sw.inbound.model.exception
|
||||
|
||||
|
||||
class NetException(val code: Int, override val message: String) : Exception(message)
|
||||
@@ -0,0 +1,143 @@
|
||||
package com.sw.inbound.model.request
|
||||
|
||||
import com.sw.inbound.GlobalData
|
||||
import com.sw.inbound.ext.toFormattedString
|
||||
import java.math.BigDecimal
|
||||
|
||||
/**
|
||||
* 添加物品参数
|
||||
*/
|
||||
data class GoodsAddParam(
|
||||
/**
|
||||
* 物品名称
|
||||
*/
|
||||
var goodName: String? = null,
|
||||
|
||||
/**
|
||||
* 物品编号 服务自动生成
|
||||
*/
|
||||
var goodCode: String? = null,
|
||||
|
||||
/**
|
||||
* 物品类型
|
||||
*/
|
||||
var goodType: Int? = null,
|
||||
|
||||
/**
|
||||
* 存储方式
|
||||
*/
|
||||
var storageType: Int? = null,
|
||||
|
||||
/**
|
||||
* 净材率
|
||||
*/
|
||||
var netRate: Float? = null,
|
||||
|
||||
/**
|
||||
* 库存单位id
|
||||
*/
|
||||
var unitId: Int? = null,
|
||||
|
||||
/**
|
||||
* 采购单位
|
||||
*/
|
||||
var purchaseUnit: Int = 0,
|
||||
|
||||
/**
|
||||
* 单位转换值
|
||||
*/
|
||||
var purchaseValue: Float = 0F,
|
||||
|
||||
/**
|
||||
* 采购单价
|
||||
*/
|
||||
var purchasePrice: BigDecimal? = null,
|
||||
|
||||
/**
|
||||
* 图片url
|
||||
*/
|
||||
var relativeUrl: String? = null
|
||||
) {
|
||||
|
||||
val goodNameSr: String
|
||||
get() {
|
||||
if (goodName == null)
|
||||
return ""
|
||||
return goodName!!
|
||||
}
|
||||
|
||||
|
||||
var goodsTypeStr: String
|
||||
set(value) {
|
||||
goodsTypeStr = value
|
||||
}
|
||||
get() {
|
||||
return GlobalData.goodsTypeList.find { it.id == goodType }?.value ?: ""
|
||||
}
|
||||
|
||||
var storageTypeStr: String
|
||||
set(value) {
|
||||
storageTypeStr = value
|
||||
}
|
||||
get() {
|
||||
return GlobalData.storageTypeList.find { it.id == storageType }?.value ?: ""
|
||||
}
|
||||
|
||||
val netRateStr: String
|
||||
get() {
|
||||
if (netRate == null || netRate == 0f) {
|
||||
return ""
|
||||
} else {
|
||||
return netRate!!.toFormattedString()
|
||||
}
|
||||
}
|
||||
|
||||
val unitIdStr: String
|
||||
get() {
|
||||
return GlobalData.unitTypeList.find { it.id == unitId }?.value ?: ""
|
||||
}
|
||||
|
||||
val purchasePriceStr: String
|
||||
get() {
|
||||
if (purchasePrice == null) {
|
||||
return ""
|
||||
}
|
||||
return purchasePrice!!.toFormattedString()
|
||||
}
|
||||
|
||||
|
||||
val purchaseUnitStr: String
|
||||
get() {
|
||||
if (purchaseUnit == 0) {
|
||||
return ""
|
||||
}
|
||||
return GlobalData.unitTypeList.find { it.id == purchaseUnit }?.value ?: ""
|
||||
}
|
||||
|
||||
fun hasNullField(): String? {
|
||||
if (goodName == null || goodName!!.isEmpty())
|
||||
return "请录入物品名称"
|
||||
if (goodType == null || goodType == 0) {
|
||||
return "请选择物品类型"
|
||||
}
|
||||
if (storageType == null || storageType == 0) {
|
||||
return "请选择存储方式"
|
||||
}
|
||||
if (netRate == null || netRate == 0f) {
|
||||
return "请录入净材率"
|
||||
}
|
||||
if (unitId == null || unitId == 0) {
|
||||
return "请选择库存单位"
|
||||
}
|
||||
if (purchaseUnit == null || purchaseUnit == 0) {
|
||||
return "请选择采购单位"
|
||||
}
|
||||
if (purchaseValue == null || purchaseValue == 0f) {
|
||||
return "请输入采购单位对应的库存数量"
|
||||
}
|
||||
if (purchasePrice == null || purchasePrice == BigDecimal(0)) {
|
||||
return "请输入单价"
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.sw.inbound.model.request
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Parcelize
|
||||
data class LoginParam(
|
||||
val userName: String,
|
||||
val password: String
|
||||
) : Parcelable
|
||||
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
package com.sw.inbound.model.request
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.sw.inbound.GlobalData
|
||||
import com.sw.inbound.ext.toFormattedString
|
||||
import com.sw.inbound.model.response.DictType
|
||||
import com.sw.inbound.model.response.SearchGoodsInfo.Record.UnitVo
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import java.math.BigDecimal
|
||||
|
||||
/**
|
||||
* 自采购入库参数
|
||||
*/
|
||||
@Parcelize
|
||||
data class PurchaseWarehouseParam(
|
||||
/**
|
||||
* 物品id
|
||||
*/
|
||||
var goodsId: Int = 0,
|
||||
/**
|
||||
* 库存单位
|
||||
*/
|
||||
var kcUnitId: Int = -1,
|
||||
/**
|
||||
* 入库数量
|
||||
*/
|
||||
var goodsCount: Double = 0.0,
|
||||
/**
|
||||
* 入库单价
|
||||
*/
|
||||
var goodsUnitPrice: Double = 0.0,
|
||||
/**
|
||||
* 入库金额
|
||||
*/
|
||||
var goodsPrice: Double = 0.0,
|
||||
/**
|
||||
* (物品列表里 businessUnitId字段的值)
|
||||
*/
|
||||
var goodPurId: Int = -1,
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
var warehouseId: Int = -1,
|
||||
|
||||
/**
|
||||
* 采购库存转换关系
|
||||
*/
|
||||
var buyToInventoryValue: String = "",
|
||||
|
||||
// 仓库名
|
||||
// var warehouseName: String? = null,
|
||||
|
||||
// 重量 收货入参
|
||||
var goodsWeight: BigDecimal? = null,
|
||||
// 物品名称
|
||||
var goodsName: String? = null,
|
||||
// 单位名称
|
||||
var unitName: String? = null,
|
||||
// 搜索的物品单位列表
|
||||
var unitList: List<UnitVo>? = null,
|
||||
// 选中的采购单位
|
||||
var selectUnitType: UnitVo? = null
|
||||
) : Parcelable {
|
||||
|
||||
val warehouseNameStr: String
|
||||
get() {
|
||||
if (warehouseId == -1) {
|
||||
return ""
|
||||
}
|
||||
return GlobalData.warehouseTypeList.find { it.id == warehouseId }?.value ?: ""
|
||||
// if (warehouseName == null) {
|
||||
// return ""
|
||||
// }
|
||||
// return warehouseName!!
|
||||
}
|
||||
|
||||
val goodsWeightStr: String
|
||||
get() {
|
||||
if (goodsWeight == null) return ""
|
||||
|
||||
// 小于10 kg 显示 g
|
||||
if (goodsWeight!!.toInt() < 10) {
|
||||
return goodsWeight!!.multiply(BigDecimal(1000)).toString()
|
||||
}
|
||||
return goodsWeight?.toFormattedString() ?: ""
|
||||
}
|
||||
|
||||
val goodsWeightUnitStr: String
|
||||
get() {
|
||||
return if (goodsWeight == null || goodsWeight!!.toInt() < 10) {
|
||||
"克"
|
||||
} else {
|
||||
"千克"
|
||||
}
|
||||
}
|
||||
|
||||
val goodsNameStr: String
|
||||
get() {
|
||||
if (goodsName == null) return "-"
|
||||
return goodsName!!
|
||||
}
|
||||
|
||||
val unitDictTypeList: List<DictType>
|
||||
get() {
|
||||
return if (unitList == null) emptyList()
|
||||
else {
|
||||
unitList!!.map {
|
||||
DictType(it.businessUnitId!!.toInt(), it.purchaseUnitName!!)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
val unitNameStr: String
|
||||
get() {
|
||||
if (unitName == null) return ""
|
||||
return unitName!!
|
||||
}
|
||||
|
||||
val goodsCountStr: String
|
||||
get() {
|
||||
if (goodsCount == null || goodsCount == 0.0) {
|
||||
return ""
|
||||
}
|
||||
return goodsCount.toFormattedString()
|
||||
}
|
||||
|
||||
val goodsUnitPriceStr: String
|
||||
get() {
|
||||
if (goodsUnitPrice == null || goodsUnitPrice == 0.0) {
|
||||
return ""
|
||||
}
|
||||
return goodsUnitPrice.toFormattedString()
|
||||
}
|
||||
|
||||
val goodsPriceStr: String
|
||||
get() {
|
||||
if (goodsPrice == null || goodsPrice == 0.0) {
|
||||
return ""
|
||||
}
|
||||
return goodsPrice.toFormattedString()
|
||||
}
|
||||
|
||||
fun hasNullField(): String? {
|
||||
if (goodsId == null || goodsId == 0 || goodsName == null || goodsName!!.isEmpty())
|
||||
return "请选择物品"
|
||||
if (warehouseId == null || warehouseId == -1) {
|
||||
return "请选择仓库"
|
||||
}
|
||||
if (goodPurId == null || goodPurId == -1) {
|
||||
return "请选择采购单位"
|
||||
}
|
||||
if (goodsCount == null || goodsCount == 0.0) {
|
||||
return "请输入采购数量"
|
||||
}
|
||||
if (goodsUnitPrice == null || goodsUnitPrice == 0.0) {
|
||||
return "请输入采购单价"
|
||||
}
|
||||
if (goodsPrice == null || goodsPrice == 0.0) {
|
||||
return "请输入采购金额"
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.sw.inbound.model.request
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.sw.inbound.model.response.BaseBean
|
||||
import com.sw.inbound.model.response.GoodsInfo
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import java.math.BigDecimal
|
||||
|
||||
/**
|
||||
* 确认收货结构
|
||||
*/
|
||||
@Parcelize
|
||||
data class UploadInfo(
|
||||
/**
|
||||
* 收货单id
|
||||
*/
|
||||
var id: Int,
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
var supplierId: Int? = null,
|
||||
/**
|
||||
* 物品信息
|
||||
*/
|
||||
var receiveGoodsInfos: List<GoodsInfo>
|
||||
) : Parcelable
|
||||
|
||||
/**
|
||||
* 确认收货物品信息
|
||||
*/
|
||||
@Parcelize
|
||||
private data class UploadGoodsInfo(
|
||||
/**
|
||||
* 物品Id
|
||||
*/
|
||||
var goodId: Int = 0,
|
||||
/**
|
||||
* 物品采购单位关系
|
||||
*/
|
||||
var goodsPurId: Int = 0,
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
var receiveCount: Float = 0F,
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
var recUnitPriceTaxIn: Float = 0f,
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
var recPriceExItem: Float = 0f,
|
||||
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
var warehouseId: Int = 0,
|
||||
|
||||
|
||||
/**
|
||||
* 物品名称
|
||||
*/
|
||||
var goodName: String = "-",
|
||||
|
||||
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
var unitName: String = "-",
|
||||
|
||||
/**
|
||||
* 采购单位id
|
||||
*/
|
||||
var purchaseUnitId: Int = 0,
|
||||
|
||||
/**
|
||||
* 收货数量
|
||||
*/
|
||||
var receivedNum: Float = 0f,
|
||||
/**
|
||||
* 物品重量
|
||||
*/
|
||||
var goodsWeight: BigDecimal = BigDecimal(0),
|
||||
|
||||
// 已调整
|
||||
var isAdjusted: Boolean = false
|
||||
) : Parcelable, BaseBean() {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.sw.inbound.model.response
|
||||
|
||||
data class ApiResponse<T>(
|
||||
val code: Int,
|
||||
val success: Boolean? = false,
|
||||
val msg: String? = "",
|
||||
val data: T? = null
|
||||
) {
|
||||
fun isSuccess(): Boolean = code == 200
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.sw.inbound.model.response
|
||||
|
||||
open class BaseBean() {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.sw.inbound.model.response
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Parcelize
|
||||
data class DictType(
|
||||
val id: Int,
|
||||
val value: String
|
||||
) : Parcelable
|
||||
@@ -0,0 +1,181 @@
|
||||
package com.sw.inbound.model.response
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.sw.inbound.GlobalData
|
||||
import com.sw.inbound.ext.toFormattedString
|
||||
import com.sw.inbound.model.response.SearchGoodsInfo.Record.UnitVo
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import java.math.BigDecimal
|
||||
|
||||
/**
|
||||
* 物品信息
|
||||
*/
|
||||
@Parcelize
|
||||
data class GoodsInfo(
|
||||
/**
|
||||
* 数据id
|
||||
*/
|
||||
var id: Int? = 0,
|
||||
/**
|
||||
* 物品Id
|
||||
*/
|
||||
var goodId: Int? = 0,
|
||||
/**
|
||||
* 物品名称
|
||||
*/
|
||||
var goodName: String? = null,
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
var recUnitPriceTaxIn: Float? = null,
|
||||
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
var unitName: String? = null,
|
||||
|
||||
/**
|
||||
* 采购单位id
|
||||
*/
|
||||
var purchaseUnitId: Int? = null,
|
||||
/**
|
||||
* 采购数量
|
||||
*/
|
||||
var receiveCount: Float? = null,
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
var recPriceExItem: Float? = null,
|
||||
/**
|
||||
* 仓库id
|
||||
*/
|
||||
var warehouseId: Int? = null,
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
var warehouseName: String? = null,
|
||||
|
||||
/**
|
||||
* 物品采购单位关系
|
||||
*/
|
||||
var goodsPurId: Int? = 0,
|
||||
/**
|
||||
* 采购库存转换值
|
||||
*/
|
||||
var purchaseValue: Int? = 0,
|
||||
/**
|
||||
* 库存单位
|
||||
*/
|
||||
var kcUnitName: String? = "",
|
||||
/**
|
||||
* 消耗转换值
|
||||
*/
|
||||
var consumeValue: String? = "",
|
||||
|
||||
// 收货数量 收货入参
|
||||
var receivedNum: Float? = null,
|
||||
// 重量 收货入参
|
||||
var goodsWeight: BigDecimal? = null,
|
||||
|
||||
// 已调整
|
||||
var isAdjusted: Boolean = false,
|
||||
|
||||
var unitList: List<UnitVo> = emptyList<UnitVo>()
|
||||
) : Parcelable, BaseBean() {
|
||||
|
||||
val unitDictTypeList: List<DictType>
|
||||
get() {
|
||||
return unitList.map {
|
||||
DictType(it.businessUnitId!!.toInt(), it.purchaseUnitName!!)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
val goodNameStr: String
|
||||
get() {
|
||||
if (goodName == null) return "-"
|
||||
return goodName!!
|
||||
}
|
||||
val receivedNumStr: String
|
||||
get() {
|
||||
if (receivedNum == null)
|
||||
return ""
|
||||
return receivedNum?.toFormattedString() ?: ""
|
||||
}
|
||||
|
||||
val recUnitPriceTaxInStr: String
|
||||
get() {
|
||||
if (recUnitPriceTaxIn == 0f) return ""
|
||||
return recUnitPriceTaxIn?.toFormattedString() ?: ""
|
||||
}
|
||||
|
||||
var receiveCountStr: String
|
||||
set(value) {
|
||||
// receiveCount = value.toSafeFloat()
|
||||
receiveCountStr = value
|
||||
}
|
||||
get() {
|
||||
return when (receiveCount) {
|
||||
0f -> ""
|
||||
else -> receiveCount?.toFormattedString() ?: ""
|
||||
}
|
||||
}
|
||||
|
||||
val recPriceExItemStr: String
|
||||
get() {
|
||||
return when (recPriceExItem) {
|
||||
0f -> ""
|
||||
else -> recPriceExItem?.toFormattedString() ?: ""
|
||||
}
|
||||
}
|
||||
|
||||
val unitNameStr: String
|
||||
get() {
|
||||
if (unitName == null) return "-"
|
||||
return unitName!!
|
||||
}
|
||||
|
||||
val goodsWeightStr: String
|
||||
get() {
|
||||
if (goodsWeight == null) return ""
|
||||
|
||||
// 小于10 kg 显示 g
|
||||
if (goodsWeight!!.toInt() < 10) {
|
||||
return goodsWeight!!.multiply(BigDecimal(1000)).toString()
|
||||
}
|
||||
return goodsWeight?.toFormattedString() ?: ""
|
||||
}
|
||||
|
||||
val goodsWeightUnitStr: String
|
||||
get() {
|
||||
return if (goodsWeight == null || goodsWeight!!.toInt() < 10) {
|
||||
"克"
|
||||
} else {
|
||||
"千克"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var purchaseUnitIdStr: String
|
||||
set(value) {
|
||||
purchaseUnitIdStr = value
|
||||
}
|
||||
get() {
|
||||
return GlobalData.unitTypeList.find { it.id == purchaseUnitId }?.value ?: ""
|
||||
}
|
||||
|
||||
val warehouseNameStr: String
|
||||
get() {
|
||||
if (warehouseName == null) {
|
||||
return ""
|
||||
}
|
||||
return warehouseName!!
|
||||
}
|
||||
|
||||
fun hasNull(): Boolean {
|
||||
return goodName == null || warehouseId == null ||
|
||||
purchaseUnitId == null || recUnitPriceTaxIn == null
|
||||
|| receiveCount == null || recPriceExItem == null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.sw.inbound.model.response
|
||||
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Parcelize
|
||||
data class GoodsType(
|
||||
@SerializedName("allType")
|
||||
val allType: List<AllType?>? = listOf()
|
||||
) : Parcelable {
|
||||
@Parcelize
|
||||
data class AllType(
|
||||
@SerializedName("createTime")
|
||||
val createTime: String? = "",
|
||||
@SerializedName("createUserNo")
|
||||
val createUserNo: String? = "",
|
||||
@SerializedName("eaId")
|
||||
val eaId: Int? = 0,
|
||||
@SerializedName("ftype")
|
||||
val ftype: String? = "",
|
||||
/**
|
||||
* 物品id
|
||||
*/
|
||||
@SerializedName("id")
|
||||
val id: Int? = 0,
|
||||
@SerializedName("idResult")
|
||||
val idResult: String? = "",
|
||||
@SerializedName("kidTypes")
|
||||
val kidTypes: List<String?>? = listOf(),
|
||||
@SerializedName("pageNum")
|
||||
val pageNum: String? = "",
|
||||
@SerializedName("pageSize")
|
||||
val pageSize: String? = "",
|
||||
@SerializedName("status")
|
||||
val status: Int? = 0,
|
||||
@SerializedName("superName")
|
||||
val superName: String? = "",
|
||||
@SerializedName("typeCode")
|
||||
val typeCode: String? = "",
|
||||
/**
|
||||
* 物品类型
|
||||
*/
|
||||
@SerializedName("typeName")
|
||||
val typeName: String? = "",
|
||||
@SerializedName("updateTime")
|
||||
val updateTime: String? = "",
|
||||
@SerializedName("updateUserNo")
|
||||
val updateUserNo: String? = ""
|
||||
) : Parcelable
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.sw.inbound.model.response
|
||||
|
||||
data class PurchaseInfo(
|
||||
/**
|
||||
* 单据id
|
||||
*/
|
||||
var id: Int = 0,
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
var supplierId: Int = 0,
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
var supplierName: String = "",
|
||||
/**
|
||||
* 采购单号
|
||||
*/
|
||||
var purCode: String = "",
|
||||
/**
|
||||
* 收货单号
|
||||
*/
|
||||
var receiveCode: String = "",
|
||||
|
||||
/**
|
||||
* 物品信息
|
||||
*/
|
||||
var receiveGoodsInfoList: List<GoodsInfo> = emptyList<GoodsInfo>()
|
||||
) : BaseBean() {
|
||||
// 自用
|
||||
var warehouseName: String = "选择仓库"
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.sw.inbound.model.response
|
||||
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Parcelize
|
||||
data class SearchGoodsInfo(
|
||||
@SerializedName("current")
|
||||
val current: Int? = 0,
|
||||
@SerializedName("hitCount")
|
||||
val hitCount: Boolean? = false,
|
||||
@SerializedName("optimizeCountSql")
|
||||
val optimizeCountSql: Boolean? = false,
|
||||
@SerializedName("orders")
|
||||
val orders: List<String?>? = listOf(),
|
||||
@SerializedName("pages")
|
||||
val pages: Int? = 0,
|
||||
@SerializedName("records")
|
||||
val records: List<Record>? = listOf(),
|
||||
@SerializedName("searchCount")
|
||||
val searchCount: Boolean? = false,
|
||||
@SerializedName("size")
|
||||
val size: Int? = 0,
|
||||
@SerializedName("total")
|
||||
val total: Int? = 0
|
||||
) : Parcelable {
|
||||
@Parcelize
|
||||
data class Record(
|
||||
@SerializedName("goodsCode")
|
||||
val goodsCode: String? = "",
|
||||
/**
|
||||
* 物品id
|
||||
*/
|
||||
@SerializedName("goodsId")
|
||||
val goodsId: Int? = 0,
|
||||
/**
|
||||
* 物品名称
|
||||
*/
|
||||
@SerializedName("goodsName")
|
||||
val goodsName: String? = "",
|
||||
/**
|
||||
* 库存单位id
|
||||
*/
|
||||
@SerializedName("kcUnitId")
|
||||
val kcUnitId: Int? = 0,
|
||||
/**
|
||||
* 库存单位名称
|
||||
*/
|
||||
@SerializedName("kcUnitName")
|
||||
val kcUnitName: String? = "",
|
||||
@SerializedName("specification")
|
||||
val specification: String? = "",
|
||||
@SerializedName("typeId")
|
||||
val typeId: Int? = 0,
|
||||
@SerializedName("typeName")
|
||||
val typeName: String? = "",
|
||||
/**
|
||||
* 采购单位列表
|
||||
*/
|
||||
@SerializedName("unitVoList")
|
||||
val unitVoList: List<UnitVo>? = listOf(),
|
||||
@SerializedName("zjmCode")
|
||||
val zjmCode: String? = ""
|
||||
) : Parcelable {
|
||||
val goodsNameStr: String
|
||||
get() {
|
||||
if (goodsName == null) return ""
|
||||
return goodsName
|
||||
}
|
||||
|
||||
|
||||
@Parcelize
|
||||
data class UnitVo(
|
||||
/**
|
||||
* 单位关系id
|
||||
*/
|
||||
@SerializedName("businessUnitId")
|
||||
val businessUnitId: String? = "",
|
||||
/**
|
||||
* 转换值
|
||||
*/
|
||||
@SerializedName("buyToInventoryValue")
|
||||
val buyToInventoryValue: String? = "",
|
||||
@SerializedName("isDefault")
|
||||
val isDefault: Int? = 0,
|
||||
/**
|
||||
* 采购单位名称
|
||||
*/
|
||||
@SerializedName("purchaseUnitName")
|
||||
val purchaseUnitName: String? = "",
|
||||
@SerializedName("value")
|
||||
val value: String? = "",
|
||||
/**
|
||||
* 采购库存转换值
|
||||
*/
|
||||
val consumeValue: String? = "",
|
||||
/**
|
||||
* 消耗转换值
|
||||
*/
|
||||
val purchaseValue: Int? = 0,
|
||||
) : Parcelable
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.sw.inbound.model.response
|
||||
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* 存储方式
|
||||
*/
|
||||
@Parcelize
|
||||
data class StorageType(
|
||||
@SerializedName("childList")
|
||||
val childList: List<String?>? = listOf(),
|
||||
@SerializedName("createTime")
|
||||
val createTime: String? = "",
|
||||
@SerializedName("createUserNo")
|
||||
val createUserNo: String? = "",
|
||||
@SerializedName("depth")
|
||||
val depth: String? = "",
|
||||
@SerializedName("description")
|
||||
val description: String? = "",
|
||||
@SerializedName("dictId")
|
||||
val dictId: String? = "",
|
||||
@SerializedName("eaId")
|
||||
val eaId: Int? = 0,
|
||||
@SerializedName("fid")
|
||||
val fid: String? = "",
|
||||
@SerializedName("id")
|
||||
val id: Int? = 0,
|
||||
@SerializedName("idc")
|
||||
val idc: String? = "",
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@SerializedName("itemText")
|
||||
val itemText: String? = "",
|
||||
/**
|
||||
* 对应值
|
||||
*/
|
||||
@SerializedName("itemValue")
|
||||
val itemValue: String? = "",
|
||||
@SerializedName("level")
|
||||
val level: Int? = 0,
|
||||
@SerializedName("sortOrder")
|
||||
val sortOrder: Int? = 0,
|
||||
@SerializedName("status")
|
||||
val status: Int? = 0,
|
||||
@SerializedName("updateTime")
|
||||
val updateTime: String? = "",
|
||||
@SerializedName("updateUserNo")
|
||||
val updateUserNo: String? = ""
|
||||
) : Parcelable
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.sw.inbound.model.response
|
||||
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Parcelize
|
||||
data class SupplierInfo(
|
||||
@SerializedName("createTime")
|
||||
val createTime: String? = "",
|
||||
@SerializedName("createUserNo")
|
||||
val createUserNo: String? = "",
|
||||
@SerializedName("dateStart")
|
||||
val dateStart: String? = "",
|
||||
@SerializedName("dateStop")
|
||||
val dateStop: String? = "",
|
||||
@SerializedName("eaId")
|
||||
val eaId: Int? = 0,
|
||||
@SerializedName("eaIds")
|
||||
val eaIds: String? = "",
|
||||
@SerializedName("giftAll")
|
||||
val giftAll: Double? = 0.0,
|
||||
/**
|
||||
* 物品项
|
||||
*/
|
||||
@SerializedName("goodCount")
|
||||
val goodCount: Int = 0,
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
@SerializedName("id")
|
||||
val id: Int = 0,
|
||||
@SerializedName("pageNum")
|
||||
val pageNum: String? = "",
|
||||
@SerializedName("pageSize")
|
||||
val pageSize: String? = "",
|
||||
@SerializedName("purCode")
|
||||
val purCode: String? = "",
|
||||
@SerializedName("purDateStart")
|
||||
val purDateStart: String? = "",
|
||||
@SerializedName("purDateStop")
|
||||
val purDateStop: String? = "",
|
||||
/**
|
||||
* 采购日期
|
||||
*/
|
||||
@SerializedName("purchaseDate")
|
||||
val purchaseDate: String? = "",
|
||||
@SerializedName("purchaseDates")
|
||||
val purchaseDates: String? = "",
|
||||
@SerializedName("receiveAddress")
|
||||
val receiveAddress: String? = "",
|
||||
/**
|
||||
* 单号
|
||||
*/
|
||||
@SerializedName("receiveCode")
|
||||
val receiveCode: String? = "",
|
||||
@SerializedName("receiveCountAll")
|
||||
val receiveCountAll: Double? = 0.0,
|
||||
/**
|
||||
* 收货时间
|
||||
*/
|
||||
@SerializedName("receiveDate")
|
||||
val receiveDate: String? = "",
|
||||
@SerializedName("receiveDates")
|
||||
val receiveDates: String? = "",
|
||||
@SerializedName("receiveGoodsInfos")
|
||||
val receiveGoodsInfos: String? = "",
|
||||
@SerializedName("receiveLogs")
|
||||
val receiveLogs: String? = "",
|
||||
@SerializedName("receivePhone")
|
||||
val receivePhone: String? = "",
|
||||
@SerializedName("receivePriceEx")
|
||||
val receivePriceEx: Double? = 0.0,
|
||||
@SerializedName("receivePriceIn")
|
||||
val receivePriceIn: Double? = 0.0,
|
||||
@SerializedName("receiveRemark")
|
||||
val receiveRemark: String? = "",
|
||||
/**
|
||||
* 收货状态1收货关闭/2收货完成/3待收货 /4部分收货
|
||||
*/
|
||||
@SerializedName("receiveStatus")
|
||||
val receiveStatus: Int? = 0,
|
||||
/**
|
||||
* 操作人
|
||||
*/
|
||||
@SerializedName("receiveUser")
|
||||
val receiveUser: String = "",
|
||||
@SerializedName("receivedNum")
|
||||
val receivedNum: String? = "",
|
||||
@SerializedName("restId")
|
||||
val restId: String? = "",
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
@SerializedName("supplierId")
|
||||
val supplierId: Int = 0,
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
@SerializedName("supplierName")
|
||||
val supplierName: String = "",
|
||||
@SerializedName("taxRateAll")
|
||||
val taxRateAll: Double? = 0.0,
|
||||
@SerializedName("updateTime")
|
||||
val updateTime: String? = "",
|
||||
@SerializedName("updateUserNo")
|
||||
val updateUserNo: String? = "",
|
||||
@SerializedName("userName")
|
||||
val userName: String? = "",
|
||||
@SerializedName("warehouseId")
|
||||
val warehouseId: String? = ""
|
||||
) : Parcelable
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.sw.inbound.model.response
|
||||
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* 供应商列表返回
|
||||
*/
|
||||
@Parcelize
|
||||
data class SupplierResponse(
|
||||
@SerializedName("current")
|
||||
val current: Int? = 0,
|
||||
@SerializedName("hitCount")
|
||||
val hitCount: Boolean? = false,
|
||||
@SerializedName("optimizeCountSql")
|
||||
val optimizeCountSql: Boolean? = false,
|
||||
@SerializedName("orders")
|
||||
val orders: List<SupplierInfo?>? = listOf(),
|
||||
@SerializedName("pages")
|
||||
val pages: Int? = 0,
|
||||
/**
|
||||
* 供应商列表
|
||||
*/
|
||||
@SerializedName("records")
|
||||
val records: List<SupplierInfo?>? = listOf(),
|
||||
@SerializedName("searchCount")
|
||||
val searchCount: Boolean? = false,
|
||||
@SerializedName("size")
|
||||
val size: Int? = 0,
|
||||
@SerializedName("total")
|
||||
val total: Int? = 0
|
||||
) : Parcelable
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.sw.inbound.model.response
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Parcelize
|
||||
data class User(
|
||||
@SerializedName("eaCode")
|
||||
val eaCode: String? = null,
|
||||
@SerializedName("eaId")
|
||||
val eaId: String? = null,
|
||||
@SerializedName("eaIdList")
|
||||
val eaIdList: String? = null,
|
||||
@SerializedName("eaIdListName")
|
||||
val eaIdListName: String? = null,
|
||||
@SerializedName("eaLogoUrl")
|
||||
val eaLogoUrl: String? = null,
|
||||
@SerializedName("eaName")
|
||||
val eaName: String? = null,
|
||||
@SerializedName("errorCode")
|
||||
val errorCode: String? = null,
|
||||
@SerializedName("errorMsg")
|
||||
val errorMsg: String? = null,
|
||||
@SerializedName("id")
|
||||
val id: Int? = 0,
|
||||
@SerializedName("loginIp")
|
||||
val loginIp: String? = null,
|
||||
@SerializedName("name")
|
||||
val name: String? = "",
|
||||
@SerializedName("phone")
|
||||
val phone: String? = "",
|
||||
@SerializedName("token")
|
||||
val token: String? = "",
|
||||
@SerializedName("userCode")
|
||||
val userCode: String? = null,
|
||||
@SerializedName("userName")
|
||||
val userName: String? = ""
|
||||
) : Parcelable
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user