| | |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.project.system.service.ISysNoticeService; |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.quality.mapper.QualityInspectMapper; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.mapper.ShippingInfoMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.service.impl.CommonFileServiceImpl; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.HashMap; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | //@RequiredArgsConstructor |
| | | public class ApproveProcessServiceImpl extends ServiceImpl<ApproveProcessMapper, ApproveProcess> implements IApproveProcessService { |
| | | private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("yyyyMMdd"); |
| | | |
| | | private final StringRedisTemplate redisTemplate; |
| | | @Autowired |
| | | private StringRedisTemplate redisTemplate; |
| | | @Autowired |
| | | private DailyRedisCounter dailyRedisCounter; |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | | @Autowired |
| | | private IApproveNodeService approveNodeService; |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | @Autowired |
| | | private ApproveProcessMapper approveProcessMapper; |
| | | @Autowired |
| | | private TempFileServiceImpl tempFileService; |
| | | @Autowired |
| | | private CommonFileMapper commonFileMapper; |
| | | @Autowired |
| | | private CommonFileServiceImpl commonFileService; |
| | | @Autowired |
| | | private ISysNoticeService sysNoticeService; |
| | | |
| | | private final DailyRedisCounter dailyRedisCounter; |
| | | |
| | | private final SysDeptMapper sysDeptMapper; |
| | | private final IApproveNodeService approveNodeService; |
| | | private final SysUserMapper sysUserMapper; |
| | | private final ApproveProcessMapper approveProcessMapper; |
| | | private final TempFileServiceImpl tempFileService; |
| | | private final CommonFileMapper commonFileMapper; |
| | | private final ISysNoticeService sysNoticeService; |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | |
| | | @Override |
| | | public void addApprove(ApproveProcessVO approveProcessVO) throws Exception { |
| | |
| | | approveProcess.setApproveUserNames(sysUsers.stream().map(SysUser::getNickName).collect(Collectors.joining(","))); |
| | | approveProcess.setApproveTime(StringUtils.isEmpty(approveProcessVO.getApproveTime()) ? null : dateFormat.parse(approveProcessVO.getApproveTime())); |
| | | approveProcess.setApproveReason(approveProcessVO.getApproveReason()); |
| | | approveProcess.setApproveRemark(approveProcessVO.getApproveRemark()); |
| | | approveProcess.setDeviceRepairId(approveProcessVO.getDeviceRepairId()); |
| | | approveProcess.setMaintenancePrice(approveProcessVO.getMaintenancePrice()); |
| | | approveProcess.setPrice(approveProcessVO.getPrice()); |
| | |
| | | tempFileService.migrateTempFilesToFormal(approveProcess.getId(), approveProcessVO.getTempFileIds(), FileNameType.ApproveProcess.getValue()); |
| | | /*消息通知*/ |
| | | String id = approveProcessVO.getApproveUserIds().split(",")[0]; |
| | | sysNoticeService.simpleNoticeByUser(approveProcessType(approveProcessVO.getApproveType()), |
| | | approveID + "流程编号的审批需要您审核!!!!!", |
| | | Arrays.asList(Long.valueOf(id)), |
| | | approveProcessVO.getApproveDeptId(), |
| | | "/collaborativeApproval/approvalProcess?approveType=" + approveProcessVO.getApproveType() + "&approveId=" + approveID); |
| | | if (approveProcess.getApproveType()==8){ |
| | | sysNoticeService.simpleNoticeByUser(approveProcessType(approveProcess.getApproveType()), |
| | | approveProcess.getApproveId() + "流程编号的审批需要您审核!!!!!", |
| | | Arrays.asList(Long.valueOf(id)), |
| | | "/safeProduction/safeWorkApproval?approveType=" + approveProcess.getApproveType() + "&approveId=" + approveProcess.getApproveId()); |
| | | }else { |
| | | sysNoticeService.simpleNoticeByUser(approveProcessType(approveProcess.getApproveType()), |
| | | approveProcess.getApproveId() + "流程编号的审批需要您审核!!!!!", |
| | | Arrays.asList(Long.valueOf(id)), |
| | | "/collaborativeApproval/approvalProcess?approveType=" + approveProcess.getApproveType() + "&approveId=" + approveProcess.getApproveId()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | return sysDeptList; |
| | | } |
| | | |
| | | @Autowired |
| | | private PurchaseLedgerMapper purchaseLedgerMapper; |
| | | |
| | | @Autowired |
| | | private ShippingInfoMapper shippingInfoMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | |
| | | @Autowired |
| | | private QualityInspectMapper qualityInspectMapper; |
| | | |
| | | @Override |
| | | public IPage<ApproveProcess> listAll(Page page, ApproveProcess approveProcess) { |
| | | IPage<ApproveProcess> approveProcessIPage = approveProcessMapper.listPage(page, approveProcess); |
| | | List<ApproveProcess> records = approveProcessIPage.getRecords(); |
| | | |
| | | for (ApproveProcess record : records) { |
| | | List<CommonFile> commonFiles = commonFileMapper.selectList(new LambdaQueryWrapper<CommonFile>() |
| | | .eq(CommonFile::getCommonId, record.getId()) |
| | | .eq(CommonFile::getType, FileNameType.ApproveProcess.getValue())); |
| | | record.setCommonFileList(commonFiles); |
| | | List<CommonFile> allFiles = new ArrayList<>(); |
| | | |
| | | // 采购审批查询 |
| | | if (record.getApproveType() == 5) { |
| | | String contractNo = record.getApproveReason(); |
| | | PurchaseLedger ledger = purchaseLedgerMapper.selectOne(new LambdaQueryWrapper<PurchaseLedger>() |
| | | .eq(PurchaseLedger::getPurchaseContractNumber, contractNo) |
| | | .last("limit 1")); |
| | | |
| | | if (ledger != null) { |
| | | allFiles = commonFileMapper.selectList(new LambdaQueryWrapper<CommonFile>() |
| | | .eq(CommonFile::getCommonId, ledger.getId()) |
| | | .eq(CommonFile::getType, FileNameType.PURCHASE.getValue())); |
| | | } |
| | | } |
| | | |
| | | // 发货审批查询 |
| | | else if (record.getApproveType() == 7) { |
| | | String reason = record.getApproveReason(); // 格式为 "xx:CONTRACT_NO" |
| | | if (StringUtils.hasText(reason) && reason.contains(":")) { |
| | | // 提取冒号后面的标识符 (可能是合同号或发货单号) |
| | | String identifier = reason.split(":")[1]; |
| | | // 1. 优先尝试找销售台账 (新逻辑:合同号同步审批) |
| | | SalesLedger ledger = salesLedgerMapper.selectOne(new LambdaQueryWrapper<SalesLedger>() |
| | | .eq(SalesLedger::getSalesContractNo, identifier) |
| | | .last("limit 1")); |
| | | if (ledger != null) { |
| | | allFiles = commonFileMapper.selectList(new LambdaQueryWrapper<CommonFile>() |
| | | .eq(CommonFile::getCommonId, ledger.getId()) |
| | | .eq(CommonFile::getType, FileNameType.SALE.getValue())); |
| | | } else { |
| | | // 2. 回退到旧逻辑:发货单号 |
| | | ShippingInfo shippingInfo = shippingInfoMapper.selectOne(new LambdaQueryWrapper<ShippingInfo>() |
| | | .eq(ShippingInfo::getShippingNo, identifier) |
| | | .last("limit 1")); |
| | | if (shippingInfo != null) { |
| | | allFiles = commonFileMapper.selectList(new LambdaQueryWrapper<CommonFile>() |
| | | .eq(CommonFile::getCommonId, shippingInfo.getSalesLedgerId()) |
| | | .eq(CommonFile::getType, FileNameType.SALE.getValue())); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 查询审批单自身的附件 |
| | | else { |
| | | allFiles = commonFileMapper.selectList(new LambdaQueryWrapper<CommonFile>() |
| | | .eq(CommonFile::getCommonId, record.getId()) |
| | | .eq(CommonFile::getType, FileNameType.ApproveProcess.getValue())); |
| | | } |
| | | |
| | | record.setCommonFileList(allFiles); |
| | | } |
| | | return approveProcessIPage; |
| | | } |
| | | |
| | | @Override |
| | | public void delApprove(Long[] ids) { |
| | | ApproveProcess approveProcess; |
| | | public void delByIds(List<Long> ids) { |
| | | for (Long approveId : ids) { |
| | | |
| | | // 逻辑删除审批流程 |
| | | update(new UpdateWrapper<ApproveProcess>() |
| | | .lambda() |
| | | .set(ApproveProcess::getApproveDelete, 1) |
| | | .eq(ApproveProcess::getApproveId, approveId)); |
| | | .eq(ApproveProcess::getId, approveId)); |
| | | // 删除对应的附件 |
| | | commonFileService.deleteByBusinessId(approveId, FileNameType.ApproveProcess.getValue()); |
| | | ApproveProcess approveProcess = approveProcessMapper.selectById(approveId); |
| | | |
| | | // 删除审批节点 |
| | | approveNodeService.delApproveNodeByApproveId(approveId); |
| | | approveNodeService.delApproveNodeByApproveId(approveProcess.getApproveId()); |
| | | |
| | | // 只查最新一条审批流程 |
| | | ApproveProcess latestProcess = approveProcessMapper.selectOne( |
| | | new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveId, approveId) |
| | | .orderByDesc(ApproveProcess::getCreateTime) |
| | | .last("LIMIT 1")); |
| | | |
| | | if (latestProcess == null) { |
| | | continue; |
| | | } |
| | | |
| | | |
| | | // 删除对应的消息通知 |
| | | sysNoticeService.remove(new LambdaQueryWrapper<SysNotice>() |
| | | .eq(SysNotice::getNoticeTitle, approveProcessType(latestProcess.getApproveType())) |
| | | .eq(SysNotice::getSenderId, latestProcess.getApproveUser()) |
| | | .apply("CAST(notice_content AS CHAR) LIKE CONCAT('%', {0}, '%')", latestProcess.getApproveId())); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void delApprove(List<Long> ids) { |
| | | for (Long approveId : ids) { |
| | | ApproveProcess approveProcess = approveProcessMapper.selectOne(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveId, approveId) |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | | .last("LIMIT 1")); |
| | | // 逻辑删除审批流程 |
| | | update(new UpdateWrapper<ApproveProcess>() |
| | | .lambda() |
| | | .set(ApproveProcess::getApproveDelete, 1) |
| | | .eq(ApproveProcess::getApproveId, approveId)); |
| | | // 删除对应的附件 |
| | | commonFileService.deleteByBusinessId(approveProcess.getId(), FileNameType.ApproveProcess.getValue()); |
| | | // 删除审批节点 |
| | | approveNodeService.delApproveNodeByApproveId(approveId.toString()); |
| | | |
| | | // 只查最新一条审批流程 |
| | | ApproveProcess latestProcess = approveProcessMapper.selectOne( |
| | |
| | | return one; |
| | | } |
| | | |
| | | private final ApproveNodeMapper approveNodeMapper; |
| | | @Override |
| | | public Map<String, Object> getStockInOrderInfo(String approveId) { |
| | | ApproveProcess approveProcess = getStockInApproveProcess(approveId); |
| | | StockInBusinessContext context = parseStockInContext(approveProcess); |
| | | if (context == null) { |
| | | throw new RuntimeException("当前审批单未绑定入库业务数据"); |
| | | } |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("approveId", approveProcess.getApproveId()); |
| | | result.put("approveType", approveProcess.getApproveType()); |
| | | result.put("businessType", context.businessType); |
| | | if (context.purchaseLedgerId != null) { |
| | | PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectById(context.purchaseLedgerId); |
| | | if (purchaseLedger == null) { |
| | | throw new RuntimeException("关联采购订单不存在"); |
| | | } |
| | | result.put("orderInfo", purchaseLedger); |
| | | return result; |
| | | } |
| | | if (context.salesLedgerId != null) { |
| | | SalesLedger salesLedger = salesLedgerMapper.selectById(context.salesLedgerId); |
| | | if (salesLedger == null) { |
| | | throw new RuntimeException("关联销售订单不存在"); |
| | | } |
| | | result.put("orderInfo", salesLedger); |
| | | return result; |
| | | } |
| | | throw new RuntimeException("未解析到订单信息"); |
| | | } |
| | | |
| | | @Override |
| | | public List<?> getStockInProductList(String approveId) { |
| | | ApproveProcess approveProcess = getStockInApproveProcess(approveId); |
| | | StockInBusinessContext context = parseStockInContext(approveProcess); |
| | | if (context == null) { |
| | | throw new RuntimeException("当前审批单未绑定入库产品数据"); |
| | | } |
| | | List<SalesLedgerProduct> matchedProducts; |
| | | if (context.purchaseLedgerId != null) { |
| | | matchedProducts = salesLedgerProductMapper.selectList(new LambdaQueryWrapper<SalesLedgerProduct>() |
| | | .eq(SalesLedgerProduct::getSalesLedgerId, context.purchaseLedgerId) |
| | | .eq(SalesLedgerProduct::getType, 2) |
| | | .orderByAsc(SalesLedgerProduct::getId)); |
| | | return matchedProducts; |
| | | } |
| | | if (context.salesLedgerId != null) { |
| | | LambdaQueryWrapper<SalesLedgerProduct> wrapper = new LambdaQueryWrapper<SalesLedgerProduct>() |
| | | .eq(SalesLedgerProduct::getSalesLedgerId, context.salesLedgerId) |
| | | .eq(SalesLedgerProduct::getType, 1) |
| | | .orderByAsc(SalesLedgerProduct::getId); |
| | | if (!context.productIds.isEmpty()) { |
| | | wrapper.in(SalesLedgerProduct::getId, context.productIds); |
| | | } |
| | | matchedProducts = salesLedgerProductMapper.selectList(wrapper); |
| | | attachRequestedQty(matchedProducts, context); |
| | | return matchedProducts; |
| | | } |
| | | if (!context.productIds.isEmpty()) { |
| | | matchedProducts = salesLedgerProductMapper.selectList(new LambdaQueryWrapper<SalesLedgerProduct>() |
| | | .in(SalesLedgerProduct::getId, context.productIds) |
| | | .orderByAsc(SalesLedgerProduct::getId)); |
| | | attachRequestedQty(matchedProducts, context); |
| | | return matchedProducts; |
| | | } |
| | | return Collections.emptyList(); |
| | | } |
| | | |
| | | private ApproveProcess getStockInApproveProcess(String approveId) { |
| | | if (!StringUtils.hasText(approveId)) { |
| | | throw new RuntimeException("审批编号不能为空"); |
| | | } |
| | | ApproveProcess approveProcess = approveProcessMapper.selectOne(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveId, approveId) |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | | .orderByDesc(ApproveProcess::getCreateTime) |
| | | .last("limit 1")); |
| | | if (approveProcess == null) { |
| | | throw new RuntimeException("审批单不存在"); |
| | | } |
| | | if (!Objects.equals(approveProcess.getApproveType(), 9)) { |
| | | throw new RuntimeException("当前审批单不是入库审批"); |
| | | } |
| | | return approveProcess; |
| | | } |
| | | |
| | | private StockInBusinessContext parseStockInContext(ApproveProcess approveProcess) { |
| | | if (approveProcess == null) { |
| | | return null; |
| | | } |
| | | String remark = approveProcess.getApproveRemark(); |
| | | if (StringUtils.hasText(remark) && remark.startsWith("qualityQualifiedInbound:")) { |
| | | String[] split = remark.split(":"); |
| | | if (split.length >= 3) { |
| | | StockInBusinessContext context = new StockInBusinessContext(); |
| | | context.businessType = "PURCHASE_QUALITY"; |
| | | context.purchaseLedgerId = parseLongSafely(split[2]); |
| | | return context; |
| | | } |
| | | } |
| | | if (StringUtils.hasText(remark) && remark.startsWith("salesStock:")) { |
| | | String[] split = remark.split(":"); |
| | | if (split.length >= 3) { |
| | | StockInBusinessContext context = new StockInBusinessContext(); |
| | | context.businessType = "SALES_STOCK"; |
| | | context.salesLedgerId = parseLongSafely(split[1]); |
| | | context.productIds = Arrays.stream(split[2].split(",")) |
| | | .filter(StringUtils::hasText) |
| | | .map(this::parseLongSafely) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()); |
| | | return context; |
| | | } |
| | | } |
| | | if (StringUtils.hasText(remark) && (remark.startsWith("scanQualified:") || remark.startsWith("scanUnqualified:"))) { |
| | | String[] split = remark.split(":"); |
| | | if (split.length >= 3) { |
| | | StockInBusinessContext context = new StockInBusinessContext(); |
| | | context.businessType = remark.startsWith("scanQualified:") ? "SALES_SCAN_QUALIFIED" : "SALES_SCAN_UNQUALIFIED"; |
| | | context.salesLedgerId = parseLongSafely(split[1]); |
| | | parseProductLineQty(split[2], context); |
| | | return context; |
| | | } |
| | | } |
| | | String reason = approveProcess.getApproveReason(); |
| | | if (!StringUtils.hasText(reason)) { |
| | | return null; |
| | | } |
| | | if (reason.startsWith("原材料质检入库审批:")) { |
| | | String[] split = reason.split(":"); |
| | | if (split.length >= 3) { |
| | | StockInBusinessContext context = new StockInBusinessContext(); |
| | | context.businessType = "PURCHASE_QUALITY"; |
| | | context.purchaseLedgerId = parseLongSafely(split[2]); |
| | | return context; |
| | | } |
| | | if (split.length >= 2) { |
| | | Long inspectId = parseLongSafely(split[1]); |
| | | if (inspectId != null) { |
| | | QualityInspect inspect = qualityInspectMapper.selectById(inspectId); |
| | | if (inspect != null) { |
| | | StockInBusinessContext context = new StockInBusinessContext(); |
| | | context.businessType = "PURCHASE_QUALITY"; |
| | | context.purchaseLedgerId = inspect.getPurchaseLedgerId(); |
| | | return context; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (reason.startsWith("入库审批:")) { |
| | | String[] split = reason.split(":"); |
| | | if (split.length >= 4) { |
| | | StockInBusinessContext context = new StockInBusinessContext(); |
| | | context.businessType = "SALES_STOCK"; |
| | | context.salesLedgerId = parseLongSafely(split[2]); |
| | | context.productIds = Arrays.stream(split[3].split(",")) |
| | | .filter(StringUtils::hasText) |
| | | .map(this::parseLongSafely) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()); |
| | | return context; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | private void parseProductLineQty(String lines, StockInBusinessContext context) { |
| | | if (!StringUtils.hasText(lines) || context == null) { |
| | | return; |
| | | } |
| | | String[] items = lines.split(","); |
| | | for (String item : items) { |
| | | if (!StringUtils.hasText(item)) { |
| | | continue; |
| | | } |
| | | String[] pair = item.split("@"); |
| | | Long lineId = parseLongSafely(pair[0]); |
| | | if (lineId == null) { |
| | | continue; |
| | | } |
| | | context.productIds.add(lineId); |
| | | if (pair.length >= 2 && StringUtils.hasText(pair[1])) { |
| | | context.requestedQtyByProductId.put(lineId, pair[1]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void attachRequestedQty(List<SalesLedgerProduct> products, StockInBusinessContext context) { |
| | | if (products == null || products.isEmpty() || context == null || context.requestedQtyByProductId.isEmpty()) { |
| | | return; |
| | | } |
| | | for (SalesLedgerProduct product : products) { |
| | | if (product == null || product.getId() == null) { |
| | | continue; |
| | | } |
| | | String requestedQty = context.requestedQtyByProductId.get(product.getId()); |
| | | if (requestedQty != null) { |
| | | product.setRemark(StringUtils.hasText(product.getRemark()) |
| | | ? product.getRemark() + ";审批申请数量:" + requestedQty |
| | | : "审批申请数量:" + requestedQty); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private Long parseLongSafely(String value) { |
| | | if (!StringUtils.hasText(value)) { |
| | | return null; |
| | | } |
| | | try { |
| | | return Long.valueOf(value); |
| | | } catch (Exception ignored) { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | private static class StockInBusinessContext { |
| | | private String businessType; |
| | | private Long purchaseLedgerId; |
| | | private Long salesLedgerId; |
| | | private List<Long> productIds = new ArrayList<>(); |
| | | private final Map<Long, String> requestedQtyByProductId = new HashMap<>(); |
| | | } |
| | | |
| | | @Autowired |
| | | private ApproveNodeMapper approveNodeMapper; |
| | | |
| | | // 报价审批编辑审核人 |
| | | public void updateApproveUser(ApproveGetAndUpdateVo approveGetAndUpdateVo) { |
| | |
| | | approveNodeService.initApproveNodes(approveGetAndUpdateVo.getApproveUserIds(), approveProcess.getApproveId(), approveProcess.getTenantId()); |
| | | /*消息通知*/ |
| | | String id = approveProcess.getApproveUserIds().split(",")[0]; |
| | | sysNoticeService.simpleNoticeByUser(approveProcessType(approveProcess.getApproveType()), |
| | | approveProcess.getApproveId() + "流程编号的审批需要您审核!!!!!", |
| | | Arrays.asList(Long.valueOf(id)), |
| | | approveProcess.getApproveDeptId(), |
| | | "/collaborativeApproval/approvalProcess?approveType=" + approveProcess.getApproveType() + "&approveId=" + approveProcess.getApproveId()); |
| | | if (approveProcess.getApproveType()==8){ |
| | | sysNoticeService.simpleNoticeByUser(approveProcessType(approveProcess.getApproveType()), |
| | | approveProcess.getApproveId() + "流程编号的审批需要您审核!!!!!", |
| | | Arrays.asList(Long.valueOf(id)), |
| | | "/safeProduction/safeWorkApproval?approveType=" + approveProcess.getApproveType() + "&approveId=" + approveProcess.getApproveId()); |
| | | }else { |
| | | sysNoticeService.simpleNoticeByUser(approveProcessType(approveProcess.getApproveType()), |
| | | approveProcess.getApproveId() + "流程编号的审批需要您审核!!!!!", |
| | | Arrays.asList(Long.valueOf(id)), |
| | | "/collaborativeApproval/approvalProcess?approveType=" + approveProcess.getApproveType() + "&approveId=" + approveProcess.getApproveId()); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | tempFileService.migrateTempFilesToFormal(approve.getId(), approveGetAndUpdateVo.getTempFileIds(), FileNameType.ApproveProcess.getValue()); |
| | | /*消息通知*/ |
| | | String id = approve.getApproveUserIds().split(",")[0]; |
| | | sysNoticeService.simpleNoticeByUser(approveProcessType(approve.getApproveType()), |
| | | approve.getApproveId() + "流程编号的审批需要您审核!!!!!", |
| | | Arrays.asList(Long.valueOf(id)), |
| | | approve.getApproveDeptId(), |
| | | "/collaborativeApproval/approvalProcess?approveType=" + approve.getApproveType() + "&approveId=" + approve.getApproveId()); |
| | | if (approve.getApproveType()==8){ |
| | | sysNoticeService.simpleNoticeByUser(approveProcessType(approve.getApproveType()), |
| | | approve.getApproveId() + "流程编号的审批需要您审核!!!!!", |
| | | Arrays.asList(Long.valueOf(id)), |
| | | "/safeProduction/safeWorkApproval?approveType=" + approve.getApproveType() + "&approveId=" + approve.getApproveId()); |
| | | }else { |
| | | sysNoticeService.simpleNoticeByUser(approveProcessType(approve.getApproveType()), |
| | | approve.getApproveId() + "流程编号的审批需要您审核!!!!!", |
| | | Arrays.asList(Long.valueOf(id)), |
| | | "/collaborativeApproval/approvalProcess?approveType=" + approve.getApproveType() + "&approveId=" + approve.getApproveId()); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | case 6: |
| | | return "报价审批"; |
| | | case 7: |
| | | return "出库审批"; |
| | | return "发货审批"; |
| | | case 8: |
| | | return "危险作业审批"; |
| | | case 9: |
| | | return "入库审批"; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |