| | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | |
| | | @ApiModelProperty("创建用户") |
| | | private Integer createUser; |
| | | |
| | | @TableField(exist = false) |
| | | private String startTime; |
| | | |
| | | @TableField(exist = false) |
| | | private String endTime; |
| | | |
| | | } |
| | |
| | | |
| | | IPage<ProductCountDto> selectProductCountDtoPageList(IPage<ProductCountDto> page, QueryWrapper<ProductCountDto> ew); |
| | | |
| | | IPage<RegistrantCountDto> selectRegistrantCountDtoPageList(IPage<RegistrantCountDto> page, QueryWrapper<RegistrantCountDto> ew); |
| | | IPage<RegistrantCountDto> selectRegistrantCountDtoPageList(IPage<RegistrantCountDto> page, QueryWrapper<RegistrantCountDto> ew, String startTime, String endTime); |
| | | |
| | | Map<String, BigDecimal> getDataFor1(); |
| | | |
| | |
| | | public Map<String, Object> selectDataReportingList(IPage<DataReportingPageDto> page, DataReportingPageDto dataReportingPageDto) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectDataReportingList"); |
| | | if (map1.get("look") == 1) dataReportingPageDto.setCreateUser(map1.get("userId")); |
| | | if (map1.get("look") == 1) dataReportingPageDto.setUpdateUser(map1.get("userId")); |
| | | Integer power = authMapper.isPower(map1.get("userId"), "dataReportingPower"); |
| | | if(power == 1){ |
| | | dataReportingPageDto.setDepartment(dataReportingMapper.getUserDepartmentById(map1.get("userId"))); |
| | |
| | | String name = dataReportingMapper.getUserNameById(map1.get("userId")); |
| | | registrantCountDto.setName2(name); |
| | | }; |
| | | map.put("body", dataReportingMapper.selectRegistrantCountDtoPageList(page, QueryWrappers.queryWrappers(registrantCountDto))); |
| | | map.put("body", dataReportingMapper.selectRegistrantCountDtoPageList(page, QueryWrappers.queryWrappers(registrantCountDto), registrantCountDto.getStartTime(), registrantCountDto.getEndTime())); |
| | | return map; |
| | | } |
| | | |
| | |
| | | date_format(create_time, '%Y-%m-%d') create_time, |
| | | create_user |
| | | from data_reporting |
| | | where create_time >= #{startTime} and create_time <= #{endTime} |
| | | group by name2,product, date_format(create_time, '%Y-%m-%d') |
| | | ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.CustomLog; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("查询条件生成错误"); |
| | | } |
| | | boolean bool = field.isAnnotationPresent(TableField.class); |
| | | // System.out.println(field.getName() + "|" + (value == null || value.equals("")) + "|" + value); |
| | | if(value == null || value.equals("")){ |
| | | continue; |
| | | } |
| | | if (bool){ |
| | | if(!field.getAnnotation(TableField.class).exist())continue; |
| | | } |
| | | if (!field.getName().equals("orderBy")) { |
| | | if(value.getClass()== LocalDateTime.class){ |
| | | wrapper.like(StrUtil.toUnderlineCase(field.getName()), ((LocalDateTime) value).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |