|
@@ -11,6 +11,7 @@ import com.huimv.guowei.admin.service.IDuckEggTextureInfoService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
+import java.util.Date;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -36,6 +37,11 @@ public class DuckEggTextureInfoController {
|
|
if (baseDuckInfo.getDuckSex() == 0){
|
|
if (baseDuckInfo.getDuckSex() == 0){
|
|
return new Result(10001,"雄鸭无法新增蛋质信息!",false);
|
|
return new Result(10001,"雄鸭无法新增蛋质信息!",false);
|
|
}
|
|
}
|
|
|
|
+ Date determineTime = duckEggTextureInfo.getDetermineTime();
|
|
|
|
+ Date layEggsTime = duckEggTextureInfo.getLayEggsTime();
|
|
|
|
+ if (layEggsTime.compareTo(determineTime) > 0){
|
|
|
|
+ return new Result(10001,"产蛋日期不能晚于测定日期!",false);
|
|
|
|
+ }
|
|
duckEggTextureInfoService.save(duckEggTextureInfo);
|
|
duckEggTextureInfoService.save(duckEggTextureInfo);
|
|
return Result.SUCCESS();
|
|
return Result.SUCCESS();
|
|
}
|
|
}
|