| | |
| | | package org.jeecg.modules.dnc.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
| | |
| | | import org.jeecg.common.api.vo.FileUploadResult; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.dnc.entity.*; |
| | | import org.jeecg.modules.dnc.exception.ExceptionCast; |
| | | import org.jeecg.modules.dnc.mapper.DocInfoMapper; |
| | | import org.jeecg.modules.dnc.request.DocInfoQueryRequest; |
| | | import org.jeecg.modules.dnc.request.DocInfoUploadRequest; |
| | | import org.jeecg.modules.dnc.response.*; |
| | | import org.jeecg.modules.dnc.service.*; |
| | | import org.jeecg.modules.dnc.utils.CamelToSnakeRegex; |
| | | import org.jeecg.modules.dnc.utils.ValidateUtil; |
| | | |
| | | |
| | | import org.jeecg.modules.dnc.request.DocInfoQueryRequest; |
| | | import org.jeecg.modules.dnc.request.DocInfoUploadRequest; |
| | | import org.jeecg.modules.dnc.utils.file.FileUtilS; |
| | | |
| | | import org.jeecg.modules.dnc.entity.*; |
| | | import org.jeecg.modules.dnc.response.*; |
| | | import org.jeecg.modules.dncFlow.entity.DispatchFile; |
| | | import org.jeecg.modules.dncFlow.service.IDispatchFileService; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipment; |
| | | import org.jeecg.modules.system.service.ISysDictService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | |
| | | private IDeviceInfoService deviceInfoService; |
| | | @Autowired |
| | | private IDeviceGroupService deviceGroupService; |
| | | |
| | | @Autowired |
| | | private IDispatchFileService dispatchFileService; |
| | | |
| | | /*备份处理*/ |
| | | @Override |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | boolean saveBool = super.save(docInfo); |
| | | if (uploadRequest.getIsApprove()&&saveBool){ |
| | | //触发审签 |
| | | DispatchFile dispatchFile = new DispatchFile(); |
| | | dispatchFile.setDocId(docInfo.getDocId()); |
| | | dispatchFile.setFileId(docFile.getFileId()); |
| | | dispatchFile.setAttributionId(uploadRequest.getAttributionId()); |
| | | dispatchFile.setAttributionType(String.valueOf(uploadRequest.getAttributionType())); |
| | | dispatchFile.setDocClassCode(uploadRequest.getDocClassCode()); |
| | | dispatchFileService.saveDispatchFile(dispatchFile); |
| | | } |
| | | return saveBool; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | |
| | | } |
| | | String recF = pathFile.substring(0,recNum);//将返回def}ab |
| | | Integer equipmentId = recF.lastIndexOf("\\"); |
| | | String deviceNo = recF.substring(equipmentId+1,recF.length()); |
| | | String deviceNo = recF.substring(equipmentId+1); |
| | | if (StringUtils.isEmpty(deviceNo)) { |
| | | return false; |
| | | } |
| | |
| | | } |
| | | queryWrapper.ge(StrUtil.isNotEmpty(docQuery.getStartTime()),"u.create_time",docQuery.getStartTime()+" 00:00:00"); |
| | | queryWrapper.le(StrUtil.isNotEmpty(docQuery.getEndTime()),"u.create_time",docQuery.getEndTime()+" 23:59:59"); |
| | | if (StrUtil.isNotEmpty(docQuery.getColumn())){ |
| | | if (("desc").equals(docQuery.getOrder())){ |
| | | queryWrapper.orderByDesc("u."+ CamelToSnakeRegex.camelToSnake(docQuery.getColumn())); |
| | | }else { |
| | | queryWrapper.orderByAsc("u."+CamelToSnakeRegex.camelToSnake(docQuery.getColumn())); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public boolean deleteByDocAttr(Integer attrType, String attrId) { |
| | | int i = super.getBaseMapper().deleteByDocAttr(attrType, attrId); |
| | | if(i >= 0) { |
| | | return true; |
| | | } |
| | | return false; |
| | | return i >= 0; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | QueryWrapper<DocInfo> queryWrapper = Wrappers.query(); |
| | | queryWrapper.eq(StrUtil.isNotEmpty(docQuery.getDocId()),"u.doc_id",docQuery.getDocId()); |
| | | queryWrapper.eq("r.attribution_type", docQuery.getAttributionType()).eq("r.attribution_id", docQuery.getAttributionId()) |
| | | .eq("r.classification_id", docClassification.getClassificationId()); |
| | | if (StringUtils.isNotEmpty(docQuery.getDocName())) { |