|
@@ -31,6 +31,7 @@ class IntegralRecordApi {
|
|
|
if (session("user")["usertype"] == 2) {
|
|
|
$where[] = ["enterprise_id", "=", session("user")["uid"]];
|
|
|
}
|
|
|
+ $where[] = ["delete", "=", 0];
|
|
|
$count = IntegralRecord::where($where)->count();
|
|
|
$list = IntegralRecord::where($where)->field("*,if(updateTime is not null,updateTime,createTime) as orderTime")->limit($offset, $limit)->order("orderTime " . $order)->select();
|
|
|
foreach ($list as $key => $item) {
|
|
@@ -42,6 +43,9 @@ class IntegralRecordApi {
|
|
|
}
|
|
|
$list[$key]["details"] = implode(",", $tmp_items);
|
|
|
$list[$key]["type"] = session("user")["type"];
|
|
|
+ $last_log = TalentLogApi::getLastLog($item["id"], \app\common\state\ProjectState::INTEGRAL);
|
|
|
+ $list[$key]["real_state"] = $last_log["state"];
|
|
|
+ $list[$key]["last_state"] = $last_log["last_state"];
|
|
|
}
|
|
|
return ["total" => $count, "rows" => $list];
|
|
|
}
|