修改文件位置

This commit is contained in:
wuchunlei
2025-06-11 15:09:17 +08:00
parent 7aca5e4f7b
commit dbf585f114
14 changed files with 33 additions and 29 deletions

View File

@@ -9,6 +9,7 @@ import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.common.utils.R;
import com.peanut.modules.common.entity.*;
import com.peanut.modules.common.service.*;
import com.peanut.modules.sys.entity.SysDictDataEntity;
import com.peanut.modules.sys.service.SysDictDataService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
@@ -53,8 +54,8 @@ public class MedicaldesController {
*/
@RequestMapping(path = "/typeList")
public R typeList(String label) {
LambdaQueryWrapper<com.peanut.modules.book.entity.SysDictDataEntity> wrapper = new LambdaQueryWrapper();
wrapper.eq(com.peanut.modules.book.entity.SysDictDataEntity::getDictLabel,label);
LambdaQueryWrapper<SysDictDataEntity> wrapper = new LambdaQueryWrapper();
wrapper.eq(SysDictDataEntity::getDictLabel,label);
return R.ok().put("result",sysDictDataService.list(wrapper));
}
@@ -155,10 +156,10 @@ public class MedicaldesController {
}
//国际医师可能来自国外在省市里加入外国
public List<com.peanut.modules.book.entity.SysDictDataEntity> getCounts() {
LambdaQueryWrapper<com.peanut.modules.book.entity.SysDictDataEntity> wrapper = new LambdaQueryWrapper();
wrapper.eq(com.peanut.modules.book.entity.SysDictDataEntity::getDictLabel,"inheritPro");
List<com.peanut.modules.book.entity.SysDictDataEntity> dataList = sysDictDataService.list(wrapper);
public List<SysDictDataEntity> getCounts() {
LambdaQueryWrapper<SysDictDataEntity> wrapper = new LambdaQueryWrapper();
wrapper.eq(SysDictDataEntity::getDictLabel,"inheritPro");
List<SysDictDataEntity> dataList = sysDictDataService.list(wrapper);
return dataList;
}
@@ -232,10 +233,10 @@ public class MedicaldesController {
@RequestMapping(path = "/getCityByPro")
public R getCityByPro(@RequestParam("provId") Integer provId) {
List<City> prov = new ArrayList<>();
List<com.peanut.modules.book.entity.SysDictDataEntity> list = getCounts();
List<SysDictDataEntity> list = getCounts();
boolean flag = false;
if (list != null && list.size() > 0) {
for (com.peanut.modules.book.entity.SysDictDataEntity data:list) {
for (SysDictDataEntity data:list) {
if (provId==Integer.parseInt(data.getDictType())){
prov.addAll(getCityList(data.getDictValue(),Integer.parseInt(data.getDictType())));
flag = true;

View File

@@ -8,6 +8,7 @@ import com.peanut.common.utils.R;
import com.peanut.common.utils.ShiroUtils;
import com.peanut.modules.common.entity.UserContribution;
import com.peanut.modules.master.service.UserContributionService;
import com.peanut.modules.sys.entity.SysDictDataEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
@@ -34,13 +35,13 @@ public class UserContributionController {
Integer userId = ShiroUtils.getUId();
//各分类总分
MPJLambdaWrapper<UserContribution> wrapper = new MPJLambdaWrapper();
wrapper.leftJoin(com.peanut.modules.book.entity.SysDictDataEntity.class,
com.peanut.modules.book.entity.SysDictDataEntity::getDictType,UserContribution::getType);
wrapper.eq(com.peanut.modules.book.entity.SysDictDataEntity::getDictLabel,"userContributionLabel");
wrapper.leftJoin(SysDictDataEntity.class,
SysDictDataEntity::getDictType,UserContribution::getType);
wrapper.eq(SysDictDataEntity::getDictLabel,"userContributionLabel");
wrapper.eq("user_id",userId);
wrapper.select("type");
wrapper.select("sum(score) as score");
wrapper.select(com.peanut.modules.book.entity.SysDictDataEntity::getDictValue);
wrapper.select(SysDictDataEntity::getDictValue);
wrapper.groupBy("type");
List contributions = contributionService.listMaps(wrapper);
//统计总分