|
@@ -15,6 +15,7 @@ import com.xjrsoft.common.page.ConventPage;
|
|
|
import com.xjrsoft.common.utils.SortCodeUtil;
|
|
import com.xjrsoft.common.utils.SortCodeUtil;
|
|
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
import com.xjrsoft.module.base.entity.BaseClass;
|
|
import com.xjrsoft.module.base.entity.BaseClass;
|
|
|
|
|
+import com.xjrsoft.module.base.entity.BaseSemester;
|
|
|
import com.xjrsoft.module.organization.entity.Role;
|
|
import com.xjrsoft.module.organization.entity.Role;
|
|
|
import com.xjrsoft.module.organization.entity.UserRoleRelation;
|
|
import com.xjrsoft.module.organization.entity.UserRoleRelation;
|
|
|
import com.xjrsoft.module.organization.mapper.RoleMapper;
|
|
import com.xjrsoft.module.organization.mapper.RoleMapper;
|
|
@@ -52,6 +53,7 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
@Service
|
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
|
public class WfTextbookClaimServiceImpl extends MPJBaseServiceImpl<WfTextbookClaimMapper, WfTextbookClaim> implements IWfTextbookClaimService {
|
|
public class WfTextbookClaimServiceImpl extends MPJBaseServiceImpl<WfTextbookClaimMapper, WfTextbookClaim> implements IWfTextbookClaimService {
|
|
|
|
|
+
|
|
|
private final WfTextbookClaimMapper wfTextbookClaimWfTextbookClaimMapper;
|
|
private final WfTextbookClaimMapper wfTextbookClaimWfTextbookClaimMapper;
|
|
|
|
|
|
|
|
private final WfTextbookClaimItemMapper wfTextbookClaimWfTextbookClaimItemMapper;
|
|
private final WfTextbookClaimItemMapper wfTextbookClaimWfTextbookClaimItemMapper;
|
|
@@ -67,7 +69,7 @@ public class WfTextbookClaimServiceImpl extends MPJBaseServiceImpl<WfTextbookCla
|
|
|
private final TextbookWarehouseRecordMapper textbookWarehouseRecordMapper;
|
|
private final TextbookWarehouseRecordMapper textbookWarehouseRecordMapper;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public IPage<DistributePageVo> distributePageVo(DistributePageDto dto) {
|
|
|
|
|
|
|
+ public IPage<DistributePageVo> distributePage(DistributePageDto dto) {
|
|
|
MPJLambdaWrapper<WfTextbookClaim> wfTextbookClaimMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
|
MPJLambdaWrapper<WfTextbookClaim> wfTextbookClaimMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
|
|
wfTextbookClaimMPJLambdaWrapper
|
|
wfTextbookClaimMPJLambdaWrapper
|
|
|
.disableSubLogicDel()
|
|
.disableSubLogicDel()
|
|
@@ -86,6 +88,14 @@ public class WfTextbookClaimServiceImpl extends MPJBaseServiceImpl<WfTextbookCla
|
|
|
wrapper -> wrapper
|
|
wrapper -> wrapper
|
|
|
.selectAs(BaseClass::getName, DistributePageVo::getClassIdCn)
|
|
.selectAs(BaseClass::getName, DistributePageVo::getClassIdCn)
|
|
|
)
|
|
)
|
|
|
|
|
+ .leftJoin(BaseSemester.class, BaseSemester::getId, WfTextbookClaim::getBaseSemesterId,
|
|
|
|
|
+ wrapper -> wrapper
|
|
|
|
|
+ .selectAs(BaseSemester::getName, DistributePageVo::getBaseSemesterIdCn)
|
|
|
|
|
+ )
|
|
|
|
|
+ .leftJoin(XjrUser.class, XjrUser::getId, WfTextbookClaim::getStudentUserId,
|
|
|
|
|
+ wrapper -> wrapper
|
|
|
|
|
+ .selectAs(XjrUser::getName, DistributePageVo::getStudentUserIdCn)
|
|
|
|
|
+ )
|
|
|
.eq(WorkflowFormRelation::getCurrentState, HistoricProcessInstance.STATE_COMPLETED)
|
|
.eq(WorkflowFormRelation::getCurrentState, HistoricProcessInstance.STATE_COMPLETED)
|
|
|
.eq(WfTextbookClaim::getBaseSemesterId, dto.getBaseSemesterId())
|
|
.eq(WfTextbookClaim::getBaseSemesterId, dto.getBaseSemesterId())
|
|
|
.eq(StringUtils.isNotEmpty(dto.getClaimType()), WfTextbookClaim::getClaimType, dto.getClaimType())
|
|
.eq(StringUtils.isNotEmpty(dto.getClaimType()), WfTextbookClaim::getClaimType, dto.getClaimType())
|
|
@@ -268,6 +278,29 @@ public class WfTextbookClaimServiceImpl extends MPJBaseServiceImpl<WfTextbookCla
|
|
|
return wfTextbookClaimVo;
|
|
return wfTextbookClaimVo;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public List<DistributeRecordVo> distributeRecord(Long id) {
|
|
|
|
|
+ MPJLambdaWrapper<TextbookIssueRecord> textbookIssueRecordMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
|
|
|
|
+ textbookIssueRecordMPJLambdaWrapper
|
|
|
|
|
+ .disableSubLogicDel()
|
|
|
|
|
+ .selectAs(TextbookIssueRecord::getCreateDate, DistributeRecordVo::getIssueDate)
|
|
|
|
|
+ .selectAs(TextbookIssueRecord::getIssueNumber, DistributeRecordVo::getIssueNumber)
|
|
|
|
|
+ .selectAs(TextbookIssueRecord::getOrderNumber, DistributeRecordVo::getOrderNumber)
|
|
|
|
|
+ .selectAs(TextbookIssueRecord::getRemark, DistributeRecordVo::getRemark)
|
|
|
|
|
+ .leftJoin(Textbook.class, Textbook::getId, TextbookIssueRecord::getTextbookId,
|
|
|
|
|
+ wrapper -> wrapper
|
|
|
|
|
+ .selectAs(Textbook::getBookName, DistributeRecordVo::getTextbookIdCn)
|
|
|
|
|
+ )
|
|
|
|
|
+ .leftJoin(XjrUser.class, XjrUser::getId, TextbookIssueRecord::getIssueUserId,
|
|
|
|
|
+ wrapper -> wrapper
|
|
|
|
|
+ .selectAs(XjrUser::getName, DistributeRecordVo::getIssueUser)
|
|
|
|
|
+ )
|
|
|
|
|
+ .eq(TextbookIssueRecord::getDataId, id)
|
|
|
|
|
+ ;
|
|
|
|
|
+
|
|
|
|
|
+ return textbookIssueRecordMapper.selectJoinList(DistributeRecordVo.class, textbookIssueRecordMPJLambdaWrapper);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Boolean confirmDistribute(ConfirmDistributeDto dto) {
|
|
public Boolean confirmDistribute(ConfirmDistributeDto dto) {
|