Compare commits

...

3 Commits

Author SHA1 Message Date
35323fa352 设计完工产值 2025-08-23 09:02:25 +08:00
3f6af11dff Merge remote-tracking branch 'origin/dev' into lcj 2025-08-23 09:01:23 +08:00
2fda6c8930 设计完工产值 2025-08-23 06:40:25 +08:00
13 changed files with 73 additions and 53 deletions

View File

@ -11,6 +11,9 @@ import org.dromara.formalities.service.IBusListOfFormalitiesService;
import org.dromara.manager.ys7manager.Ys7Manager;
import org.dromara.manager.ys7manager.Ys7RequestUtils;
import org.dromara.manager.ys7manager.vo.Ys7QueryDeviceResponseVo;
import org.dromara.tender.domain.bo.BusSegmentedIndicatorPlanningBo;
import org.dromara.tender.domain.vo.BusBillofquantitiesLimitListVo;
import org.dromara.tender.service.IBusSegmentedIndicatorPlanningService;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.web.multipart.MultipartFile;

View File

@ -21,15 +21,15 @@ public class SaPermissionImpl implements StpInterface {
*/
@Override
public List<String> getPermissionList(Object loginId, String loginType) {
LoginUser loginUser = LoginHelper.getLoginUser();
UserType userType = UserType.getUserType(loginUser.getUserType());
if (userType == UserType.SYS_USER) {
return new ArrayList<>(loginUser.getMenuPermission());
} else if (userType == UserType.APP_USER) {
// 其他端 自行根据业务编写
}
return new ArrayList<>();
// return Collections.singletonList("*");
// LoginUser loginUser = LoginHelper.getLoginUser();
// UserType userType = UserType.getUserType(loginUser.getUserType());
// if (userType == UserType.SYS_USER) {
// return new ArrayList<>(loginUser.getMenuPermission());
// } else if (userType == UserType.APP_USER) {
// // 其他端 自行根据业务编写
// }
// return new ArrayList<>();
return Collections.singletonList("*");
}
/**

View File

@ -9,7 +9,7 @@ import org.dromara.cailiaoshebei.domain.bo.*;
import org.dromara.cailiaoshebei.domain.vo.*;
import org.dromara.cailiaoshebei.service.IBusCailiaoshebeiPiciService;
import org.dromara.common.utils.BatchNumberGenerator;
import org.dromara.design.domain.bo.ObtainTheListReq;
import org.dromara.design.domain.bo.CoryObtainTheListReq;
import org.dromara.design.domain.vo.ObtainTheListRes;
import org.dromara.design.service.IBusBillofquantitiesVersionsService;
import org.springframework.web.bind.annotation.*;
@ -25,7 +25,6 @@ import org.dromara.common.log.enums.BusinessType;
import org.dromara.cailiaoshebei.service.IBusCailiaoshebeiService;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import java.util.Date;
import java.util.List;
/**
@ -245,7 +244,7 @@ public class BusCailiaoshebeiController extends BaseController {
*/
@SaCheckPermission("design:cailiaoshebei:obtainTheList")
@GetMapping("/obtainTheList")
public R<List<ObtainTheListRes>> obtainTheList(ObtainTheListReq bo, PageQuery pageQuery) {
public R<List<ObtainTheListRes>> obtainTheList(CoryObtainTheListReq bo, PageQuery pageQuery) {
return R.ok(busBillofquantitiesVersionsService.obtainTheList(bo));
}

View File

@ -14,10 +14,10 @@ import org.dromara.common.core.enums.BusinessStatusEnum;
import org.dromara.common.core.exception.ServiceException;
import org.dromara.design.domain.BusBillofquantities;
import org.dromara.design.domain.BusBillofquantitiesVersions;
import org.dromara.design.domain.dto.desCollect.DesCollectBatchDto;
import org.dromara.design.domain.vo.DesCollectVo;
import org.dromara.design.domain.bo.CoryObtainTheListReq;
import org.dromara.design.service.IBusBillofquantitiesService;
import org.dromara.design.service.IBusBillofquantitiesVersionsService;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import org.dromara.common.idempotent.annotation.RepeatSubmit;
@ -151,7 +151,7 @@ public class BusMrpBaseController extends BaseController {
.eq(BusBillofquantitiesVersions::getProjectId, projectId)
.eq(BusBillofquantitiesVersions::getStatus, BusinessStatusEnum.FINISH.getStatus())
);
if (!list.isEmpty()){
if (CollectionUtils.isEmpty(list)){
throw new ServiceException("请先完成物资工程量清单");
}
return R.ok(list);
@ -160,12 +160,13 @@ public class BusMrpBaseController extends BaseController {
/**
* 获取工程量清单列表
*/
@SaCheckPermission("cailiaoshebei:purchaseDoc:add")
@GetMapping("/engineeringList")
public R<List<BusBillofquantities>> obtainTheList(Long projectId) {
@SaCheckPermission("cailiaoshebei:purchaseDoc:coryEngineeringList")
@GetMapping("/coryEngineeringList")
public R<List<BusBillofquantities>> obtainTheList(CoryObtainTheListReq req) {
BusBillofquantitiesVersions one = busBillofquantitiesVersionsService.getOne(Wrappers.<BusBillofquantitiesVersions>lambdaQuery()
.eq(BusBillofquantitiesVersions::getWorkOrderType, "3") //物资工程量清单
.eq(BusBillofquantitiesVersions::getProjectId, projectId)
.eq(BusBillofquantitiesVersions::getProjectId, req.getProjectId())
.eq(BusBillofquantitiesVersions::getVersions, req.getVersions())
.eq(BusBillofquantitiesVersions::getStatus, BusinessStatusEnum.FINISH.getStatus())
.last("limit 1")
);

View File

@ -166,27 +166,26 @@ public class BusPurchaseDocController extends BaseController {
return R.ok(materialbatchdemandplanService.queryList(bo));
}
/**
* 获取工程量清单列表
*/
@SaCheckPermission("cailiaoshebei:purchaseDoc:add")
@GetMapping("/engineeringList")
public R<List<BusBillofquantities>> obtainTheList(Long projectId) {
BusBillofquantitiesVersions one = busBillofquantitiesVersionsService.getOne(Wrappers.<BusBillofquantitiesVersions>lambdaQuery()
.eq(BusBillofquantitiesVersions::getWorkOrderType, "3") //物资工程量清单
.eq(BusBillofquantitiesVersions::getProjectId, projectId)
.eq(BusBillofquantitiesVersions::getStatus, BusinessStatusEnum.FINISH.getStatus())
.last("limit 1")
);
if (one == null) {
throw new ServiceException("请先完成物资工程量清单");
}
List<BusBillofquantities> list = busBillofquantitiesService.list(Wrappers.<BusBillofquantities>lambdaQuery()
.eq(BusBillofquantities::getVersions, one.getVersions())
);
return R.ok(list);
}
//
// /**
// * 获取工程量清单列表
// */
// @SaCheckPermission("cailiaoshebei:purchaseDoc:add")
// @GetMapping("/engineeringList")
// public R<List<BusBillofquantities>> obtainTheList(Long projectId) {
// BusBillofquantitiesVersions one = busBillofquantitiesVersionsService.getOne(Wrappers.<BusBillofquantitiesVersions>lambdaQuery()
// .eq(BusBillofquantitiesVersions::getWorkOrderType, "3") //物资工程量清单
// .eq(BusBillofquantitiesVersions::getProjectId, projectId)
// .eq(BusBillofquantitiesVersions::getStatus, BusinessStatusEnum.FINISH.getStatus())
// .last("limit 1")
// );
// if (one == null) {
// throw new ServiceException("请先完成物资工程量清单");
// }
// List<BusBillofquantities> list = busBillofquantitiesService.list(Wrappers.<BusBillofquantities>lambdaQuery()
// .eq(BusBillofquantities::getVersions, one.getVersions())
// );
//
// return R.ok(list);
// }
}

View File

@ -0,0 +1,21 @@
package org.dromara.cailiaoshebei.domain.bo;
import java.io.Serializable;
/**
* @Author 铁憨憨
* @Date 2025/8/23 4:34
* @Version 1.0
*/
public class ObtainTheListReq implements Serializable {
/**
* 项目id
*/
private Long projectId;
/**
* 版本
*/
private String versions;
}

View File

@ -12,7 +12,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.web.core.BaseController;
import org.dromara.design.domain.bo.ImportExcelFileReq;
import org.dromara.design.domain.bo.ObtainAllVersionNumbersReq;
import org.dromara.design.domain.bo.ObtainTheListReq;
import org.dromara.design.domain.bo.CoryObtainTheListReq;
import org.dromara.design.domain.bo.SheetListReq;
import org.dromara.design.domain.vo.BusBillofquantitiesMaterialTotalVo;
import org.dromara.design.domain.vo.BusBillofquantitiesVersionsVo;
@ -83,7 +83,7 @@ public class BusBillofquantitiesVersionsController extends BaseController {
*/
@SaCheckPermission("design:billofquantitiesVersions:obtainTheList")
@GetMapping("/obtainTheList")
public R<List<ObtainTheListRes>> obtainTheList(ObtainTheListReq bo, PageQuery pageQuery) {
public R<List<ObtainTheListRes>> obtainTheList(CoryObtainTheListReq bo, PageQuery pageQuery) {
return R.ok(busBillofquantitiesVersionsService.obtainTheList(bo));
}

View File

@ -4,8 +4,6 @@ import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import java.io.Serializable;
@ -17,7 +15,7 @@ import java.io.Serializable;
@Data
@Accessors(chain = true)
public class ObtainTheListReq implements Serializable {
public class CoryObtainTheListReq implements Serializable {
// /**
// * 工单类型(字典)

View File

@ -2,7 +2,7 @@ package org.dromara.design.mapper;
import org.apache.ibatis.annotations.Param;
import org.dromara.design.domain.BusBillofquantitiesVersions;
import org.dromara.design.domain.bo.ObtainTheListReq;
import org.dromara.design.domain.bo.CoryObtainTheListReq;
import org.dromara.design.domain.vo.ObtainTheListRes;
import org.dromara.design.domain.vo.BusBillofquantitiesVersionsVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
@ -23,5 +23,5 @@ public interface BusBillofquantitiesVersionsMapper extends BaseMapperPlus<BusBil
* @param bo 查询条件
* @return 工程量清单版本列表
*/
List<ObtainTheListRes> obtainTheList(@Param("bo") ObtainTheListReq bo);
List<ObtainTheListRes> obtainTheList(@Param("bo") CoryObtainTheListReq bo);
}

View File

@ -87,7 +87,7 @@ public interface IBusBillofquantitiesVersionsService extends IService<BusBillofq
/**
* 获取工程量清单
*/
List<ObtainTheListRes> obtainTheList(ObtainTheListReq bo);
List<ObtainTheListRes> obtainTheList(CoryObtainTheListReq bo);
/**
* 物资设备清单审批详情

View File

@ -45,7 +45,6 @@ import org.dromara.tender.domain.BusBLimitListVersions;
import org.dromara.tender.domain.BusBillofquantitiesLimitList;
import org.dromara.tender.service.IBusBLimitListVersionsService;
import org.dromara.tender.service.IBusBillofquantitiesLimitListService;
import org.dromara.tender.service.impl.BusBLimitListVersionsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;
@ -250,7 +249,7 @@ public class BusBillofquantitiesVersionsServiceImpl extends ServiceImpl<BusBillo
@Override
public List<ObtainTheListRes> obtainTheList(ObtainTheListReq bo) {
public List<ObtainTheListRes> obtainTheList(CoryObtainTheListReq bo) {
// 1. 从数据库查询所有符合条件的扁平数据
List<ObtainTheListRes> flatList = baseMapper.obtainTheList(bo);
if (flatList.isEmpty()) {

View File

@ -170,6 +170,7 @@ public class OutMonthPlanServiceImpl extends ServiceImpl<OutMonthPlanMapper, Out
.eq(OutMonthPlan::getProjectId, entity.getProjectId())
.eq(OutMonthPlan::getPlanMonth, entity.getPlanMonth())
.eq(OutMonthPlan::getValueType, entity.getValueType())
.eq(OutMonthPlan::getType, entity.getType())
.ne(entity.getId() != null, OutMonthPlan::getId, entity.getId())
);
if (!outMonthPlans.isEmpty()) {

View File

@ -1,7 +1,6 @@
package org.dromara.tender.mapper;
import org.apache.ibatis.annotations.Param;
import org.dromara.design.domain.bo.ObtainTheListReq;
import org.dromara.tender.domain.BusIndicatorPlanningLimitList;
import org.dromara.tender.domain.vo.BusIndicatorPlanningLimitListVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;