Commit 2bbdab56 authored by hywang's avatar hywang

1.性能测定修改为每年龄段一条记录;

2.配种修改计算预产期;
3.配种主表改为固定显示品种和所属种蓄站,不再由后台配置;
parent 8db1c32a
...@@ -48,7 +48,7 @@ android { ...@@ -48,7 +48,7 @@ android {
} }
greendao { greendao {
schemaVersion 1 //数据库版本号 schemaVersion 3 //数据库版本号
daoPackage 'com.phlx.anchorcollect_p.db.gen' daoPackage 'com.phlx.anchorcollect_p.db.gen'
targetGenDir 'src/main/java' targetGenDir 'src/main/java'
} }
......
...@@ -50,6 +50,7 @@ public class Configs { ...@@ -50,6 +50,7 @@ public class Configs {
public static final String SP_NAME = "sp_name"; public static final String SP_NAME = "sp_name";
public static final String SP_LOGIN_NAME = "sp_login_name"; public static final String SP_LOGIN_NAME = "sp_login_name";
public static final String SP_DEPT_ID = "sp_dept_id"; public static final String SP_DEPT_ID = "sp_dept_id";
public static final String SP_DEPT_NAME = "sp_dept_name";
public static final String SP_FREQUENCY = "sp_frequency"; public static final String SP_FREQUENCY = "sp_frequency";
public static final String SP_USER_PASSWORD = "sp_user_password"; public static final String SP_USER_PASSWORD = "sp_user_password";
public static final String SP_USER_EMAIL = "sp_user_email"; public static final String SP_USER_EMAIL = "sp_user_email";
...@@ -103,6 +104,7 @@ public class Configs { ...@@ -103,6 +104,7 @@ public class Configs {
public static List<GenTableColumn> immunebatch; public static List<GenTableColumn> immunebatch;
public static List<GenTableColumn> cattlematingMaster; public static List<GenTableColumn> cattlematingMaster;
public static List<GenTableColumn> cattlematingDetaill; public static List<GenTableColumn> cattlematingDetaill;
public static List<GenTableColumn> cattlematingDetaillList;
//字典项 //字典项
public static List<DictEntity> dictList = new ArrayList<>(); public static List<DictEntity> dictList = new ArrayList<>();
......
...@@ -35,13 +35,14 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet ...@@ -35,13 +35,14 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet
public final static Property DueDate = new Property(8, String.class, "dueDate", false, "DUE_DATE"); public final static Property DueDate = new Property(8, String.class, "dueDate", false, "DUE_DATE");
public final static Property Pregnancy = new Property(9, String.class, "pregnancy", false, "PREGNANCY"); public final static Property Pregnancy = new Property(9, String.class, "pregnancy", false, "PREGNANCY");
public final static Property DeptId = new Property(10, Long.class, "deptId", false, "DEPT_ID"); public final static Property DeptId = new Property(10, Long.class, "deptId", false, "DEPT_ID");
public final static Property UploadStatus = new Property(11, String.class, "uploadStatus", false, "UPLOAD_STATUS"); public final static Property CaId = new Property(11, Long.class, "caId", false, "CA_ID");
public final static Property SearchValue = new Property(12, String.class, "searchValue", false, "SEARCH_VALUE"); public final static Property UploadStatus = new Property(12, String.class, "uploadStatus", false, "UPLOAD_STATUS");
public final static Property CreateBy = new Property(13, String.class, "createBy", false, "CREATE_BY"); public final static Property SearchValue = new Property(13, String.class, "searchValue", false, "SEARCH_VALUE");
public final static Property CreateTime = new Property(14, String.class, "createTime", false, "CREATE_TIME"); public final static Property CreateBy = new Property(14, String.class, "createBy", false, "CREATE_BY");
public final static Property UpdateBy = new Property(15, String.class, "updateBy", false, "UPDATE_BY"); public final static Property CreateTime = new Property(15, String.class, "createTime", false, "CREATE_TIME");
public final static Property UpdateTime = new Property(16, String.class, "updateTime", false, "UPDATE_TIME"); public final static Property UpdateBy = new Property(16, String.class, "updateBy", false, "UPDATE_BY");
public final static Property Remark = new Property(17, String.class, "remark", false, "REMARK"); public final static Property UpdateTime = new Property(17, String.class, "updateTime", false, "UPDATE_TIME");
public final static Property Remark = new Property(18, String.class, "remark", false, "REMARK");
} }
...@@ -68,13 +69,14 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet ...@@ -68,13 +69,14 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet
"\"DUE_DATE\" TEXT," + // 8: dueDate "\"DUE_DATE\" TEXT," + // 8: dueDate
"\"PREGNANCY\" TEXT," + // 9: pregnancy "\"PREGNANCY\" TEXT," + // 9: pregnancy
"\"DEPT_ID\" INTEGER," + // 10: deptId "\"DEPT_ID\" INTEGER," + // 10: deptId
"\"UPLOAD_STATUS\" TEXT," + // 11: uploadStatus "\"CA_ID\" INTEGER," + // 11: caId
"\"SEARCH_VALUE\" TEXT," + // 12: searchValue "\"UPLOAD_STATUS\" TEXT," + // 12: uploadStatus
"\"CREATE_BY\" TEXT," + // 13: createBy "\"SEARCH_VALUE\" TEXT," + // 13: searchValue
"\"CREATE_TIME\" TEXT," + // 14: createTime "\"CREATE_BY\" TEXT," + // 14: createBy
"\"UPDATE_BY\" TEXT," + // 15: updateBy "\"CREATE_TIME\" TEXT," + // 15: createTime
"\"UPDATE_TIME\" TEXT," + // 16: updateTime "\"UPDATE_BY\" TEXT," + // 16: updateBy
"\"REMARK\" TEXT);"); // 17: remark "\"UPDATE_TIME\" TEXT," + // 17: updateTime
"\"REMARK\" TEXT);"); // 18: remark
} }
/** Drops the underlying database table. */ /** Drops the underlying database table. */
...@@ -142,39 +144,44 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet ...@@ -142,39 +144,44 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet
stmt.bindLong(11, deptId); stmt.bindLong(11, deptId);
} }
Long caId = entity.getCaId();
if (caId != null) {
stmt.bindLong(12, caId);
}
String uploadStatus = entity.getUploadStatus(); String uploadStatus = entity.getUploadStatus();
if (uploadStatus != null) { if (uploadStatus != null) {
stmt.bindString(12, uploadStatus); stmt.bindString(13, uploadStatus);
} }
String searchValue = entity.getSearchValue(); String searchValue = entity.getSearchValue();
if (searchValue != null) { if (searchValue != null) {
stmt.bindString(13, searchValue); stmt.bindString(14, searchValue);
} }
String createBy = entity.getCreateBy(); String createBy = entity.getCreateBy();
if (createBy != null) { if (createBy != null) {
stmt.bindString(14, createBy); stmt.bindString(15, createBy);
} }
String createTime = entity.getCreateTime(); String createTime = entity.getCreateTime();
if (createTime != null) { if (createTime != null) {
stmt.bindString(15, createTime); stmt.bindString(16, createTime);
} }
String updateBy = entity.getUpdateBy(); String updateBy = entity.getUpdateBy();
if (updateBy != null) { if (updateBy != null) {
stmt.bindString(16, updateBy); stmt.bindString(17, updateBy);
} }
String updateTime = entity.getUpdateTime(); String updateTime = entity.getUpdateTime();
if (updateTime != null) { if (updateTime != null) {
stmt.bindString(17, updateTime); stmt.bindString(18, updateTime);
} }
String remark = entity.getRemark(); String remark = entity.getRemark();
if (remark != null) { if (remark != null) {
stmt.bindString(18, remark); stmt.bindString(19, remark);
} }
} }
...@@ -237,39 +244,44 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet ...@@ -237,39 +244,44 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet
stmt.bindLong(11, deptId); stmt.bindLong(11, deptId);
} }
Long caId = entity.getCaId();
if (caId != null) {
stmt.bindLong(12, caId);
}
String uploadStatus = entity.getUploadStatus(); String uploadStatus = entity.getUploadStatus();
if (uploadStatus != null) { if (uploadStatus != null) {
stmt.bindString(12, uploadStatus); stmt.bindString(13, uploadStatus);
} }
String searchValue = entity.getSearchValue(); String searchValue = entity.getSearchValue();
if (searchValue != null) { if (searchValue != null) {
stmt.bindString(13, searchValue); stmt.bindString(14, searchValue);
} }
String createBy = entity.getCreateBy(); String createBy = entity.getCreateBy();
if (createBy != null) { if (createBy != null) {
stmt.bindString(14, createBy); stmt.bindString(15, createBy);
} }
String createTime = entity.getCreateTime(); String createTime = entity.getCreateTime();
if (createTime != null) { if (createTime != null) {
stmt.bindString(15, createTime); stmt.bindString(16, createTime);
} }
String updateBy = entity.getUpdateBy(); String updateBy = entity.getUpdateBy();
if (updateBy != null) { if (updateBy != null) {
stmt.bindString(16, updateBy); stmt.bindString(17, updateBy);
} }
String updateTime = entity.getUpdateTime(); String updateTime = entity.getUpdateTime();
if (updateTime != null) { if (updateTime != null) {
stmt.bindString(17, updateTime); stmt.bindString(18, updateTime);
} }
String remark = entity.getRemark(); String remark = entity.getRemark();
if (remark != null) { if (remark != null) {
stmt.bindString(18, remark); stmt.bindString(19, remark);
} }
} }
...@@ -292,13 +304,14 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet ...@@ -292,13 +304,14 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet
cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // dueDate cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // dueDate
cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // pregnancy cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // pregnancy
cursor.isNull(offset + 10) ? null : cursor.getLong(offset + 10), // deptId cursor.isNull(offset + 10) ? null : cursor.getLong(offset + 10), // deptId
cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // uploadStatus cursor.isNull(offset + 11) ? null : cursor.getLong(offset + 11), // caId
cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // searchValue cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // uploadStatus
cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // createBy cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // searchValue
cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // createTime cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // createBy
cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // updateBy cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // createTime
cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // updateTime cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // updateBy
cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17) // remark cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // updateTime
cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18) // remark
); );
return entity; return entity;
} }
...@@ -316,13 +329,14 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet ...@@ -316,13 +329,14 @@ public class BreedingRecordDetailEntityDao extends AbstractDao<BreedingRecordDet
entity.setDueDate(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8)); entity.setDueDate(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
entity.setPregnancy(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9)); entity.setPregnancy(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
entity.setDeptId(cursor.isNull(offset + 10) ? null : cursor.getLong(offset + 10)); entity.setDeptId(cursor.isNull(offset + 10) ? null : cursor.getLong(offset + 10));
entity.setUploadStatus(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11)); entity.setCaId(cursor.isNull(offset + 11) ? null : cursor.getLong(offset + 11));
entity.setSearchValue(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12)); entity.setUploadStatus(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
entity.setCreateBy(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13)); entity.setSearchValue(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
entity.setCreateTime(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14)); entity.setCreateBy(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
entity.setUpdateBy(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15)); entity.setCreateTime(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
entity.setUpdateTime(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16)); entity.setUpdateBy(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
entity.setRemark(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17)); entity.setUpdateTime(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
entity.setRemark(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
} }
@Override @Override
......
...@@ -47,15 +47,17 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long> ...@@ -47,15 +47,17 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long>
public final static Property PhotoPath = new Property(20, String.class, "photoPath", false, "PHOTO_PATH"); public final static Property PhotoPath = new Property(20, String.class, "photoPath", false, "PHOTO_PATH");
public final static Property Status = new Property(21, String.class, "status", false, "STATUS"); public final static Property Status = new Property(21, String.class, "status", false, "STATUS");
public final static Property IsOut = new Property(22, Long.class, "isOut", false, "IS_OUT"); public final static Property IsOut = new Property(22, Long.class, "isOut", false, "IS_OUT");
public final static Property InputTime = new Property(23, String.class, "inputTime", false, "INPUT_TIME"); public final static Property Age = new Property(23, Integer.class, "age", false, "AGE");
public final static Property DeptId = new Property(24, Long.class, "deptId", false, "DEPT_ID"); public final static Property Colour = new Property(24, String.class, "colour", false, "COLOUR");
public final static Property UploadStatus = new Property(25, String.class, "uploadStatus", false, "UPLOAD_STATUS"); public final static Property InputTime = new Property(25, String.class, "inputTime", false, "INPUT_TIME");
public final static Property UploadTime = new Property(26, String.class, "uploadTime", false, "UPLOAD_TIME"); public final static Property DeptId = new Property(26, Long.class, "deptId", false, "DEPT_ID");
public final static Property CreateBy = new Property(27, String.class, "createBy", false, "CREATE_BY"); public final static Property UploadStatus = new Property(27, String.class, "uploadStatus", false, "UPLOAD_STATUS");
public final static Property CreateTime = new Property(28, String.class, "createTime", false, "CREATE_TIME"); public final static Property UploadTime = new Property(28, String.class, "uploadTime", false, "UPLOAD_TIME");
public final static Property UpdateBy = new Property(29, String.class, "updateBy", false, "UPDATE_BY"); public final static Property CreateBy = new Property(29, String.class, "createBy", false, "CREATE_BY");
public final static Property UpdateTime = new Property(30, String.class, "updateTime", false, "UPDATE_TIME"); public final static Property CreateTime = new Property(30, String.class, "createTime", false, "CREATE_TIME");
public final static Property Remark = new Property(31, String.class, "remark", false, "REMARK"); public final static Property UpdateBy = new Property(31, String.class, "updateBy", false, "UPDATE_BY");
public final static Property UpdateTime = new Property(32, String.class, "updateTime", false, "UPDATE_TIME");
public final static Property Remark = new Property(33, String.class, "remark", false, "REMARK");
} }
...@@ -94,15 +96,17 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long> ...@@ -94,15 +96,17 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long>
"\"PHOTO_PATH\" TEXT," + // 20: photoPath "\"PHOTO_PATH\" TEXT," + // 20: photoPath
"\"STATUS\" TEXT," + // 21: status "\"STATUS\" TEXT," + // 21: status
"\"IS_OUT\" INTEGER," + // 22: isOut "\"IS_OUT\" INTEGER," + // 22: isOut
"\"INPUT_TIME\" TEXT," + // 23: inputTime "\"AGE\" INTEGER," + // 23: age
"\"DEPT_ID\" INTEGER," + // 24: deptId "\"COLOUR\" TEXT," + // 24: colour
"\"UPLOAD_STATUS\" TEXT," + // 25: uploadStatus "\"INPUT_TIME\" TEXT," + // 25: inputTime
"\"UPLOAD_TIME\" TEXT," + // 26: uploadTime "\"DEPT_ID\" INTEGER," + // 26: deptId
"\"CREATE_BY\" TEXT," + // 27: createBy "\"UPLOAD_STATUS\" TEXT," + // 27: uploadStatus
"\"CREATE_TIME\" TEXT," + // 28: createTime "\"UPLOAD_TIME\" TEXT," + // 28: uploadTime
"\"UPDATE_BY\" TEXT," + // 29: updateBy "\"CREATE_BY\" TEXT," + // 29: createBy
"\"UPDATE_TIME\" TEXT," + // 30: updateTime "\"CREATE_TIME\" TEXT," + // 30: createTime
"\"REMARK\" TEXT);"); // 31: remark "\"UPDATE_BY\" TEXT," + // 31: updateBy
"\"UPDATE_TIME\" TEXT," + // 32: updateTime
"\"REMARK\" TEXT);"); // 33: remark
} }
/** Drops the underlying database table. */ /** Drops the underlying database table. */
...@@ -230,49 +234,59 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long> ...@@ -230,49 +234,59 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long>
stmt.bindLong(23, isOut); stmt.bindLong(23, isOut);
} }
Integer age = entity.getAge();
if (age != null) {
stmt.bindLong(24, age);
}
String colour = entity.getColour();
if (colour != null) {
stmt.bindString(25, colour);
}
String inputTime = entity.getInputTime(); String inputTime = entity.getInputTime();
if (inputTime != null) { if (inputTime != null) {
stmt.bindString(24, inputTime); stmt.bindString(26, inputTime);
} }
Long deptId = entity.getDeptId(); Long deptId = entity.getDeptId();
if (deptId != null) { if (deptId != null) {
stmt.bindLong(25, deptId); stmt.bindLong(27, deptId);
} }
String uploadStatus = entity.getUploadStatus(); String uploadStatus = entity.getUploadStatus();
if (uploadStatus != null) { if (uploadStatus != null) {
stmt.bindString(26, uploadStatus); stmt.bindString(28, uploadStatus);
} }
String uploadTime = entity.getUploadTime(); String uploadTime = entity.getUploadTime();
if (uploadTime != null) { if (uploadTime != null) {
stmt.bindString(27, uploadTime); stmt.bindString(29, uploadTime);
} }
String createBy = entity.getCreateBy(); String createBy = entity.getCreateBy();
if (createBy != null) { if (createBy != null) {
stmt.bindString(28, createBy); stmt.bindString(30, createBy);
} }
String createTime = entity.getCreateTime(); String createTime = entity.getCreateTime();
if (createTime != null) { if (createTime != null) {
stmt.bindString(29, createTime); stmt.bindString(31, createTime);
} }
String updateBy = entity.getUpdateBy(); String updateBy = entity.getUpdateBy();
if (updateBy != null) { if (updateBy != null) {
stmt.bindString(30, updateBy); stmt.bindString(32, updateBy);
} }
String updateTime = entity.getUpdateTime(); String updateTime = entity.getUpdateTime();
if (updateTime != null) { if (updateTime != null) {
stmt.bindString(31, updateTime); stmt.bindString(33, updateTime);
} }
String remark = entity.getRemark(); String remark = entity.getRemark();
if (remark != null) { if (remark != null) {
stmt.bindString(32, remark); stmt.bindString(34, remark);
} }
} }
...@@ -395,49 +409,59 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long> ...@@ -395,49 +409,59 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long>
stmt.bindLong(23, isOut); stmt.bindLong(23, isOut);
} }
Integer age = entity.getAge();
if (age != null) {
stmt.bindLong(24, age);
}
String colour = entity.getColour();
if (colour != null) {
stmt.bindString(25, colour);
}
String inputTime = entity.getInputTime(); String inputTime = entity.getInputTime();
if (inputTime != null) { if (inputTime != null) {
stmt.bindString(24, inputTime); stmt.bindString(26, inputTime);
} }
Long deptId = entity.getDeptId(); Long deptId = entity.getDeptId();
if (deptId != null) { if (deptId != null) {
stmt.bindLong(25, deptId); stmt.bindLong(27, deptId);
} }
String uploadStatus = entity.getUploadStatus(); String uploadStatus = entity.getUploadStatus();
if (uploadStatus != null) { if (uploadStatus != null) {
stmt.bindString(26, uploadStatus); stmt.bindString(28, uploadStatus);
} }
String uploadTime = entity.getUploadTime(); String uploadTime = entity.getUploadTime();
if (uploadTime != null) { if (uploadTime != null) {
stmt.bindString(27, uploadTime); stmt.bindString(29, uploadTime);
} }
String createBy = entity.getCreateBy(); String createBy = entity.getCreateBy();
if (createBy != null) { if (createBy != null) {
stmt.bindString(28, createBy); stmt.bindString(30, createBy);
} }
String createTime = entity.getCreateTime(); String createTime = entity.getCreateTime();
if (createTime != null) { if (createTime != null) {
stmt.bindString(29, createTime); stmt.bindString(31, createTime);
} }
String updateBy = entity.getUpdateBy(); String updateBy = entity.getUpdateBy();
if (updateBy != null) { if (updateBy != null) {
stmt.bindString(30, updateBy); stmt.bindString(32, updateBy);
} }
String updateTime = entity.getUpdateTime(); String updateTime = entity.getUpdateTime();
if (updateTime != null) { if (updateTime != null) {
stmt.bindString(31, updateTime); stmt.bindString(33, updateTime);
} }
String remark = entity.getRemark(); String remark = entity.getRemark();
if (remark != null) { if (remark != null) {
stmt.bindString(32, remark); stmt.bindString(34, remark);
} }
} }
...@@ -472,15 +496,17 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long> ...@@ -472,15 +496,17 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long>
cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // photoPath cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // photoPath
cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // status cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21), // status
cursor.isNull(offset + 22) ? null : cursor.getLong(offset + 22), // isOut cursor.isNull(offset + 22) ? null : cursor.getLong(offset + 22), // isOut
cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // inputTime cursor.isNull(offset + 23) ? null : cursor.getInt(offset + 23), // age
cursor.isNull(offset + 24) ? null : cursor.getLong(offset + 24), // deptId cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // colour
cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // uploadStatus cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // inputTime
cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // uploadTime cursor.isNull(offset + 26) ? null : cursor.getLong(offset + 26), // deptId
cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // createBy cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // uploadStatus
cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // createTime cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // uploadTime
cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // updateBy cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // createBy
cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // updateTime cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // createTime
cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31) // remark cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // updateBy
cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32), // updateTime
cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33) // remark
); );
return entity; return entity;
} }
...@@ -510,15 +536,17 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long> ...@@ -510,15 +536,17 @@ public class CattleResumeEntityDao extends AbstractDao<CattleResumeEntity, Long>
entity.setPhotoPath(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20)); entity.setPhotoPath(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
entity.setStatus(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21)); entity.setStatus(cursor.isNull(offset + 21) ? null : cursor.getString(offset + 21));
entity.setIsOut(cursor.isNull(offset + 22) ? null : cursor.getLong(offset + 22)); entity.setIsOut(cursor.isNull(offset + 22) ? null : cursor.getLong(offset + 22));
entity.setInputTime(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23)); entity.setAge(cursor.isNull(offset + 23) ? null : cursor.getInt(offset + 23));
entity.setDeptId(cursor.isNull(offset + 24) ? null : cursor.getLong(offset + 24)); entity.setColour(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
entity.setUploadStatus(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25)); entity.setInputTime(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
entity.setUploadTime(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26)); entity.setDeptId(cursor.isNull(offset + 26) ? null : cursor.getLong(offset + 26));
entity.setCreateBy(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27)); entity.setUploadStatus(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
entity.setCreateTime(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28)); entity.setUploadTime(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
entity.setUpdateBy(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29)); entity.setCreateBy(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
entity.setUpdateTime(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30)); entity.setCreateTime(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
entity.setRemark(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31)); entity.setUpdateBy(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
entity.setUpdateTime(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
entity.setRemark(cursor.isNull(offset + 33) ? null : cursor.getString(offset + 33));
} }
@Override @Override
......
...@@ -74,6 +74,11 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel ...@@ -74,6 +74,11 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
*/ */
private Long deptId; private Long deptId;
/**
* 部门id
*/
private Long caId;
/** 是否上传 0未上传,1已上传 */ /** 是否上传 0未上传,1已上传 */
private String uploadStatus; private String uploadStatus;
...@@ -127,6 +132,11 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel ...@@ -127,6 +132,11 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
} else { } else {
deptId = in.readLong(); deptId = in.readLong();
} }
if (in.readByte() == 0) {
caId = null;
} else {
caId = in.readLong();
}
uploadStatus = in.readString(); uploadStatus = in.readString();
searchValue = in.readString(); searchValue = in.readString();
createBy = in.readString(); createBy = in.readString();
...@@ -136,10 +146,10 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel ...@@ -136,10 +146,10 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
remark = in.readString(); remark = in.readString();
} }
@Generated(hash = 933327768) @Generated(hash = 1961071723)
public BreedingRecordDetailEntity(Long unid, Long fUnid, String matingStyle, Long cattleresumeId, public BreedingRecordDetailEntity(Long unid, Long fUnid, String matingStyle, Long cattleresumeId,
String frozenSemenBatch, String matingDate, String isReturn, String backLoveDate, String dueDate, String frozenSemenBatch, String matingDate, String isReturn, String backLoveDate, String dueDate,
String pregnancy, Long deptId, String uploadStatus, String searchValue, String createBy, String pregnancy, Long deptId, Long caId, String uploadStatus, String searchValue, String createBy,
String createTime, String updateBy, String updateTime, String remark) { String createTime, String updateBy, String updateTime, String remark) {
this.unid = unid; this.unid = unid;
this.fUnid = fUnid; this.fUnid = fUnid;
...@@ -152,6 +162,7 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel ...@@ -152,6 +162,7 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
this.dueDate = dueDate; this.dueDate = dueDate;
this.pregnancy = pregnancy; this.pregnancy = pregnancy;
this.deptId = deptId; this.deptId = deptId;
this.caId = caId;
this.uploadStatus = uploadStatus; this.uploadStatus = uploadStatus;
this.searchValue = searchValue; this.searchValue = searchValue;
this.createBy = createBy; this.createBy = createBy;
...@@ -194,6 +205,12 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel ...@@ -194,6 +205,12 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
dest.writeByte((byte) 1); dest.writeByte((byte) 1);
dest.writeLong(deptId); dest.writeLong(deptId);
} }
if (caId == null) {
dest.writeByte((byte) 0);
} else {
dest.writeByte((byte) 1);
dest.writeLong(caId);
}
dest.writeString(uploadStatus); dest.writeString(uploadStatus);
dest.writeString(searchValue); dest.writeString(searchValue);
dest.writeString(createBy); dest.writeString(createBy);
...@@ -308,6 +325,14 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel ...@@ -308,6 +325,14 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
this.deptId = deptId; this.deptId = deptId;
} }
public Long getCaId() {
return caId;
}
public void setCaId(Long caId) {
this.caId = caId;
}
public String getUploadStatus() { public String getUploadStatus() {
return uploadStatus; return uploadStatus;
} }
...@@ -367,17 +392,18 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel ...@@ -367,17 +392,18 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
@Override @Override
public String toString() { public String toString() {
return "BreedingRecordDetailEntity{" + return "BreedingRecordDetailEntity{" +
"unid='" + unid + '\'' + "unid=" + unid +
", fUnid='" + fUnid + '\'' + ", fUnid=" + fUnid +
", matingStyle='" + matingStyle + '\'' + ", matingStyle='" + matingStyle + '\'' +
", cattleresumeId='" + cattleresumeId + '\'' + ", cattleresumeId=" + cattleresumeId +
", frozenSemenBatch='" + frozenSemenBatch + '\'' + ", frozenSemenBatch='" + frozenSemenBatch + '\'' +
", matingDate='" + matingDate + '\'' + ", matingDate='" + matingDate + '\'' +
", isReturn='" + isReturn + '\'' + ", isReturn='" + isReturn + '\'' +
", backLoveDate='" + backLoveDate + '\'' + ", backLoveDate='" + backLoveDate + '\'' +
", dueDate='" + dueDate + '\'' + ", dueDate='" + dueDate + '\'' +
", pregnancy='" + pregnancy + '\'' + ", pregnancy='" + pregnancy + '\'' +
", deptId='" + deptId + '\'' + ", deptId=" + deptId +
", caId=" + caId +
", uploadStatus='" + uploadStatus + '\'' + ", uploadStatus='" + uploadStatus + '\'' +
", searchValue='" + searchValue + '\'' + ", searchValue='" + searchValue + '\'' +
", createBy='" + createBy + '\'' + ", createBy='" + createBy + '\'' +
...@@ -395,6 +421,4 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel ...@@ -395,6 +421,4 @@ public class BreedingRecordDetailEntity extends BaseObservable implements Parcel
public void setFUnid(Long fUnid) { public void setFUnid(Long fUnid) {
this.fUnid = fUnid; this.fUnid = fUnid;
} }
} }
...@@ -90,6 +90,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable { ...@@ -90,6 +90,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
/** 是否淘汰;0,在用,1淘汰 */ /** 是否淘汰;0,在用,1淘汰 */
private Long isOut; private Long isOut;
/**
* 母牛年龄
*/
private Integer age;
/** 犊牛毛色 */
private String colour;
/** 时间戳 */ /** 时间戳 */
private String inputTime; private String inputTime;
...@@ -161,6 +169,12 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable { ...@@ -161,6 +169,12 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
} else { } else {
isOut = in.readLong(); isOut = in.readLong();
} }
if (in.readByte() == 0) {
age = null;
} else {
age = in.readInt();
}
colour = in.readString();
inputTime = in.readString(); inputTime = in.readString();
if (in.readByte() == 0) { if (in.readByte() == 0) {
deptId = null; deptId = null;
...@@ -176,14 +190,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable { ...@@ -176,14 +190,14 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
remark = in.readString(); remark = in.readString();
} }
@Generated(hash = 1080101721) @Generated(hash = 1369241841)
public CattleResumeEntity(Long unid, String registrationNo, String individualNo, String circleNo, public CattleResumeEntity(Long unid, String registrationNo, String individualNo, String circleNo,
String raiseType, String raiseVarieties, String birthdate, Double birthHeavy, String sex, String raiseType, String raiseVarieties, String birthdate, Double birthHeavy, String sex,
String birthDifficulty, String isTwins, String childTime, String grade, String fatherReg, String birthDifficulty, String isTwins, String childTime, String grade, String fatherReg,
String motherReg, Double fromMilkHeavy, String health, String junHeavy, String decAppScore, String motherReg, Double fromMilkHeavy, String health, String junHeavy, String decAppScore,
String photo, String photoPath, String status, Long isOut, String inputTime, Long deptId, String photo, String photoPath, String status, Long isOut, Integer age, String colour,
String uploadStatus, String uploadTime, String createBy, String createTime, String updateBy, String inputTime, Long deptId, String uploadStatus, String uploadTime, String createBy,
String updateTime, String remark) { String createTime, String updateBy, String updateTime, String remark) {
this.unid = unid; this.unid = unid;
this.registrationNo = registrationNo; this.registrationNo = registrationNo;
this.individualNo = individualNo; this.individualNo = individualNo;
...@@ -207,6 +221,8 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable { ...@@ -207,6 +221,8 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
this.photoPath = photoPath; this.photoPath = photoPath;
this.status = status; this.status = status;
this.isOut = isOut; this.isOut = isOut;
this.age = age;
this.colour = colour;
this.inputTime = inputTime; this.inputTime = inputTime;
this.deptId = deptId; this.deptId = deptId;
this.uploadStatus = uploadStatus; this.uploadStatus = uploadStatus;
...@@ -263,6 +279,13 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable { ...@@ -263,6 +279,13 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
dest.writeByte((byte) 1); dest.writeByte((byte) 1);
dest.writeLong(isOut); dest.writeLong(isOut);
} }
if (age == null) {
dest.writeByte((byte) 0);
} else {
dest.writeByte((byte) 1);
dest.writeInt(age);
}
dest.writeString(colour);
dest.writeString(inputTime); dest.writeString(inputTime);
if (deptId == null) { if (deptId == null) {
dest.writeByte((byte) 0); dest.writeByte((byte) 0);
...@@ -296,6 +319,10 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable { ...@@ -296,6 +319,10 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
} }
}; };
public static long getSerialVersionUID() {
return serialVersionUID;
}
public Long getUnid() { public Long getUnid() {
return unid; return unid;
} }
...@@ -480,6 +507,22 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable { ...@@ -480,6 +507,22 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
this.isOut = isOut; this.isOut = isOut;
} }
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public String getColour() {
return colour;
}
public void setColour(String colour) {
this.colour = colour;
}
public String getInputTime() { public String getInputTime() {
return inputTime; return inputTime;
} }
...@@ -578,6 +621,8 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable { ...@@ -578,6 +621,8 @@ public class CattleResumeEntity extends BaseObservable implements Parcelable {
", photoPath='" + photoPath + '\'' + ", photoPath='" + photoPath + '\'' +
", status='" + status + '\'' + ", status='" + status + '\'' +
", isOut=" + isOut + ", isOut=" + isOut +
", age=" + age +
", colour='" + colour + '\'' +
", inputTime='" + inputTime + '\'' + ", inputTime='" + inputTime + '\'' +
", deptId=" + deptId + ", deptId=" + deptId +
", uploadStatus='" + uploadStatus + '\'' + ", uploadStatus='" + uploadStatus + '\'' +
......
package com.phlx.anchorcollect_p.entity;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.databinding.BaseObservable;
/**
* 部门表 sys_dept
*
* @author ruoyi
*/
public class DeptEntity extends BaseObservable implements Parcelable {
/** 部门ID */
private Long deptId;
/** 父部门ID */
private Long parentId;
/** 祖级列表 */
private String ancestors;
/** 部门名称 */
private String deptName;
/** 显示顺序 */
private String orderNum;
/** 负责人 */
private String leader;
/** 联系电话 */
private String phone;
/** 邮箱 */
private String email;
/** 部门状态:0正常,1停用 */
private String status;
/** 删除标志(0代表存在 2代表删除) */
private String delFlag;
/** 父部门名称 */
private String parentName;
/** 排除编号 */
private Long excludeId;
public DeptEntity() {
}
protected DeptEntity(Parcel in) {
if (in.readByte() == 0) {
deptId = null;
} else {
deptId = in.readLong();
}
if (in.readByte() == 0) {
parentId = null;
} else {
parentId = in.readLong();
}
ancestors = in.readString();
deptName = in.readString();
orderNum = in.readString();
leader = in.readString();
phone = in.readString();
email = in.readString();
status = in.readString();
delFlag = in.readString();
parentName = in.readString();
if (in.readByte() == 0) {
excludeId = null;
} else {
excludeId = in.readLong();
}
}
@Override
public void writeToParcel(Parcel dest, int flags) {
if (deptId == null) {
dest.writeByte((byte) 0);
} else {
dest.writeByte((byte) 1);
dest.writeLong(deptId);
}
if (parentId == null) {
dest.writeByte((byte) 0);
} else {
dest.writeByte((byte) 1);
dest.writeLong(parentId);
}
dest.writeString(ancestors);
dest.writeString(deptName);
dest.writeString(orderNum);
dest.writeString(leader);
dest.writeString(phone);
dest.writeString(email);
dest.writeString(status);
dest.writeString(delFlag);
dest.writeString(parentName);
if (excludeId == null) {
dest.writeByte((byte) 0);
} else {
dest.writeByte((byte) 1);
dest.writeLong(excludeId);
}
}
@Override
public int describeContents() {
return 0;
}
public static final Creator<DeptEntity> CREATOR = new Creator<DeptEntity>() {
@Override
public DeptEntity createFromParcel(Parcel in) {
return new DeptEntity(in);
}
@Override
public DeptEntity[] newArray(int size) {
return new DeptEntity[size];
}
};
public Long getDeptId() {
return deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public String getAncestors() {
return ancestors;
}
public void setAncestors(String ancestors) {
this.ancestors = ancestors;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public String getOrderNum() {
return orderNum;
}
public void setOrderNum(String orderNum) {
this.orderNum = orderNum;
}
public String getLeader() {
return leader;
}
public void setLeader(String leader) {
this.leader = leader;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getParentName() {
return parentName;
}
public void setParentName(String parentName) {
this.parentName = parentName;
}
public Long getExcludeId() {
return excludeId;
}
public void setExcludeId(Long excludeId) {
this.excludeId = excludeId;
}
@Override
public String toString() {
return "DeptEntity{" +
"deptId=" + deptId +
", parentId=" + parentId +
", ancestors='" + ancestors + '\'' +
", deptName='" + deptName + '\'' +
", orderNum='" + orderNum + '\'' +
", leader='" + leader + '\'' +
", phone='" + phone + '\'' +
", email='" + email + '\'' +
", status='" + status + '\'' +
", delFlag='" + delFlag + '\'' +
", parentName='" + parentName + '\'' +
", excludeId=" + excludeId +
'}';
}
}
...@@ -13,8 +13,6 @@ import java.util.List; ...@@ -13,8 +13,6 @@ import java.util.List;
* @author ruoyi * @author ruoyi
*/ */
public class UserEntity extends BaseObservable implements Parcelable { public class UserEntity extends BaseObservable implements Parcelable {
private static final long serialVersionUID = 1L;
/** 用户ID */ /** 用户ID */
private String userId; private String userId;
...@@ -69,9 +67,9 @@ public class UserEntity extends BaseObservable implements Parcelable { ...@@ -69,9 +67,9 @@ public class UserEntity extends BaseObservable implements Parcelable {
/** 密码最后更新时间 */ /** 密码最后更新时间 */
private String pwdUpdateDate; private String pwdUpdateDate;
// /** 部门对象 */ /** 部门对象 */
// private SysDept dept; private DeptEntity dept;
//
private List<UserRoleEntity> roles; private List<UserRoleEntity> roles;
/** 角色组 */ /** 角色组 */
...@@ -103,6 +101,7 @@ public class UserEntity extends BaseObservable implements Parcelable { ...@@ -103,6 +101,7 @@ public class UserEntity extends BaseObservable implements Parcelable {
loginIp = in.readString(); loginIp = in.readString();
loginDate = in.readString(); loginDate = in.readString();
pwdUpdateDate = in.readString(); pwdUpdateDate = in.readString();
dept = in.readParcelable(DeptEntity.class.getClassLoader());
roles = in.createTypedArrayList(UserRoleEntity.CREATOR); roles = in.createTypedArrayList(UserRoleEntity.CREATOR);
} }
...@@ -126,6 +125,7 @@ public class UserEntity extends BaseObservable implements Parcelable { ...@@ -126,6 +125,7 @@ public class UserEntity extends BaseObservable implements Parcelable {
dest.writeString(loginIp); dest.writeString(loginIp);
dest.writeString(loginDate); dest.writeString(loginDate);
dest.writeString(pwdUpdateDate); dest.writeString(pwdUpdateDate);
dest.writeParcelable(dept, flags);
dest.writeTypedList(roles); dest.writeTypedList(roles);
} }
...@@ -146,10 +146,6 @@ public class UserEntity extends BaseObservable implements Parcelable { ...@@ -146,10 +146,6 @@ public class UserEntity extends BaseObservable implements Parcelable {
} }
}; };
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getUserId() { public String getUserId() {
return userId; return userId;
} }
...@@ -294,6 +290,14 @@ public class UserEntity extends BaseObservable implements Parcelable { ...@@ -294,6 +290,14 @@ public class UserEntity extends BaseObservable implements Parcelable {
this.pwdUpdateDate = pwdUpdateDate; this.pwdUpdateDate = pwdUpdateDate;
} }
public DeptEntity getDept() {
return dept;
}
public void setDept(DeptEntity dept) {
this.dept = dept;
}
public List<UserRoleEntity> getRoles() { public List<UserRoleEntity> getRoles() {
return roles; return roles;
} }
...@@ -305,10 +309,10 @@ public class UserEntity extends BaseObservable implements Parcelable { ...@@ -305,10 +309,10 @@ public class UserEntity extends BaseObservable implements Parcelable {
@Override @Override
public String toString() { public String toString() {
return "UserEntity{" + return "UserEntity{" +
"userId=" + userId + "userId='" + userId + '\'' +
", deptId=" + deptId + ", deptId='" + deptId + '\'' +
", parentId=" + parentId + ", parentId='" + parentId + '\'' +
", roleId=" + roleId + ", roleId='" + roleId + '\'' +
", loginName='" + loginName + '\'' + ", loginName='" + loginName + '\'' +
", userName='" + userName + '\'' + ", userName='" + userName + '\'' +
", userType='" + userType + '\'' + ", userType='" + userType + '\'' +
...@@ -323,6 +327,7 @@ public class UserEntity extends BaseObservable implements Parcelable { ...@@ -323,6 +327,7 @@ public class UserEntity extends BaseObservable implements Parcelable {
", loginIp='" + loginIp + '\'' + ", loginIp='" + loginIp + '\'' +
", loginDate='" + loginDate + '\'' + ", loginDate='" + loginDate + '\'' +
", pwdUpdateDate='" + pwdUpdateDate + '\'' + ", pwdUpdateDate='" + pwdUpdateDate + '\'' +
", dept=" + dept +
", roles=" + roles + ", roles=" + roles +
'}'; '}';
} }
......
...@@ -49,15 +49,15 @@ public class RetrofitClient { ...@@ -49,15 +49,15 @@ public class RetrofitClient {
private static final int CACHE_TIMEOUT = 10 * 1024 * 1024; private static final int CACHE_TIMEOUT = 10 * 1024 * 1024;
//服务端根路径 //服务端根路径
public static String baseUrl = public static String baseUrl =
"serve.xlglmnmyzspt.org.cn"//正式 // "serve.xlglmnmyzspt.org.cn"//正式
// "39.101.170.186"//阿里云测试 // "39.101.170.186"//阿里云测试
// "192.168.8.135"//董 "192.168.8.135"//董
// "192.168.43.154"//张敏 // "192.168.43.154"//张敏
; ;
public static String port = public static String port =
""//正式 // ""//正式
// "9000"//阿里云测试 // "9000"//阿里云测试
// "9000"//董 "9000"//董
; ;
private static Context mContext = Utils.getContext(); private static Context mContext = Utils.getContext();
......
...@@ -96,7 +96,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB ...@@ -96,7 +96,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
viewModel.initGen(); viewModel.initGen();
binding.rvCollect.addItemDecoration(new SpaceItemDecoration(10)); // binding.rvCollect.addItemDecoration(new SpaceItemDecoration(10));
binding.rvCollectDetail.addItemDecoration(new SpaceItemDecoration(10)); binding.rvCollectDetail.addItemDecoration(new SpaceItemDecoration(10));
initTimePicker(); initTimePicker();
...@@ -153,7 +153,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB ...@@ -153,7 +153,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
gtc.notifyChange(); gtc.notifyChange();
} }
viewModel.remarkParamEntity.notifyChange(); viewModel.remarkParamEntity.notifyChange();
binding.rvCollect.getAdapter().notifyDataSetChanged(); // binding.rvCollect.getAdapter().notifyDataSetChanged();
binding.rvCollectDetail.getAdapter().notifyDataSetChanged(); binding.rvCollectDetail.getAdapter().notifyDataSetChanged();
if (aBoolean) { if (aBoolean) {
...@@ -382,7 +382,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB ...@@ -382,7 +382,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
//初始化表头 //初始化表头
List<String> headerStr = new ArrayList<>(); List<String> headerStr = new ArrayList<>();
List<String> fieldNameStr = new ArrayList<>(); List<String> fieldNameStr = new ArrayList<>();
for (GenTableColumn gtc : Configs.cattlematingDetaill) { for (GenTableColumn gtc : Configs.cattlematingDetaillList) {
if ("1".equals(gtc.getIsList())) { if ("1".equals(gtc.getIsList())) {
headerStr.add(gtc.getColumnComment()); headerStr.add(gtc.getColumnComment());
fieldNameStr.add(gtc.getJavaField()); fieldNameStr.add(gtc.getJavaField());
...@@ -464,7 +464,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB ...@@ -464,7 +464,7 @@ public class BreedingRecordFragment extends BaseFragment<FragmentBreedingRecordB
if (this != null && !hidden) { if (this != null && !hidden) {
viewModel.clearParamList(); viewModel.clearParamList();
viewModel.clearDetailParamList(); viewModel.clearDetailParamList();
viewModel.queryBreedingRecord(); viewModel.initBreedingRecord();
viewModel.rfid.set(Configs.tempRfid); viewModel.rfid.set(Configs.tempRfid);
} else { } else {
viewModel.rfid.set(""); viewModel.rfid.set("");
......
...@@ -18,11 +18,13 @@ import com.phlx.anchorcollect_p.data.Repository; ...@@ -18,11 +18,13 @@ import com.phlx.anchorcollect_p.data.Repository;
import com.phlx.anchorcollect_p.db.DbUtil; import com.phlx.anchorcollect_p.db.DbUtil;
import com.phlx.anchorcollect_p.db.gen.BreedingRecordDetailEntityDao; import com.phlx.anchorcollect_p.db.gen.BreedingRecordDetailEntityDao;
import com.phlx.anchorcollect_p.db.gen.BreedingRecordEntityDao; import com.phlx.anchorcollect_p.db.gen.BreedingRecordEntityDao;
import com.phlx.anchorcollect_p.db.gen.CattleResumeEntityDao;
import com.phlx.anchorcollect_p.db.gen.DictEntityDao; import com.phlx.anchorcollect_p.db.gen.DictEntityDao;
import com.phlx.anchorcollect_p.db.interf.DbIDUCallBack; import com.phlx.anchorcollect_p.db.interf.DbIDUCallBack;
import com.phlx.anchorcollect_p.db.interf.DbQueryCallBack; import com.phlx.anchorcollect_p.db.interf.DbQueryCallBack;
import com.phlx.anchorcollect_p.entity.BreedingRecordDetailEntity; import com.phlx.anchorcollect_p.entity.BreedingRecordDetailEntity;
import com.phlx.anchorcollect_p.entity.BreedingRecordEntity; import com.phlx.anchorcollect_p.entity.BreedingRecordEntity;
import com.phlx.anchorcollect_p.entity.CattleResumeEntity;
import com.phlx.anchorcollect_p.entity.DictEntity; import com.phlx.anchorcollect_p.entity.DictEntity;
import com.phlx.anchorcollect_p.entity.GenTableColumn; import com.phlx.anchorcollect_p.entity.GenTableColumn;
import com.phlx.anchorcollect_p.ui.fragment.list.CollectGridItem; import com.phlx.anchorcollect_p.ui.fragment.list.CollectGridItem;
...@@ -32,8 +34,10 @@ import com.phlx.anchorcollect_p.util.EntityUtils; ...@@ -32,8 +34,10 @@ import com.phlx.anchorcollect_p.util.EntityUtils;
import org.greenrobot.greendao.query.QueryBuilder; import org.greenrobot.greendao.query.QueryBuilder;
import java.io.File; import java.io.File;
import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -78,6 +82,10 @@ public class BreedingRecordVM extends BaseViewModel<Repository> { ...@@ -78,6 +82,10 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
public ObservableField<String> tag = new ObservableField<>(""); public ObservableField<String> tag = new ObservableField<>("");
public ObservableField<String> weight = new ObservableField<>("125.5"); public ObservableField<String> weight = new ObservableField<>("125.5");
//品种于所属种蓄站
public ObservableField<String> raiseVarieties = new ObservableField<>("");
public ObservableField<String> deptName = new ObservableField<>("");
private BreedingRecordEntity tempEntity; private BreedingRecordEntity tempEntity;
private BreedingRecordDetailEntity tempDetailEntity; private BreedingRecordDetailEntity tempDetailEntity;
...@@ -121,12 +129,49 @@ public class BreedingRecordVM extends BaseViewModel<Repository> { ...@@ -121,12 +129,49 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
} }
public void initBreedingRecord() {
raiseVarieties.set("");
deptName.set(SPUtils.getInstance().getString(Configs.SP_DEPT_NAME, ""));
//查询牛的品种和所属种蓄站
QueryBuilder<CattleResumeEntity> builder1 =
DbUtil.getInstance().getQueryBuilder(CattleResumeEntity.class)
.where(CattleResumeEntityDao.Properties.Unid.eq(Configs.tempUnid));
DbUtil.getInstance().setDbQueryCallBack(new DbQueryCallBack<CattleResumeEntity>() {
@Override
public void onSuccess(List<CattleResumeEntity> result) {
if (result != null && result.size() > 0) {
CattleResumeEntity cattleResumeEntity = result.get(0);
QueryBuilder<DictEntity> builder =
DbUtil.getInstance().getQueryBuilder(DictEntity.class)
.where(DictEntityDao.Properties.DictType.eq("zxgl_cattle_raiseVarieties")
, DictEntityDao.Properties.DictValue.eq(cattleResumeEntity.getRaiseVarieties()));
List<DictEntity> dictEntities = DbUtil.getInstance().queryAll(DictEntity.class, builder);
if (dictEntities != null && dictEntities.size() > 0) {
raiseVarieties.set(dictEntities.get(0).getDictLabel());
queryBreedingRecord();
}
}
// onNotifyAllEvent.setValue(true);
ToastUtils.showShort("查询-种蓄品种于所属种蓄站-成功!");
}
@Override
public void onFailed() {
onNotifyAllEvent.setValue(true);
ToastUtils.showShort("种蓄品种于所属种蓄站-数据库查询失败");
}
}).queryAsyncAll(CattleResumeEntity.class, builder1);
}
public void queryBreedingRecord() { public void queryBreedingRecord() {
QueryBuilder<BreedingRecordEntity> builder = QueryBuilder<BreedingRecordEntity> builder =
DbUtil.getInstance().getQueryBuilder(BreedingRecordEntity.class) DbUtil.getInstance().getQueryBuilder(BreedingRecordEntity.class)
.where(BreedingRecordEntityDao.Properties.CattleresumeId.eq(Configs.tempUnid) .where(BreedingRecordEntityDao.Properties.CattleresumeId.eq(Configs.tempUnid)
, BreedingRecordEntityDao.Properties.CreateTime.like(DateUtils.getYear() + "%") // , BreedingRecordEntityDao.Properties.CreateTime.like(DateUtils.getYear() + "%")
) )
.orderDesc(BreedingRecordEntityDao.Properties.CreateTime); .orderDesc(BreedingRecordEntityDao.Properties.CreateTime);
DbUtil.getInstance().setDbQueryCallBack(new DbQueryCallBack<BreedingRecordEntity>() { DbUtil.getInstance().setDbQueryCallBack(new DbQueryCallBack<BreedingRecordEntity>() {
...@@ -168,38 +213,38 @@ public class BreedingRecordVM extends BaseViewModel<Repository> { ...@@ -168,38 +213,38 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
tempEntity.setDeptId(breedingRecordEntity.getDeptId()); tempEntity.setDeptId(breedingRecordEntity.getDeptId());
tempEntity.setCattleresumeId(breedingRecordEntity.getCattleresumeId()); tempEntity.setCattleresumeId(breedingRecordEntity.getCattleresumeId());
String[] filedName = EntityUtils.getFiledName(breedingRecordEntity); // String[] filedName = EntityUtils.getFiledName(breedingRecordEntity);
for (String name : filedName) { // for (String name : filedName) {
//
for (GenTableColumn gtc : Configs.cattlematingMaster) { // for (GenTableColumn gtc : Configs.cattlematingMaster) {
//
if (name.equals(gtc.getJavaField())) { // if (name.equals(gtc.getJavaField())) {
try { // try {
Object fieldValueByName = EntityUtils.getFieldValueByName(name, breedingRecordEntity); // Object fieldValueByName = EntityUtils.getFieldValueByName(name, breedingRecordEntity);
String value = fieldValueByName == null ? "" : fieldValueByName.toString(); // String value = fieldValueByName == null ? "" : fieldValueByName.toString();
// Log.e("fieldValue:", "key:" + name + " | value:" + value); //// Log.e("fieldValue:", "key:" + name + " | value:" + value);
gtc.setContent(value); // gtc.setContent(value);
String showName = value; // String showName = value;
// 如果是选择的,查字典项 // // 如果是选择的,查字典项
if (!StringUtils.isEmpty(gtc.getDictType())) { // if (!StringUtils.isEmpty(gtc.getDictType())) {
QueryBuilder<DictEntity> builder = // QueryBuilder<DictEntity> builder =
DbUtil.getInstance().getQueryBuilder(DictEntity.class) // DbUtil.getInstance().getQueryBuilder(DictEntity.class)
.where(DictEntityDao.Properties.DictType.eq(gtc.getDictType()) // .where(DictEntityDao.Properties.DictType.eq(gtc.getDictType())
, DictEntityDao.Properties.DictValue.eq(value)); // , DictEntityDao.Properties.DictValue.eq(value));
List<DictEntity> dictEntities = DbUtil.getInstance().queryAll(DictEntity.class, builder); // List<DictEntity> dictEntities = DbUtil.getInstance().queryAll(DictEntity.class, builder);
if (dictEntities != null && dictEntities.size() > 0) { // if (dictEntities != null && dictEntities.size() > 0) {
showName = dictEntities.get(0).getDictLabel(); // showName = dictEntities.get(0).getDictLabel();
} // }
} // }
gtc.setShowName(showName); // gtc.setShowName(showName);
//
} catch (IllegalAccessException e) { // } catch (IllegalAccessException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
} // }
} // }
//
} // }
initDetailList(breedingRecordEntity); initDetailList(breedingRecordEntity);
} }
...@@ -278,7 +323,9 @@ public class BreedingRecordVM extends BaseViewModel<Repository> { ...@@ -278,7 +323,9 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
QueryBuilder<BreedingRecordDetailEntity> builder = QueryBuilder<BreedingRecordDetailEntity> builder =
DbUtil.getInstance().getQueryBuilder(BreedingRecordDetailEntity.class) DbUtil.getInstance().getQueryBuilder(BreedingRecordDetailEntity.class)
.where(BreedingRecordDetailEntityDao.Properties.FUnid.eq(breedingRecordEntity.getUnid())); .where(BreedingRecordDetailEntityDao.Properties.CaId.eq(breedingRecordEntity.getCattleresumeId())
, BreedingRecordDetailEntityDao.Properties.CreateTime.like(DateUtils.getYear() + "%")
);
DbUtil.getInstance().setDbQueryCallBack(new DbQueryCallBack<BreedingRecordDetailEntity>() { DbUtil.getInstance().setDbQueryCallBack(new DbQueryCallBack<BreedingRecordDetailEntity>() {
@Override @Override
public void onSuccess(List<BreedingRecordDetailEntity> result) { public void onSuccess(List<BreedingRecordDetailEntity> result) {
...@@ -313,7 +360,7 @@ public class BreedingRecordVM extends BaseViewModel<Repository> { ...@@ -313,7 +360,7 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
String[] filedName = EntityUtils.getFiledName(pe); String[] filedName = EntityUtils.getFiledName(pe);
for (String name : filedName) { for (String name : filedName) {
for (GenTableColumn gtc : Configs.cattlematingDetaill) { for (GenTableColumn gtc : Configs.cattlematingDetaillList) {
if (name.equals(gtc.getJavaField())) { if (name.equals(gtc.getJavaField())) {
try { try {
...@@ -347,7 +394,7 @@ public class BreedingRecordVM extends BaseViewModel<Repository> { ...@@ -347,7 +394,7 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
//再把格式bean里的数据转换为数据bean //再把格式bean里的数据转换为数据bean
JsonObject jsonObject = new JsonObject(); JsonObject jsonObject = new JsonObject();
for (GenTableColumn gtc : Configs.cattlematingDetaill) { for (GenTableColumn gtc : Configs.cattlematingDetaillList) {
//防止转json类型错误 //防止转json类型错误
if ("".equals(gtc.getContent())) { if ("".equals(gtc.getContent())) {
switch (gtc.getJavaType()) { switch (gtc.getJavaType()) {
...@@ -514,7 +561,7 @@ public class BreedingRecordVM extends BaseViewModel<Repository> { ...@@ -514,7 +561,7 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
if (tempDetailEntity.getUnid() == null) {//新增 if (tempDetailEntity.getUnid() == null) {//新增
breedingRecordDetailEntity.setUnid(IdUtil.createSnowflake(3, 1).nextId()); breedingRecordDetailEntity.setUnid(IdUtil.createSnowflake(3, 1).nextId());
breedingRecordDetailEntity.setDeptId(Long.parseLong(SPUtils.getInstance().getString(Configs.SP_DEPT_ID))); breedingRecordDetailEntity.setDeptId(Long.parseLong(SPUtils.getInstance().getString(Configs.SP_DEPT_ID)));
breedingRecordDetailEntity.setCattleresumeId(Configs.tempUnid); // breedingRecordDetailEntity.setCattleresumeId(Configs.tempUnid);
dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
breedingRecordDetailEntity.setCreateTime(dateFormat.format(new Date())); breedingRecordDetailEntity.setCreateTime(dateFormat.format(new Date()));
breedingRecordDetailEntity.setCreateBy(SPUtils.getInstance().getString(Configs.SP_LOGIN_NAME)); breedingRecordDetailEntity.setCreateBy(SPUtils.getInstance().getString(Configs.SP_LOGIN_NAME));
...@@ -523,14 +570,30 @@ public class BreedingRecordVM extends BaseViewModel<Repository> { ...@@ -523,14 +570,30 @@ public class BreedingRecordVM extends BaseViewModel<Repository> {
breedingRecordDetailEntity.setCreateBy(tempDetailEntity.getCreateBy()); breedingRecordDetailEntity.setCreateBy(tempDetailEntity.getCreateBy());
breedingRecordDetailEntity.setCreateTime(tempDetailEntity.getCreateTime()); breedingRecordDetailEntity.setCreateTime(tempDetailEntity.getCreateTime());
breedingRecordDetailEntity.setDeptId(tempDetailEntity.getDeptId()); breedingRecordDetailEntity.setDeptId(tempDetailEntity.getDeptId());
breedingRecordDetailEntity.setCattleresumeId(tempDetailEntity.getCattleresumeId()); // breedingRecordDetailEntity.setCattleresumeId(tempDetailEntity.getCattleresumeId());
dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
breedingRecordDetailEntity.setUpdateTime(dateFormat.format(new Date())); breedingRecordDetailEntity.setUpdateTime(dateFormat.format(new Date()));
breedingRecordDetailEntity.setUpdateBy(SPUtils.getInstance().getString(Configs.SP_LOGIN_NAME)); breedingRecordDetailEntity.setUpdateBy(SPUtils.getInstance().getString(Configs.SP_LOGIN_NAME));
} }
breedingRecordDetailEntity.setUploadStatus("0"); breedingRecordDetailEntity.setUploadStatus("0");
breedingRecordDetailEntity.setCaId(Configs.tempUnid);
breedingRecordDetailEntity.setfUnid(tempDetailEntity.getfUnid()); breedingRecordDetailEntity.setfUnid(tempDetailEntity.getfUnid());
breedingRecordDetailEntity.setRemark(remarkParamEntity.getContent()); breedingRecordDetailEntity.setRemark(remarkParamEntity.getContent());
/**
计算预产期280天
*/
String str = "yyyy-MM-dd";
SimpleDateFormat format2 = new SimpleDateFormat(str);
Date date = null;
try {
date = format2.parse(breedingRecordDetailEntity.getMatingDate());
} catch (ParseException e) {
e.printStackTrace();
}
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.DATE, 280);
breedingRecordDetailEntity.setDueDate(format2.format(calendar.getTime()));
detailUploadData = new ArrayList<>(); detailUploadData = new ArrayList<>();
detailUploadData.add(breedingRecordDetailEntity); detailUploadData.add(breedingRecordDetailEntity);
......
...@@ -225,11 +225,11 @@ public class PerformanceVM extends BaseViewModel<Repository> { ...@@ -225,11 +225,11 @@ public class PerformanceVM extends BaseViewModel<Repository> {
} }
} }
savePerformance(); checkPerformance();
} }
}); });
private void savePerformance() { private void checkPerformance() {
JsonObject jsonObject = new JsonObject(); JsonObject jsonObject = new JsonObject();
for (GenTableColumn gtc : Configs.performance) { for (GenTableColumn gtc : Configs.performance) {
...@@ -250,6 +250,35 @@ public class PerformanceVM extends BaseViewModel<Repository> { ...@@ -250,6 +250,35 @@ public class PerformanceVM extends BaseViewModel<Repository> {
Gson gson = new Gson(); Gson gson = new Gson();
PerformanceEntity performanceEntity = gson.fromJson(jsonObject, PerformanceEntity.class); PerformanceEntity performanceEntity = gson.fromJson(jsonObject, PerformanceEntity.class);
//查询此月龄是否存在,存在拿出主键 做覆盖
QueryBuilder<PerformanceEntity> builder =
DbUtil.getInstance().getQueryBuilder(PerformanceEntity.class)
.where(PerformanceEntityDao.Properties.Age.eq(performanceEntity.getAge())
, PerformanceEntityDao.Properties.CattleresumeId.eq(Configs.tempUnid)
);
DbUtil.getInstance().setDbQueryCallBack(new DbQueryCallBack<PerformanceEntity>() {
@Override
public void onSuccess(List<PerformanceEntity> result) {
if (result != null && result.size() > 0) {
isModify = true;
Configs.resumeId = result.get(0).getUnid();
performanceEntity.setUnid(result.get(0).getUnid());
}
savePerformance(performanceEntity);
ToastUtils.showShort("查询-性能测定月龄数据-成功!");
}
@Override
public void onFailed() {
ToastUtils.showShort("性能测定月龄数据-数据库查询失败");
}
}).queryAsyncAll(PerformanceEntity.class, builder);
}
private void savePerformance(PerformanceEntity performanceEntity) {
dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if (!isModify) {//新增 if (!isModify) {//新增
uuid = IdUtil.createSnowflake(3, 1).nextId(); uuid = IdUtil.createSnowflake(3, 1).nextId();
......
...@@ -157,6 +157,7 @@ public class LoginVM extends BaseViewModel<Repository> { ...@@ -157,6 +157,7 @@ public class LoginVM extends BaseViewModel<Repository> {
SPUtils.getInstance().put(Configs.SP_NAME, response.getData().getUser().getUserName()); SPUtils.getInstance().put(Configs.SP_NAME, response.getData().getUser().getUserName());
SPUtils.getInstance().put(Configs.SP_LOGIN_NAME, response.getData().getUser().getLoginName()); SPUtils.getInstance().put(Configs.SP_LOGIN_NAME, response.getData().getUser().getLoginName());
SPUtils.getInstance().put(Configs.SP_DEPT_ID, response.getData().getUser().getDeptId()); SPUtils.getInstance().put(Configs.SP_DEPT_ID, response.getData().getUser().getDeptId());
SPUtils.getInstance().put(Configs.SP_DEPT_NAME, response.getData().getUser().getDept().getDeptName());
String roleIds = ""; String roleIds = "";
List<UserRoleEntity> roles = response.getData().getUser().getRoles(); List<UserRoleEntity> roles = response.getData().getUser().getRoles();
...@@ -295,9 +296,18 @@ public class LoginVM extends BaseViewModel<Repository> { ...@@ -295,9 +296,18 @@ public class LoginVM extends BaseViewModel<Repository> {
QueryBuilder<GenTableColumn> builderDetaile6 = QueryBuilder<GenTableColumn> builderDetaile6 =
DbUtil.getInstance().getQueryBuilder(GenTableColumn.class) DbUtil.getInstance().getQueryBuilder(GenTableColumn.class)
.where(GenTableColumnDao.Properties.TableId.eq(gt.getTableId()) .where(GenTableColumnDao.Properties.TableId.eq(gt.getTableId())
, GenTableColumnDao.Properties.IsQuery.eq("1")) , GenTableColumnDao.Properties.IsQuery.eq("1")
)
.orderAsc(GenTableColumnDao.Properties.Sort); .orderAsc(GenTableColumnDao.Properties.Sort);
Configs.cattlematingDetaill = DbUtil.getInstance().queryAll(GenTableColumn.class, builderDetaile6); Configs.cattlematingDetaill = DbUtil.getInstance().queryAll(GenTableColumn.class, builderDetaile6);
//取详情列表表头
QueryBuilder<GenTableColumn> builderDetaile7 =
DbUtil.getInstance().getQueryBuilder(GenTableColumn.class)
.where(GenTableColumnDao.Properties.TableId.eq(gt.getTableId())
, GenTableColumnDao.Properties.IsList.eq("1")
)
.orderAsc(GenTableColumnDao.Properties.Sort);
Configs.cattlematingDetaillList = DbUtil.getInstance().queryAll(GenTableColumn.class, builderDetaile7);
break; break;
} }
......
...@@ -210,6 +210,7 @@ public class MainActivity extends BaseActivity<ActivityMainBinding, MainVM> { ...@@ -210,6 +210,7 @@ public class MainActivity extends BaseActivity<ActivityMainBinding, MainVM> {
viewModel.onTabClickEvent.observe(this, new Observer<Integer>() { viewModel.onTabClickEvent.observe(this, new Observer<Integer>() {
@Override @Override
public void onChanged(Integer integer) { public void onChanged(Integer integer) {
Configs.resumeId = null;
labelSwitching(integer); labelSwitching(integer);
Configs.mainPosition = integer; Configs.mainPosition = integer;
......
...@@ -114,63 +114,71 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -114,63 +114,71 @@ public class SyncVM extends BaseViewModel<Repository> {
public BindingCommand OnBaseArchivesSyncClickCommand = new BindingCommand(new BindingAction() { public BindingCommand OnBaseArchivesSyncClickCommand = new BindingCommand(new BindingAction() {
@Override @Override
public void call() { public void call() {
queryBaseArchives(); // queryBaseArchives();
} }
}); });
public BindingCommand OnSignMeasureSyncClickCommand = new BindingCommand(new BindingAction() { public BindingCommand OnSignMeasureSyncClickCommand = new BindingCommand(new BindingAction() {
@Override @Override
public void call() { public void call() {
showDialog("正在同步性能测定数据..."); // showDialog("正在同步性能测定数据...");
querySignMeasure(); // querySignMeasure();
} }
}); });
public BindingCommand OnWeightingManageSyncClickCommand = new BindingCommand(new BindingAction() { public BindingCommand OnWeightingManageSyncClickCommand = new BindingCommand(new BindingAction() {
@Override @Override
public void call() { public void call() {
showDialog("正在同步称重管理数据..."); // showDialog("正在同步称重管理数据...");
queryWeightMan(); // queryWeightMan();
} }
}); });
public BindingCommand OnMedicalRecordSyncClickCommand = new BindingCommand(new BindingAction() { public BindingCommand OnMedicalRecordSyncClickCommand = new BindingCommand(new BindingAction() {
@Override @Override
public void call() { public void call() {
showDialog("正在同步诊疗记录数据..."); // showDialog("正在同步诊疗记录数据...");
queryMedicalRecord(); // queryMedicalRecord();
} }
}); });
public BindingCommand OnImmunRecordSyncClickCommand = new BindingCommand(new BindingAction() { public BindingCommand OnImmunRecordSyncClickCommand = new BindingCommand(new BindingAction() {
@Override @Override
public void call() { public void call() {
showDialog("正在同步免疫记录-主表数据..."); // showDialog("正在同步免疫记录-主表数据...");
queryImmuneBatch(); // queryImmuneBatch();
} }
}); });
public BindingCommand OnImmunRecordDetailSyncClickCommand = new BindingCommand(new BindingAction() { public BindingCommand OnImmunRecordDetailSyncClickCommand = new BindingCommand(new BindingAction() {
@Override @Override
public void call() { public void call() {
showDialog("正在同步免疫记录-子表数据..."); // showDialog("正在同步免疫记录-子表数据...");
queryImmuneBatchDetail(); // queryImmuneBatchDetail();
} }
}); });
public BindingCommand OnBreedingRecordSyncClickCommand = new BindingCommand(new BindingAction() { public BindingCommand OnBreedingRecordSyncClickCommand = new BindingCommand(new BindingAction() {
@Override @Override
public void call() { public void call() {
showDialog("正在同步配种记录-主表数据..."); // showDialog("正在同步配种记录-主表数据...");
queryBreedingRecord(); // queryBreedingRecord();
} }
}); });
public BindingCommand OnBreedingRecordDetailSyncClickCommand = new BindingCommand(new BindingAction() { public BindingCommand OnBreedingRecordDetailSyncClickCommand = new BindingCommand(new BindingAction() {
@Override @Override
public void call() { public void call() {
showDialog("正在同步配种记录-子表数据..."); // showDialog("正在同步配种记录-子表数据...");
queryBreedingRecordDetail(); // queryBreedingRecordDetail();
}
});
public BindingCommand OnOneClickUploadClickCommand = new BindingCommand(new BindingAction() {
@Override
public void call() {
showDialog("正在一键同步数据...");
queryBaseArchives();
} }
}); });
...@@ -202,7 +210,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -202,7 +210,7 @@ public class SyncVM extends BaseViewModel<Repository> {
.compose(RxUtils.bindToLifecycle(getLifecycleProvider())) .compose(RxUtils.bindToLifecycle(getLifecycleProvider()))
.compose(RxUtils.schedulersTransformer()) .compose(RxUtils.schedulersTransformer())
.compose(RxUtils.exceptionTransformer()) .compose(RxUtils.exceptionTransformer())
.doOnSubscribe(disposable -> showDialog("正在同步基础数据...")) // .doOnSubscribe(disposable -> showDialog("正在同步基础数据..."))
.subscribe((Consumer<ListResponse<CattleResumeEntity>>) response -> { .subscribe((Consumer<ListResponse<CattleResumeEntity>>) response -> {
if (response.getCode() == 0) { if (response.getCode() == 0) {
...@@ -246,7 +254,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -246,7 +254,7 @@ public class SyncVM extends BaseViewModel<Repository> {
} else { } else {
me.goldze.mvvmhabit.utils.ToastUtils.showShort("同步基础数据成功!"); me.goldze.mvvmhabit.utils.ToastUtils.showShort("同步基础数据成功!");
queryCattleResumeUploadCount(false, "0"); queryCattleResumeUploadCount(false, "0");
dismissDialog(); // dismissDialog();
} }
} else if (response.getCode() == 401) { } else if (response.getCode() == 401) {
...@@ -346,7 +354,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -346,7 +354,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步性能测定数据...")) // .doOnSubscribe(disposable -> showDialog("正在同步性能测定数据..."))
.subscribe((Consumer<ListResponse<Long>>) response -> { .subscribe((Consumer<ListResponse<Long>>) response -> {
dismissDialog(); // dismissDialog();
KLog.e("uploadBaseArchives", response.toString()); KLog.e("uploadBaseArchives", response.toString());
//先都设置成错误数据 //先都设置成错误数据
for (CattleResumeEntity pe : cattleResumeEntities) { for (CattleResumeEntity pe : cattleResumeEntities) {
...@@ -443,7 +451,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -443,7 +451,7 @@ public class SyncVM extends BaseViewModel<Repository> {
} }
}).insertAsyncBatch(PerformanceEntity.class, response.getData()); }).insertAsyncBatch(PerformanceEntity.class, response.getData());
} else { } else {
dismissDialog(); // dismissDialog();
ToastUtils.showShort("性能测定数据同步完成!"); ToastUtils.showShort("性能测定数据同步完成!");
queryPerformanceUploadCount(false, "0"); queryPerformanceUploadCount(false, "0");
} }
...@@ -547,7 +555,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -547,7 +555,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步性能测定数据...")) // .doOnSubscribe(disposable -> showDialog("正在同步性能测定数据..."))
.subscribe((Consumer<ListResponse<Long>>) response -> { .subscribe((Consumer<ListResponse<Long>>) response -> {
dismissDialog(); // dismissDialog();
KLog.e("uploadSignMeasure", response.toString()); KLog.e("uploadSignMeasure", response.toString());
//先都设置成错误数据 //先都设置成错误数据
for (PerformanceEntity pe : performanceEntities) { for (PerformanceEntity pe : performanceEntities) {
...@@ -644,7 +652,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -644,7 +652,7 @@ public class SyncVM extends BaseViewModel<Repository> {
} }
}).insertAsyncBatch(BreedingRecordEntity.class, response.getData()); }).insertAsyncBatch(BreedingRecordEntity.class, response.getData());
} else { } else {
dismissDialog(); // dismissDialog();
me.goldze.mvvmhabit.utils.ToastUtils.showShort("同步配种主表数据成功!"); me.goldze.mvvmhabit.utils.ToastUtils.showShort("同步配种主表数据成功!");
queryBreedingRecordUploadCount(false, "0"); queryBreedingRecordUploadCount(false, "0");
} }
...@@ -683,7 +691,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -683,7 +691,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步基础数据...")) // .doOnSubscribe(disposable -> showDialog("正在同步基础数据..."))
.subscribe((Consumer<CollectResponse>) response -> { .subscribe((Consumer<CollectResponse>) response -> {
dismissDialog(); // dismissDialog();
KLog.e("downloadBreedingRecordListSync", response.toString()); KLog.e("downloadBreedingRecordListSync", response.toString());
if (response.getCode() == 0) { if (response.getCode() == 0) {
requestBreedingRecord(); requestBreedingRecord();
...@@ -779,7 +787,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -779,7 +787,7 @@ public class SyncVM extends BaseViewModel<Repository> {
startActivity(LoginActivity.class, bundle); startActivity(LoginActivity.class, bundle);
me.goldze.mvvmhabit.utils.ToastUtils.showShort("登录过期,请重新登录"); me.goldze.mvvmhabit.utils.ToastUtils.showShort("登录过期,请重新登录");
} else { } else {
dismissDialog(); // dismissDialog();
me.goldze.mvvmhabit.utils.ToastUtils.showShort("服务器:" + response.getMsg()); me.goldze.mvvmhabit.utils.ToastUtils.showShort("服务器:" + response.getMsg());
requestBreedingRecord(); requestBreedingRecord();
} }
...@@ -841,7 +849,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -841,7 +849,7 @@ public class SyncVM extends BaseViewModel<Repository> {
} }
}).insertAsyncBatch(BreedingRecordDetailEntity.class, response.getData()); }).insertAsyncBatch(BreedingRecordDetailEntity.class, response.getData());
} else { } else {
dismissDialog(); // dismissDialog();
me.goldze.mvvmhabit.utils.ToastUtils.showShort("同步配种记录子表数据成功!"); me.goldze.mvvmhabit.utils.ToastUtils.showShort("同步配种记录子表数据成功!");
queryBreedingRecordDetailUploadCount(false, "0"); queryBreedingRecordDetailUploadCount(false, "0");
} }
...@@ -880,7 +888,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -880,7 +888,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步基础数据...")) // .doOnSubscribe(disposable -> showDialog("正在同步基础数据..."))
.subscribe((Consumer<CollectResponse>) response -> { .subscribe((Consumer<CollectResponse>) response -> {
dismissDialog(); // dismissDialog();
KLog.e("requestBreedingRecordDetailSync", response.toString()); KLog.e("requestBreedingRecordDetailSync", response.toString());
if (response.getCode() == 0) { if (response.getCode() == 0) {
queryBreedingRecordDetail(); queryBreedingRecordDetail();
...@@ -976,7 +984,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -976,7 +984,7 @@ public class SyncVM extends BaseViewModel<Repository> {
startActivity(LoginActivity.class, bundle); startActivity(LoginActivity.class, bundle);
me.goldze.mvvmhabit.utils.ToastUtils.showShort("登录过期,请重新登录"); me.goldze.mvvmhabit.utils.ToastUtils.showShort("登录过期,请重新登录");
} else { } else {
dismissDialog(); // dismissDialog();
me.goldze.mvvmhabit.utils.ToastUtils.showShort("服务器:" + response.getMsg()); me.goldze.mvvmhabit.utils.ToastUtils.showShort("服务器:" + response.getMsg());
requestBreedingRecordDetail(); requestBreedingRecordDetail();
} }
...@@ -1040,7 +1048,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1040,7 +1048,7 @@ public class SyncVM extends BaseViewModel<Repository> {
}).insertAsyncBatch(WeightManEntity.class, response.getData()); }).insertAsyncBatch(WeightManEntity.class, response.getData());
} else { } else {
me.goldze.mvvmhabit.utils.ToastUtils.showShort("同步称重管理数据成功!"); me.goldze.mvvmhabit.utils.ToastUtils.showShort("同步称重管理数据成功!");
dismissDialog(); // dismissDialog();
queryWeightManUploadCount(false, "0"); queryWeightManUploadCount(false, "0");
} }
...@@ -1078,7 +1086,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1078,7 +1086,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步称重管理数据...")) // .doOnSubscribe(disposable -> showDialog("正在同步称重管理数据..."))
.subscribe((Consumer<CollectResponse>) response -> { .subscribe((Consumer<CollectResponse>) response -> {
dismissDialog(); // dismissDialog();
KLog.e("requestWeightManSync", response.toString()); KLog.e("requestWeightManSync", response.toString());
if (response.getCode() == 0) { if (response.getCode() == 0) {
queryWeightMan(); queryWeightMan();
...@@ -1237,7 +1245,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1237,7 +1245,7 @@ public class SyncVM extends BaseViewModel<Repository> {
} }
}).insertAsyncBatch(MedicalRecordEntity.class, response.getData()); }).insertAsyncBatch(MedicalRecordEntity.class, response.getData());
} else { } else {
dismissDialog(); // dismissDialog();
me.goldze.mvvmhabit.utils.ToastUtils.showShort("同步诊疗记录数据成功!"); me.goldze.mvvmhabit.utils.ToastUtils.showShort("同步诊疗记录数据成功!");
queryMedicalRecordUploadCount(false, "0"); queryMedicalRecordUploadCount(false, "0");
} }
...@@ -1276,7 +1284,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1276,7 +1284,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步称重管理数据...")) // .doOnSubscribe(disposable -> showDialog("正在同步称重管理数据..."))
.subscribe((Consumer<CollectResponse>) response -> { .subscribe((Consumer<CollectResponse>) response -> {
dismissDialog(); // dismissDialog();
KLog.e("requestMedicalRecordSync", response.toString()); KLog.e("requestMedicalRecordSync", response.toString());
if (response.getCode() == 0) { if (response.getCode() == 0) {
queryMedicalRecord(); queryMedicalRecord();
...@@ -1373,7 +1381,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1373,7 +1381,7 @@ public class SyncVM extends BaseViewModel<Repository> {
startActivity(LoginActivity.class, bundle); startActivity(LoginActivity.class, bundle);
me.goldze.mvvmhabit.utils.ToastUtils.showShort("登录过期,请重新登录"); me.goldze.mvvmhabit.utils.ToastUtils.showShort("登录过期,请重新登录");
} else { } else {
dismissDialog(); // dismissDialog();
me.goldze.mvvmhabit.utils.ToastUtils.showShort("服务器:" + response.getMsg()); me.goldze.mvvmhabit.utils.ToastUtils.showShort("服务器:" + response.getMsg());
requestMedicalRecord(); requestMedicalRecord();
} }
...@@ -1436,7 +1444,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1436,7 +1444,7 @@ public class SyncVM extends BaseViewModel<Repository> {
} }
}).insertAsyncBatch(ImmuneBatchEntity.class, response.getData()); }).insertAsyncBatch(ImmuneBatchEntity.class, response.getData());
} else { } else {
dismissDialog(); // dismissDialog();
me.goldze.mvvmhabit.utils.ToastUtils.showShort("同步免疫记录-主表数据成功!"); me.goldze.mvvmhabit.utils.ToastUtils.showShort("同步免疫记录-主表数据成功!");
queryImmuneBatchUploadCount(false, "0"); queryImmuneBatchUploadCount(false, "0");
} }
...@@ -1477,7 +1485,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1477,7 +1485,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步免疫记录-主表数据...")) // .doOnSubscribe(disposable -> showDialog("正在同步免疫记录-主表数据..."))
.subscribe((Consumer<CollectResponse>) response -> { .subscribe((Consumer<CollectResponse>) response -> {
dismissDialog(); // dismissDialog();
KLog.e("requestImmuneBatchSync", response.toString()); KLog.e("requestImmuneBatchSync", response.toString());
if (response.getCode() == 0) { if (response.getCode() == 0) {
queryImmuneBatch(); queryImmuneBatch();
...@@ -1574,7 +1582,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1574,7 +1582,7 @@ public class SyncVM extends BaseViewModel<Repository> {
startActivity(LoginActivity.class, bundle); startActivity(LoginActivity.class, bundle);
me.goldze.mvvmhabit.utils.ToastUtils.showShort("登录过期,请重新登录"); me.goldze.mvvmhabit.utils.ToastUtils.showShort("登录过期,请重新登录");
} else { } else {
dismissDialog(); // dismissDialog();
me.goldze.mvvmhabit.utils.ToastUtils.showShort("服务器:" + response.getMsg()); me.goldze.mvvmhabit.utils.ToastUtils.showShort("服务器:" + response.getMsg());
requestImmuneBatch(); requestImmuneBatch();
} }
...@@ -1637,7 +1645,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1637,7 +1645,7 @@ public class SyncVM extends BaseViewModel<Repository> {
} }
}).insertAsyncBatch(ImmuneBatchDetailEntity.class, response.getData()); }).insertAsyncBatch(ImmuneBatchDetailEntity.class, response.getData());
} else { } else {
dismissDialog(); // dismissDialog();
me.goldze.mvvmhabit.utils.ToastUtils.showShort("同步免疫记录-子表数据成功!"); me.goldze.mvvmhabit.utils.ToastUtils.showShort("同步免疫记录-子表数据成功!");
queryImmuneBatchDetailUploadCount(false, "0"); queryImmuneBatchDetailUploadCount(false, "0");
} }
...@@ -1676,7 +1684,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1676,7 +1684,7 @@ public class SyncVM extends BaseViewModel<Repository> {
// .doOnSubscribe(disposable -> showDialog("正在同步免疫记录-子表数据...")) // .doOnSubscribe(disposable -> showDialog("正在同步免疫记录-子表数据..."))
.subscribe((Consumer<CollectResponse>) response -> { .subscribe((Consumer<CollectResponse>) response -> {
dismissDialog(); // dismissDialog();
KLog.e("requestImmuneBatchDetailSync", response.toString()); KLog.e("requestImmuneBatchDetailSync", response.toString());
if (response.getCode() == 0) { if (response.getCode() == 0) {
queryImmuneBatchDetail(); queryImmuneBatchDetail();
...@@ -1773,7 +1781,7 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1773,7 +1781,7 @@ public class SyncVM extends BaseViewModel<Repository> {
startActivity(LoginActivity.class, bundle); startActivity(LoginActivity.class, bundle);
me.goldze.mvvmhabit.utils.ToastUtils.showShort("登录过期,请重新登录"); me.goldze.mvvmhabit.utils.ToastUtils.showShort("登录过期,请重新登录");
} else { } else {
dismissDialog(); // dismissDialog();
me.goldze.mvvmhabit.utils.ToastUtils.showShort("服务器:" + response.getMsg()); me.goldze.mvvmhabit.utils.ToastUtils.showShort("服务器:" + response.getMsg());
requestImmuneBatchDetail(); requestImmuneBatchDetail();
} }
...@@ -1827,6 +1835,8 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1827,6 +1835,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就看状态是否继续 //如果是未上传就继续查错误数据,如果不是就看状态是否继续
if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) { if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) {
queryCattleResumeUploadCount(isContinue, UPLOAD_STATUS_ERROR); queryCattleResumeUploadCount(isContinue, UPLOAD_STATUS_ERROR);
} else if (!isContinue && UPLOAD_STATUS_ERROR.equals(uploadType)) {
querySignMeasure();
} else if (isContinue) } else if (isContinue)
queryPerformanceUploadCount(isContinue, UPLOAD_STATUS_HAVE_NOT); queryPerformanceUploadCount(isContinue, UPLOAD_STATUS_HAVE_NOT);
} }
...@@ -1864,6 +1874,8 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1864,6 +1874,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就看状态是否继续 //如果是未上传就继续查错误数据,如果不是就看状态是否继续
if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) { if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) {
queryPerformanceUploadCount(isContinue, UPLOAD_STATUS_ERROR); queryPerformanceUploadCount(isContinue, UPLOAD_STATUS_ERROR);
} else if (!isContinue && UPLOAD_STATUS_ERROR.equals(uploadType)) {
queryWeightMan();
} else if (isContinue) } else if (isContinue)
queryWeightManUploadCount(isContinue, UPLOAD_STATUS_HAVE_NOT); queryWeightManUploadCount(isContinue, UPLOAD_STATUS_HAVE_NOT);
...@@ -1902,6 +1914,8 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1902,6 +1914,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就看状态是否继续 //如果是未上传就继续查错误数据,如果不是就看状态是否继续
if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) { if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) {
queryWeightManUploadCount(isContinue, UPLOAD_STATUS_ERROR); queryWeightManUploadCount(isContinue, UPLOAD_STATUS_ERROR);
} else if (!isContinue && UPLOAD_STATUS_ERROR.equals(uploadType)) {
queryMedicalRecord();
} else if (isContinue) } else if (isContinue)
queryMedicalRecordUploadCount(isContinue, UPLOAD_STATUS_HAVE_NOT); queryMedicalRecordUploadCount(isContinue, UPLOAD_STATUS_HAVE_NOT);
...@@ -1940,6 +1954,8 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1940,6 +1954,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就看状态是否继续 //如果是未上传就继续查错误数据,如果不是就看状态是否继续
if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) { if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) {
queryMedicalRecordUploadCount(isContinue, UPLOAD_STATUS_ERROR); queryMedicalRecordUploadCount(isContinue, UPLOAD_STATUS_ERROR);
} else if (!isContinue && UPLOAD_STATUS_ERROR.equals(uploadType)) {
queryImmuneBatch();
} else if (isContinue) } else if (isContinue)
queryImmuneBatchUploadCount(isContinue, UPLOAD_STATUS_HAVE_NOT); queryImmuneBatchUploadCount(isContinue, UPLOAD_STATUS_HAVE_NOT);
...@@ -1978,6 +1994,8 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -1978,6 +1994,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就看状态是否继续 //如果是未上传就继续查错误数据,如果不是就看状态是否继续
if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) { if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) {
queryImmuneBatchUploadCount(isContinue, UPLOAD_STATUS_ERROR); queryImmuneBatchUploadCount(isContinue, UPLOAD_STATUS_ERROR);
} else if (!isContinue && UPLOAD_STATUS_ERROR.equals(uploadType)) {
queryImmuneBatchDetail();
} else if (isContinue) } else if (isContinue)
queryImmuneBatchDetailUploadCount(isContinue, UPLOAD_STATUS_HAVE_NOT); queryImmuneBatchDetailUploadCount(isContinue, UPLOAD_STATUS_HAVE_NOT);
...@@ -2016,6 +2034,8 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -2016,6 +2034,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就看状态是否继续 //如果是未上传就继续查错误数据,如果不是就看状态是否继续
if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) { if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) {
queryImmuneBatchDetailUploadCount(isContinue, UPLOAD_STATUS_ERROR); queryImmuneBatchDetailUploadCount(isContinue, UPLOAD_STATUS_ERROR);
} else if (!isContinue && UPLOAD_STATUS_ERROR.equals(uploadType)) {
queryBreedingRecord();
} else if (isContinue) } else if (isContinue)
queryBreedingRecordUploadCount(isContinue, UPLOAD_STATUS_HAVE_NOT); queryBreedingRecordUploadCount(isContinue, UPLOAD_STATUS_HAVE_NOT);
...@@ -2054,6 +2074,8 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -2054,6 +2074,8 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就看状态是否继续 //如果是未上传就继续查错误数据,如果不是就看状态是否继续
if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) { if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) {
queryBreedingRecordUploadCount(isContinue, UPLOAD_STATUS_ERROR); queryBreedingRecordUploadCount(isContinue, UPLOAD_STATUS_ERROR);
} else if (!isContinue && UPLOAD_STATUS_ERROR.equals(uploadType)) {
queryBreedingRecordDetail();
} else if (isContinue) } else if (isContinue)
queryBreedingRecordDetailUploadCount(isContinue, UPLOAD_STATUS_HAVE_NOT); queryBreedingRecordDetailUploadCount(isContinue, UPLOAD_STATUS_HAVE_NOT);
...@@ -2092,9 +2114,12 @@ public class SyncVM extends BaseViewModel<Repository> { ...@@ -2092,9 +2114,12 @@ public class SyncVM extends BaseViewModel<Repository> {
//如果是未上传就继续查错误数据,如果不是就停止 //如果是未上传就继续查错误数据,如果不是就停止
if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) { if (UPLOAD_STATUS_HAVE_NOT.equals(uploadType)) {
queryBreedingRecordDetailUploadCount(isContinue, UPLOAD_STATUS_ERROR); queryBreedingRecordDetailUploadCount(isContinue, UPLOAD_STATUS_ERROR);
}else{
dismissDialog();
} }
} }
@Override @Override
......
...@@ -220,9 +220,18 @@ public class SplashVM extends MainBarVM<Repository> { ...@@ -220,9 +220,18 @@ public class SplashVM extends MainBarVM<Repository> {
QueryBuilder<GenTableColumn> builderDetaile6 = QueryBuilder<GenTableColumn> builderDetaile6 =
DbUtil.getInstance().getQueryBuilder(GenTableColumn.class) DbUtil.getInstance().getQueryBuilder(GenTableColumn.class)
.where(GenTableColumnDao.Properties.TableId.eq(gt.getTableId()) .where(GenTableColumnDao.Properties.TableId.eq(gt.getTableId())
, GenTableColumnDao.Properties.IsQuery.eq("1")) , GenTableColumnDao.Properties.IsQuery.eq("1")
)
.orderAsc(GenTableColumnDao.Properties.Sort); .orderAsc(GenTableColumnDao.Properties.Sort);
Configs.cattlematingDetaill = DbUtil.getInstance().queryAll(GenTableColumn.class, builderDetaile6); Configs.cattlematingDetaill = DbUtil.getInstance().queryAll(GenTableColumn.class, builderDetaile6);
//取详情列表表头
QueryBuilder<GenTableColumn> builderDetaile7 =
DbUtil.getInstance().getQueryBuilder(GenTableColumn.class)
.where(GenTableColumnDao.Properties.TableId.eq(gt.getTableId())
, GenTableColumnDao.Properties.IsList.eq("1")
)
.orderAsc(GenTableColumnDao.Properties.Sort);
Configs.cattlematingDetaillList = DbUtil.getInstance().queryAll(GenTableColumn.class, builderDetaile7);
break; break;
} }
......
...@@ -443,6 +443,18 @@ ...@@ -443,6 +443,18 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_click_sync_upload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/one_click_sync"
android:layout_marginBottom="@dimen/dp_15"
android:layout_marginLeft="@dimen/dp_80"
binding:layout_constraintLeft_toLeftOf="parent"
binding:layout_constraintBottom_toBottomOf="parent"
binding:onClickCommand="@{viewModel.OnOneClickUploadClickCommand}"
/>
<androidx.appcompat.widget.AppCompatButton <androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_error_data_upload" android:id="@+id/btn_error_data_upload"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
...@@ -60,21 +60,89 @@ ...@@ -60,21 +60,89 @@
binding:layout_constraintRight_toRightOf="parent" binding:layout_constraintRight_toRightOf="parent"
binding:layout_constraintTop_toTopOf="parent" /> binding:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView <androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/rv_collect" android:id="@+id/rv_collect"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="-5dp" android:orientation="horizontal"
android:layout_marginTop="5dp"
android:nestedScrollingEnabled="false"
binding:adapter="@{adapter}"
binding:itemBinding="@{viewModel.itemBinding}"
binding:items="@{viewModel.observableList}"
binding:layoutManager="@{LayoutManagers.grid(2)}"
binding:layout_constraintBottom_toTopOf="@+id/ll_detail_title" binding:layout_constraintBottom_toTopOf="@+id/ll_detail_title"
binding:layout_constraintLeft_toLeftOf="parent" binding:layout_constraintLeft_toLeftOf="parent"
binding:layout_constraintRight_toRightOf="parent" binding:layout_constraintRight_toRightOf="parent"
binding:layout_constraintTop_toBottomOf="@+id/tv_rfid_text" /> binding:layout_constraintTop_toBottomOf="@+id/tv_rfid_text" >
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/cl_title_1"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_50"
android:gravity="center_vertical"
android:orientation="vertical"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginBottom="@dimen/dp_5"
android:padding="@dimen/dp_5"
android:background="@drawable/bg_radius_white_5"
binding:layout_constraintLeft_toLeftOf="parent"
binding:layout_constraintRight_toRightOf="parent"
binding:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:gravity="center|start"
android:maxLines="1"
android:text="饲养品种"
android:textSize="@dimen/sp_10"
android:textColor="@color/colorPrimary" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:gravity="center|end"
android:maxLines="1"
android:text="@{viewModel.raiseVarieties}"
android:textSize="@dimen/sp_10"/>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/cl_title_2"
android:layout_width="@dimen/dp_172"
android:layout_height="@dimen/dp_50"
android:gravity="center_vertical"
android:orientation="vertical"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginBottom="@dimen/dp_5"
android:layout_marginLeft="@dimen/dp_5"
android:padding="@dimen/dp_5"
android:background="@drawable/bg_radius_white_5"
binding:layout_constraintLeft_toLeftOf="parent"
binding:layout_constraintRight_toRightOf="parent"
binding:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:gravity="center|start"
android:maxLines="1"
android:text="所属种蓄站"
android:textSize="@dimen/sp_10"
android:textColor="@color/colorPrimary"/>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:gravity="center|end"
android:maxLines="1"
android:text="@{viewModel.deptName}"
android:textSize="@dimen/sp_10"/>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<com.lingber.mycontrol.datagridview.DataGridView <com.lingber.mycontrol.datagridview.DataGridView
android:id="@+id/ll_detail_title" android:id="@+id/ll_detail_title"
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<string name="breeding_record_detail">配种详情</string> <string name="breeding_record_detail">配种详情</string>
<string name="one_click_sync">一键同步</string>
<string name="error_data_upload">错误上报</string> <string name="error_data_upload">错误上报</string>
......
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