| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @ApiModelProperty(value = "几天及时率") |
| | | private Integer rateDay; |
| | | |
| | | /** |
| | | * 是否再次随访 |
| | | */ |
| | | @ApiModelProperty(value = "几天及时率") |
| | | private Integer isVisitAgain; |
| | | |
| | | @ApiModelProperty(value = "异常预警:0绿色;1红色;2黄色") |
| | |
| | | private String scriptids; |
| | | |
| | | /** |
| | | * 把 scriptids(逗号分隔的问题ID字符串)严格解析为 Long 集合,仅供 SQL 的 foreach 预编译使用。 |
| | | * <p> |
| | | * 只保留纯数字项,其余内容一律丢弃,返回 null 表示“不过滤”。 |
| | | * 这样 scriptids 这个请求字段永远不会被拼接进 SQL,避免注入(原实现是 in (${scriptids}))。 |
| | | */ |
| | | @JsonIgnore |
| | | public List<Long> getScriptidList() { |
| | | if (scriptids == null || scriptids.trim().isEmpty()) { |
| | | return null; |
| | | } |
| | | List<Long> scriptidList = new ArrayList<>(); |
| | | for (String item : scriptids.split(",")) { |
| | | String scriptid = item.trim(); |
| | | if (scriptid.matches("\\d+")) { |
| | | scriptidList.add(Long.valueOf(scriptid)); |
| | | } |
| | | } |
| | | return scriptidList.isEmpty() ? null : scriptidList; |
| | | } |
| | | |
| | | /** |
| | | * 分组类型 drCode, deptCode, leaveHospitalDistrictCode |
| | | */ |
| | | @ApiModelProperty(value = "分组类型") |