|
|
|
@ -10,6 +10,8 @@ import org.springblade.core.secure.BladeUser; |
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
|
|
|
|
import org.springblade.desk.common.enums.MesApprovalRecordBizTypeEnum; |
|
|
|
|
|
|
|
import org.springblade.desk.common.service.IMesApprovalRecordService; |
|
|
|
import org.springblade.desk.order.mapper.PlateGoodsApplyMapper; |
|
|
|
import org.springblade.desk.order.mapper.PlateGoodsApplyMapper; |
|
|
|
import org.springblade.desk.order.pojo.entity.AssayContentDetail; |
|
|
|
import org.springblade.desk.order.pojo.entity.AssayContentDetail; |
|
|
|
import org.springblade.desk.order.pojo.entity.PlateGoodsApply; |
|
|
|
import org.springblade.desk.order.pojo.entity.PlateGoodsApply; |
|
|
|
@ -18,6 +20,7 @@ import org.springblade.desk.order.pojo.entity.PlateGoodsRecord; |
|
|
|
import org.springblade.desk.order.pojo.enums.AssayContentEnum; |
|
|
|
import org.springblade.desk.order.pojo.enums.AssayContentEnum; |
|
|
|
import org.springblade.desk.order.pojo.enums.PlateGoodsEnum; |
|
|
|
import org.springblade.desk.order.pojo.enums.PlateGoodsEnum; |
|
|
|
import org.springblade.desk.order.service.*; |
|
|
|
import org.springblade.desk.order.service.*; |
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
|
|
@ -40,6 +43,9 @@ public class PlateGoodsApplyServiceImpl extends BaseServiceImpl<PlateGoodsApplyM |
|
|
|
private final IPlateGoodsRecordService goodsRecordService; |
|
|
|
private final IPlateGoodsRecordService goodsRecordService; |
|
|
|
private final IPlateGoodsApplyDetailService goodsApplyDetailService; |
|
|
|
private final IPlateGoodsApplyDetailService goodsApplyDetailService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
IMesApprovalRecordService mesApprovalRecordService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public IPage<PlateGoodsApply> selectPage(IPage<PlateGoodsApply> page, PlateGoodsApply entity) { |
|
|
|
public IPage<PlateGoodsApply> selectPage(IPage<PlateGoodsApply> page, PlateGoodsApply entity) { |
|
|
|
List<PlateGoodsApply> dataList = baseMapper.selectPage(page, entity); |
|
|
|
List<PlateGoodsApply> dataList = baseMapper.selectPage(page, entity); |
|
|
|
@ -60,6 +66,14 @@ public class PlateGoodsApplyServiceImpl extends BaseServiceImpl<PlateGoodsApplyM |
|
|
|
item.setStatus(approvalStatus); |
|
|
|
item.setStatus(approvalStatus); |
|
|
|
item.setApprovalMemo(approvalMemo); |
|
|
|
item.setApprovalMemo(approvalMemo); |
|
|
|
dataList.add(item); |
|
|
|
dataList.add(item); |
|
|
|
|
|
|
|
if(approvalStatus.equals(PlateGoodsEnum.STATUS_PASS.getCode())){ |
|
|
|
|
|
|
|
//审批通过
|
|
|
|
|
|
|
|
mesApprovalRecordService.passApproval(id, MesApprovalRecordBizTypeEnum.PLATE_GOODS_RECORD.getDesc(), AuthUtil.getUserId(), new Date()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(approvalStatus.equals(PlateGoodsEnum.STATUS_NOT_PASS.getCode())){ |
|
|
|
|
|
|
|
//审批驳回
|
|
|
|
|
|
|
|
mesApprovalRecordService.rejectApproval(id, MesApprovalRecordBizTypeEnum.PLATE_GOODS_RECORD.getDesc(), AuthUtil.getUserId(), new Date()); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return this.updateBatchById(dataList); |
|
|
|
return this.updateBatchById(dataList); |
|
|
|
@ -176,6 +190,10 @@ public class PlateGoodsApplyServiceImpl extends BaseServiceImpl<PlateGoodsApplyM |
|
|
|
goodsRecordService.updateBatchById(addRecordList); |
|
|
|
goodsRecordService.updateBatchById(addRecordList); |
|
|
|
this.save(apply); |
|
|
|
this.save(apply); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//创建代办
|
|
|
|
|
|
|
|
mesApprovalRecordService.createApproval |
|
|
|
|
|
|
|
(apply.getId(), MesApprovalRecordBizTypeEnum.PLATE_GOODS_APPLY.getDesc(),AuthUtil.getUser().getUserId(),new Date()); |
|
|
|
|
|
|
|
|
|
|
|
//关联订单
|
|
|
|
//关联订单
|
|
|
|
List<PlateGoodsApplyDetail> goodsApplyDetailList = new ArrayList<>(); |
|
|
|
List<PlateGoodsApplyDetail> goodsApplyDetailList = new ArrayList<>(); |
|
|
|
for (PlateGoodsRecord goodsRecord : addRecordList) { |
|
|
|
for (PlateGoodsRecord goodsRecord : addRecordList) { |
|
|
|
|