Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
liyawei
2022-07-04 14:37:41 +08:00
4 changed files with 24 additions and 0 deletions
@@ -53,10 +53,12 @@ public class LawsOpinionGatherEOController extends JeroController<LawsOpinionGat
public Result<?> queryPageList(LawsOpinionGatherEO lawsOpinionGatherEO, public Result<?> queryPageList(LawsOpinionGatherEO lawsOpinionGatherEO,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
@RequestParam(name="cut", defaultValue="cn") String cut,
HttpServletRequest req) { HttpServletRequest req) {
QueryWrapper<LawsOpinionGatherEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsOpinionGatherEO, req.getParameterMap()); QueryWrapper<LawsOpinionGatherEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsOpinionGatherEO, req.getParameterMap());
Page<LawsOpinionGatherEO> page = new Page<LawsOpinionGatherEO>(pageNo, pageSize); Page<LawsOpinionGatherEO> page = new Page<LawsOpinionGatherEO>(pageNo, pageSize);
IPage<LawsOpinionGatherEO> pageList = lawsOpinionGatherEOService.page(page, queryWrapper); IPage<LawsOpinionGatherEO> pageList = lawsOpinionGatherEOService.page(page, queryWrapper);
this.lawsOpinionGatherEOService.disposeData(pageList.getRecords(),cut);
return Result.OK(pageList); return Result.OK(pageList);
} }
@@ -4,6 +4,7 @@ import java.io.Serializable;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
@@ -77,6 +78,8 @@ public class LawsOpinionGatherEO implements Serializable {
@Excel(name = "收集结果", width = 15) @Excel(name = "收集结果", width = 15)
@ApiModelProperty(value = "收集结果") @ApiModelProperty(value = "收集结果")
private String gatherResult; private String gatherResult;
@TableField(exist = false)
private String gatherResultShow;
/**发起日期*/ /**发起日期*/
@Excel(name = "发起日期", width = 15, format = "yyyy-MM-dd") @Excel(name = "发起日期", width = 15, format = "yyyy-MM-dd")
@@ -67,4 +67,10 @@ public interface ILawsOpinionGatherEOService extends IService<LawsOpinionGatherE
* @return * @return
*/ */
Result<?> processCall(JSONObject jsonObject); Result<?> processCall(JSONObject jsonObject);
/**
* 处理数据
* @param lawsOpinionGatherEOList
*/
void disposeData(List<LawsOpinionGatherEO> lawsOpinionGatherEOList,String cut);
} }
@@ -4,10 +4,12 @@ import com.alibaba.fastjson.JSONObject;
import com.jero.common.api.vo.Result; import com.jero.common.api.vo.Result;
import com.jero.common.exception.JeroBootException; import com.jero.common.exception.JeroBootException;
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO; import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
import com.jero.modules.lawsOpinionGather.mapper.LawsOpinionGatherEOMapper; import com.jero.modules.lawsOpinionGather.mapper.LawsOpinionGatherEOMapper;
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService; import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
import com.jero.modules.project.enums.OperatorTypeEnum; import com.jero.modules.project.enums.OperatorTypeEnum;
import com.jero.modules.project.enums.RequestSourceEnum; import com.jero.modules.project.enums.RequestSourceEnum;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
@@ -124,4 +126,15 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
} }
return new Result<>().success("调用成功!"); return new Result<>().success("调用成功!");
} }
@Override
public void disposeData(List<LawsOpinionGatherEO> lawsOpinionGatherEOList,String cut) {
if(CollectionUtils.isNotEmpty(lawsOpinionGatherEOList)){
lawsOpinionGatherEOList.forEach(lawsOpinionGather -> {
if(StringUtils.isNotEmpty(lawsOpinionGather.getGatherResult())){
lawsOpinionGather.setGatherResultShow(GatherResultEnum.getTextByValue(lawsOpinionGather.getGatherResult(),cut));
}
});
}
}
} }