| | |
| | | */ |
| | | // private static final String FUZZY_EVALUATION_API_URL = "http://47.93.28.249:8081/api/Fuzzy_evaluation"; |
| | | @Value("${fuzzy.api.url}") |
| | | private static final String FUZZY_EVALUATION_API_URL = "http://localhost:5000/api/Fuzzy_evaluation"; |
| | | private static final String FUZZY_EVALUATION_API_URL = "http://192.168.110.188:8081/api/Fuzzy_evaluation"; |
| | | |
| | | /** |
| | | * HTTP客户端模板 |
| | |
| | | @ApiOperation("添加项目") |
| | | @PostMapping("/add") |
| | | public Result add(Session session, @Validated @RequestBody ProjectDto projectDto) { |
| | | projectDto.setStatus(1); |
| | | projectService.add((User)session.getUser(), projectDto); |
| | | return Result.success(); |
| | | } |
| | |
| | | private Integer planId; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty("计划名称") |
| | | @Excel(name = "计划名称") |
| | | private String planName; |
| | |
| | | private Date createTime; |
| | | |
| | | |
| | | @ApiModelProperty("检查标题") |
| | | private String title; |
| | | |
| | | |
| | | } |
| | |
| | | package com.estate.expert.admin.domain.project; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | |
| | | @Data |
| | | @ApiModel("设置项目状态") |
| | | public class SetProjectStatusDto { |
| | | public class SetProjectStatusDto implements java.io.Serializable{ |
| | | @ApiModelProperty("项目ID") |
| | | Integer projectId; |
| | | private Integer projectId; |
| | | @ApiModelProperty("项目状态 1在建 2完成") |
| | | Integer status; |
| | | private Integer status; |
| | | @ApiModelProperty("完成时间") |
| | | LocalDateTime successTime; |
| | | private String successTime; |
| | | } |
| | |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.security.MessageDigest; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.time.LocalTime; |
| | | |
| | | /** |
| | | * MD5加密工具类 |
| | |
| | | String inputHash = encrypt(inputPassword); |
| | | return inputHash.equals(storedHash); |
| | | } |
| | | |
| | | /** |
| | | * 判断当前时间是否在指定时间段内(字符串参数) |
| | | * @param startTimeStr 开始时间,格式:"HH:mm" 或 "HH:mm:ss" |
| | | * @param endTimeStr 结束时间,格式:"HH:mm" 或 "HH:mm:ss" |
| | | * @return 如果在时间段内返回true,否则返回false |
| | | */ |
| | | public static boolean isCurrentTimeInRange(String startTimeStr, String endTimeStr) { |
| | | LocalTime now = LocalTime.now(); |
| | | LocalTime startTime = LocalTime.parse(fixTimeFormat(startTimeStr)); |
| | | LocalTime endTime = LocalTime.parse(fixTimeFormat(endTimeStr)); |
| | | |
| | | return !now.isBefore(startTime) && now.isBefore(endTime); |
| | | } |
| | | private static String fixTimeFormat(String timeStr) { |
| | | // 如果只有小时和分钟,添加秒部分 |
| | | if (timeStr.length() == 5 && timeStr.contains(":")) { |
| | | return timeStr + ":00"; |
| | | } |
| | | return timeStr; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | boolean currentTimeInRange = isCurrentTimeInRange("09:00", "16:50"); |
| | | System.out.println("Current time is in range: " + currentTimeInRange); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | <select id="pageList" resultType="com.estate.expert.admin.domain.business.check.CheckVo"> |
| | | select t1.id,t1.plan_id,t1.project_id,t1.client_id,t1.safety_slip,t1.check_user_img,t1.integrity_notification,t1.time,t1.create_time, |
| | | select t1.id,t1.title,t1.plan_id,t1.project_id,t1.client_id,t1.safety_slip,t1.check_user_img,t1.integrity_notification,t1.time,t1.create_time, |
| | | t2.name as plan_name, |
| | | t3.name as project_name, |
| | | t4.name as client_name |