|
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.date.DateTime; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.springblade.common.utils.StringPrefixUtils; |
|
|
|
import org.springblade.common.utils.StringPrefixUtils; |
|
|
|
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
@ -23,6 +24,7 @@ import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.BigDecimal; |
|
|
|
|
|
|
|
import java.math.RoundingMode; |
|
|
|
import java.util.*; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
@ -64,6 +66,30 @@ public class PlateGoodsApplyServiceImpl extends BaseServiceImpl<PlateGoodsApplyM |
|
|
|
return this.updateBatchById(dataList); |
|
|
|
return this.updateBatchById(dataList); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean secondConfirmBatch(List<Long> ids, Integer approvalStatus, String approvalMemo) { |
|
|
|
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (Long id : ids) { |
|
|
|
|
|
|
|
// 1. 查询完整对象
|
|
|
|
|
|
|
|
PlateGoodsApply plateGoodsApply = this.getById(id); |
|
|
|
|
|
|
|
if (plateGoodsApply == null) { |
|
|
|
|
|
|
|
throw new ServiceException("记录不存在,id:" + id); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 2. 设置审批信息
|
|
|
|
|
|
|
|
plateGoodsApply.setApprovalMan2(user.getUserId()); |
|
|
|
|
|
|
|
plateGoodsApply.setApprovalTime2(DateUtil.now()); |
|
|
|
|
|
|
|
plateGoodsApply.setApprovalStatus2(approvalStatus); |
|
|
|
|
|
|
|
plateGoodsApply.setApprovalMemo2(approvalMemo); |
|
|
|
|
|
|
|
plateGoodsApply.setStatus(approvalStatus); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 3. 更新数据库
|
|
|
|
|
|
|
|
this.updateById(plateGoodsApply); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public boolean save(PlateGoodsApply apply, List<AssayContentDetail> assayContentDetailList, List<Long> recordIdList) { |
|
|
|
public boolean save(PlateGoodsApply apply, List<AssayContentDetail> assayContentDetailList, List<Long> recordIdList) { |
|
|
|
|