Commit 93085613 authored by hywang's avatar hywang

1.增加绑定修改人和修改时间

parent 70e21d7c
...@@ -30,13 +30,16 @@ import com.uhf.structures.OnInventoryListener; ...@@ -30,13 +30,16 @@ import com.uhf.structures.OnInventoryListener;
import org.greenrobot.greendao.query.QueryBuilder; import org.greenrobot.greendao.query.QueryBuilder;
import org.greenrobot.greendao.query.WhereCondition; import org.greenrobot.greendao.query.WhereCondition;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import cn.wandersnail.commons.util.ToastUtils; import cn.wandersnail.commons.util.ToastUtils;
import me.goldze.mvvmhabit.binding.command.BindingCommand; import me.goldze.mvvmhabit.binding.command.BindingCommand;
import me.goldze.mvvmhabit.binding.command.BindingConsumer; import me.goldze.mvvmhabit.binding.command.BindingConsumer;
import me.goldze.mvvmhabit.binding.viewadapter.spinner.IKeyAndValue; import me.goldze.mvvmhabit.binding.viewadapter.spinner.IKeyAndValue;
import me.goldze.mvvmhabit.utils.SPUtils;
import me.goldze.mvvmhabit.utils.StringUtils; import me.goldze.mvvmhabit.utils.StringUtils;
public class BindVM extends BackBarVM<Repository> implements OnInventoryListener { public class BindVM extends BackBarVM<Repository> implements OnInventoryListener {
...@@ -56,6 +59,7 @@ public class BindVM extends BackBarVM<Repository> implements OnInventoryListener ...@@ -56,6 +59,7 @@ public class BindVM extends BackBarVM<Repository> implements OnInventoryListener
private String tag = "";//扫描到的标记 private String tag = "";//扫描到的标记
private CattleResumeEntity entity; private CattleResumeEntity entity;
private SimpleDateFormat dateFormat;
public BindVM(@NonNull Application application, Repository model) { public BindVM(@NonNull Application application, Repository model) {
super(application, model); super(application, model);
...@@ -175,6 +179,9 @@ public class BindVM extends BackBarVM<Repository> implements OnInventoryListener ...@@ -175,6 +179,9 @@ public class BindVM extends BackBarVM<Repository> implements OnInventoryListener
entity = cattleResumeEntity; entity = cattleResumeEntity;
entity.setRegistrationNo(registrationNo.get()); entity.setRegistrationNo(registrationNo.get());
entity.setUploadStatus("0"); entity.setUploadStatus("0");
cattleResumeEntity.setUpdateBy(SPUtils.getInstance().getString(Configs.SP_LOGIN_NAME));
dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
cattleResumeEntity.setUpdateTime(dateFormat.format(new Date()));
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment