设计优化
This commit is contained in:
@ -16,6 +16,7 @@ import org.dromara.cailiaoshebei.service.IBusPlanDocAssociationService;
|
|||||||
import org.dromara.cailiaoshebei.service.IBusPurchaseDocService;
|
import org.dromara.cailiaoshebei.service.IBusPurchaseDocService;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
import org.dromara.common.core.enums.BusinessStatusEnum;
|
import org.dromara.common.core.enums.BusinessStatusEnum;
|
||||||
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.validate.AddGroup;
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
import org.dromara.common.core.validate.EditGroup;
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
import org.dromara.common.excel.utils.ExcelUtil;
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
@ -172,14 +173,15 @@ public class BusPurchaseDocController extends BaseController {
|
|||||||
@GetMapping("/engineeringList")
|
@GetMapping("/engineeringList")
|
||||||
public R<List<BusBillofquantities>> obtainTheList(Long projectId) {
|
public R<List<BusBillofquantities>> obtainTheList(Long projectId) {
|
||||||
|
|
||||||
|
|
||||||
BusBillofquantitiesVersions one = busBillofquantitiesVersionsService.getOne(Wrappers.<BusBillofquantitiesVersions>lambdaQuery()
|
BusBillofquantitiesVersions one = busBillofquantitiesVersionsService.getOne(Wrappers.<BusBillofquantitiesVersions>lambdaQuery()
|
||||||
.eq(BusBillofquantitiesVersions::getWorkOrderType, "4")
|
.eq(BusBillofquantitiesVersions::getWorkOrderType, "3") //物资工程量清单
|
||||||
.eq(BusBillofquantitiesVersions::getProjectId, projectId)
|
.eq(BusBillofquantitiesVersions::getProjectId, projectId)
|
||||||
.eq(BusBillofquantitiesVersions::getStatus, BusinessStatusEnum.FINISH.getStatus())
|
.eq(BusBillofquantitiesVersions::getStatus, BusinessStatusEnum.FINISH.getStatus())
|
||||||
.last("limit 1")
|
.last("limit 1")
|
||||||
);
|
);
|
||||||
|
if (one == null){
|
||||||
|
throw new ServiceException("请先完成物资工程量清单");
|
||||||
|
}
|
||||||
List<BusBillofquantities> list = busBillofquantitiesService.list(Wrappers.<BusBillofquantities>lambdaQuery()
|
List<BusBillofquantities> list = busBillofquantitiesService.list(Wrappers.<BusBillofquantities>lambdaQuery()
|
||||||
.eq(BusBillofquantities::getVersions, one.getVersions())
|
.eq(BusBillofquantities::getVersions, one.getVersions())
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user