From a7a3e876c467a401ecec1a084acb8edc0927d10b Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期二, 17 六月 2025 13:36:04 +0800 Subject: [PATCH] 1.修改检索nc文件bug 2.新增刀具列表查询接口 3.程序加工确认表确认流程 --- lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/WorkStepServiceImpl.java | 4 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/GuideCardBatchController.java | 23 +++ lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java | 215 +++++++++++++++++++++++++++++- lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/CutterController.java | 22 +++ lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ProcessStreamServiceImpl.java | 8 lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/constant/DispatchFileEnum.java | 36 +++++ lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/constant/GuideCardBatchEnum.java | 41 +++++ lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/vo/GuideCardBatchFlowTaskVo.java | 38 +++++ lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IGuideCardBatchService.java | 16 ++ lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/GuideCardBatch.java | 10 + 10 files changed, 402 insertions(+), 11 deletions(-) diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/CutterController.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/CutterController.java index 3d85d1a..087300f 100644 --- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/CutterController.java +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/CutterController.java @@ -1,5 +1,7 @@ package org.jeecg.modules.dnc.controller; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; @@ -13,6 +15,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.util.List; @Slf4j @Api(tags = "鍒�鍏蜂俊鎭�") @@ -35,6 +38,25 @@ } /** + * 鏌ヨ鍒�鍏稬ist + * @param cutter + * @return + */ + @AutoLog(value = "鍒�鍏蜂俊鎭�-鏌ヨ鍒�鍏稬ist") + @ApiOperation(value = "鍒�鍏蜂俊鎭�-鏌ヨ鍒�鍏稬ist", notes = "鍒�鍏蜂俊鎭�-鏌ヨ鍒�鍏稬ist") + @GetMapping("/getList") + public Result<?> getList( Cutter cutter){ + QueryWrapper<Cutter> queryWrapper = new QueryWrapper<>(); + queryWrapper.eq(StrUtil.isNotEmpty(cutter.getDocId()),"doc_id",cutter.getDocId()); + queryWrapper.like(StrUtil.isNotEmpty(cutter.getCutterName()),"cutter_name",cutter.getCutterName()); + queryWrapper.like(StrUtil.isNotEmpty(cutter.getCutterType()),"cutter_type",cutter.getCutterType()); + queryWrapper.like(StrUtil.isNotEmpty(cutter.getCutterSpacing()),"cutter_spacing",cutter.getCutterSpacing()); + queryWrapper.orderByDesc("create_time"); + List<Cutter> list = service.list(queryWrapper); + return Result.OK(list); + } + + /** * 鏂板鍒�鍏蜂俊鎭� * @param cutter * @return diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/GuideCardBatchController.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/GuideCardBatchController.java index 8f1b9c3..f17ae05 100644 --- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/GuideCardBatchController.java +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/controller/GuideCardBatchController.java @@ -12,6 +12,7 @@ import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.modules.dnc.entity.GuideCardBatch; import org.jeecg.modules.dnc.service.IGuideCardBatchService; +import org.jeecg.modules.dncFlow.vo.GuideCardBatchFlowTaskVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; @@ -138,6 +139,28 @@ return Result.OK(guideCardBatch); } + /** + * 鍙戣捣纭娴佺▼ + * @param id + * @return + */ + @ApiOperation(value="nc鏂囦欢瀵瑰簲鏁版帶绋嬪簭鍔犲伐纭琛�-鍙戣捣纭娴佺▼", notes="nc鏂囦欢瀵瑰簲鏁版帶绋嬪簭鍔犲伐纭琛�-鍙戣捣纭娴佺▼") + @GetMapping(value = "/startGuideCardBatch") + public Result<?> startGuideCardBatch(String id){ + return guideCardBatchService.startGuideCardBatch(id); + } + + /** + * 娴佺▼鑺傜偣瀹℃牳 + * @param guideCardBatchFlowTaskVo + * @return + */ + @ApiOperation(value="nc鏂囦欢瀵瑰簲鏁版帶绋嬪簭鍔犲伐纭琛�-娴佺▼鑺傜偣瀹℃牳", notes="nc鏂囦欢瀵瑰簲鏁版帶绋嬪簭鍔犲伐纭琛�-娴佺▼鑺傜偣瀹℃牳") + @PostMapping(value = "/auditGuideCardBatch") + public Result<?> auditGuideCardBatch(@RequestBody GuideCardBatchFlowTaskVo guideCardBatchFlowTaskVo){ + return guideCardBatchService.auditGuideCardBatch(guideCardBatchFlowTaskVo); + } + /** * 瀵煎嚭excel * diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/GuideCardBatch.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/GuideCardBatch.java index a3bd5f4..0018d05 100644 --- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/GuideCardBatch.java +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/GuideCardBatch.java @@ -9,6 +9,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; import org.jeecgframework.poi.excel.annotation.Excel; import org.springframework.format.annotation.DateTimeFormat; @@ -104,6 +105,7 @@ /**缂栧啓浜�*/ @Excel(name = "缂栧啓浜�", width = 15) @ApiModelProperty(value = "缂栧啓浜�") + @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") private String compiler; /**缂栧啓鏃ユ湡*/ @Excel(name = "缂栧啓鏃ユ湡", width = 15, format = "yyyy-MM-dd") @@ -114,6 +116,7 @@ /**鏍″浜�*/ @Excel(name = "鏍″浜�", width = 15) @ApiModelProperty(value = "鏍″浜�") + @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") private String proofreader; /**鏍″鏃ユ湡*/ @Excel(name = "鏍″鏃ユ湡", width = 15, format = "yyyy-MM-dd") @@ -124,6 +127,7 @@ /**鎿嶄綔鑰�*/ @Excel(name = "鎿嶄綔鑰�", width = 15) @ApiModelProperty(value = "鎿嶄綔鑰�") + @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") private String operator; /**棣栨鏃ユ湡*/ @Excel(name = "棣栨鏃ユ湡", width = 15, format = "yyyy-MM-dd") @@ -131,9 +135,14 @@ @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "棣栨鏃ユ湡") private Date inspectionTime; + /**棣栨鎰忚*/ + @Excel(name = "棣栨鎰忚", width = 15) + @ApiModelProperty(value = "棣栨鎰忚") + private String inspectionOpinion; /**瀹℃壒浜�*/ @Excel(name = "瀹℃壒浜�", width = 15) @ApiModelProperty(value = "瀹℃壒浜�") + @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") private String approver; /**瀹℃壒鏃ユ湡*/ @Excel(name = "瀹℃壒鏃ユ湡", width = 15, format = "yyyy-MM-dd") @@ -143,6 +152,7 @@ private Date approverTime; /**鍒涘缓浜�*/ @ApiModelProperty(value = "鍒涘缓浜�") + @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") private String createBy; /**鍒涘缓鏃ユ湡*/ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IGuideCardBatchService.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IGuideCardBatchService.java index 7666932..dde62b2 100644 --- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IGuideCardBatchService.java +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IGuideCardBatchService.java @@ -1,7 +1,9 @@ package org.jeecg.modules.dnc.service; import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.common.api.vo.Result; import org.jeecg.modules.dnc.entity.GuideCardBatch; +import org.jeecg.modules.dncFlow.vo.GuideCardBatchFlowTaskVo; /** * @Description: nc鏂囦欢瀵瑰簲鏁版帶绋嬪簭鍔犲伐纭琛� @@ -24,4 +26,18 @@ * @return */ boolean importGuideCardBatch(String docId,String attributionId,Integer attributionType); + + /** + * 鍙戣捣纭娴佺▼ + * @param id + * @return + */ + Result<?> startGuideCardBatch(String id); + + /** + * 娴佺▼鑺傜偣瀹℃牳 + * @param guideCardBatchFlowTaskVo + * @return + */ + Result<?> auditGuideCardBatch(GuideCardBatchFlowTaskVo guideCardBatchFlowTaskVo); } diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java index 183133e..f61a051 100644 --- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java @@ -1,21 +1,39 @@ package org.jeecg.modules.dnc.service.impl; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.apache.shiro.SecurityUtils; +import org.flowable.engine.TaskService; +import org.flowable.task.api.Task; +import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.util.DateUtils; import org.jeecg.modules.dnc.constant.DocAttributionTypeEnum; import org.jeecg.modules.dnc.entity.*; import org.jeecg.modules.dnc.mapper.GuideCardBatchMapper; +import org.jeecg.modules.dnc.response.ActivitiCode; +import org.jeecg.modules.dnc.response.CommonCode; +import org.jeecg.modules.dnc.response.UcenterCode; import org.jeecg.modules.dnc.service.*; +import org.jeecg.modules.dnc.utils.ValidateUtil; +import org.jeecg.modules.dncFlow.constant.GuideCardBatchEnum; +import org.jeecg.modules.dncFlow.entity.DispatchFile; +import org.jeecg.modules.dncFlow.vo.GuideCardBatchFlowTaskVo; +import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness; +import org.jeecg.modules.flowable.apithird.business.service.IFlowMyBusinessService; +import org.jeecg.modules.flowable.apithird.service.FlowCallBackServiceI; +import org.jeecg.modules.flowable.apithird.service.FlowCommonService; +import org.jeecg.modules.flowable.service.IFlowDefinitionService; +import org.jeecg.modules.flowable.service.IFlowTaskService; import org.jeecg.modules.system.service.ISysDictService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; -import java.util.Date; -import java.util.List; +import javax.annotation.Resource; +import java.util.*; /** * @Description: nc鏂囦欢瀵瑰簲鏁版帶绋嬪簭鍔犲伐纭琛� @@ -23,17 +41,14 @@ * @Date: 2025-05-27 * @Version: V1.0 */ -@Service -public class GuideCardBatchServiceImpl extends ServiceImpl<GuideCardBatchMapper, GuideCardBatch> implements IGuideCardBatchService { +@Service("IGuideCardBatchService") +public class GuideCardBatchServiceImpl extends ServiceImpl<GuideCardBatchMapper, GuideCardBatch> implements IGuideCardBatchService , FlowCallBackServiceI { @Autowired private ISysDictService sysDictService; @Autowired private IDocInfoService docInfoService; - - @Autowired - private IDocRelativeService docRelativeService; @Autowired private IPartsInfoService partsInfoService; @@ -46,6 +61,17 @@ @Autowired private IDeviceTypeService deviceTypeService; + + @Resource + private FlowCommonService flowCommonService; + @Resource + private IFlowDefinitionService flowDefinitionService; + @Autowired + private IFlowTaskService flowTaskService; + @Autowired + private TaskService taskService; + @Autowired + private IFlowMyBusinessService flowMyBusinessService; /** * 鐢熸垚娴佹按鍙� @@ -143,4 +169,179 @@ guideCardBatch.setCreateTime(new Date()); return this.save(guideCardBatch); } + + /** + * 鍙戣捣纭娴佺▼ + * @param id + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Result<?> startGuideCardBatch(String id){ + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + //鑾峰彇绋嬪簭鍔犲伐纭琛� + GuideCardBatch guideCardBatch=this.getById(id); + if (guideCardBatch==null) { + return Result.ok("鏈壘鍒板搴旂殑绋嬪簭鍔犲伐纭琛�"); + } + //濉厖鏁版嵁 + guideCardBatch.setCompiler(user.getUsername()); + guideCardBatch.setCompilerTime(new Date()); + guideCardBatch.setFlowStatus(GuideCardBatchEnum.VERIFY.getCode()); + this.updateById(guideCardBatch); + System.out.println("绋嬪簭鍔犲伐纭琛� 纭娴佺▼锛�" + guideCardBatch.getId()); + flowCommonService.initActBusiness("娴佹按鍙凤細"+guideCardBatch.getSerialNumber()+" 绋嬪簭鍔犲伐纭琛ㄨ繘琛岀‘璁ゆ祦绋�", + guideCardBatch.getId(), "IGuideCardBatchService", "nc_guide_card_batch", null); + Map<String, Object> variables = new HashMap<>(); + variables.put("dataId", guideCardBatch.getId()); + variables.put("organization", "鐢ㄦ埛"+user.getRealname()+"鍙戣捣娴佺▼"); + variables.put("comment", "鐢ㄦ埛"+user.getRealname()+"鍙戣捣娴佺▼"); + variables.put("proofreading",true); + Result result= flowDefinitionService.startProcessInstanceByKey("nc_guide_card_batch", variables); + if (!result.isSuccess()) { + guideCardBatch.setCompiler(null); + guideCardBatch.setCompilerTime(null); + this.updateById(guideCardBatch); + } + return result; + } + + /** + * 娴佺▼鑺傜偣瀹℃牳 + * @param guideCardBatchFlowTaskVo + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Result<?> auditGuideCardBatch(GuideCardBatchFlowTaskVo guideCardBatchFlowTaskVo){ + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + try { + // 鍙傛暟鏍¢獙 + if (!ValidateUtil.validateString(guideCardBatchFlowTaskVo.getTaskId()) || !ValidateUtil.validateString(guideCardBatchFlowTaskVo.getDataId())) { + return Result.error(CommonCode.INVALID_PARAM.toString()); + } + String userId = user.getId(); + guideCardBatchFlowTaskVo.setAssignee(user.getUsername()); + if (!ValidateUtil.validateString(userId)) { + return Result.error(UcenterCode.UCENTER_ACCOUNT_NOT_EXIST.toString()); + } + + // 鏁版嵁鏌ヨ + GuideCardBatch guideCardBatch = this.getById(guideCardBatchFlowTaskVo.getDataId()); + if (guideCardBatch == null) { + return Result.error(CommonCode.INVALID_PARAM.toString()); + } + DocInfo docInfo = docInfoService.getById(guideCardBatch.getDocId()); + if (docInfo == null) { + return Result.error(ActivitiCode.ACT_DOC_ERROR.toString()); + } + + // 2. 鏌ヨ娴佺▼涓氬姟璁板綍锛堝鐞嗙┖缁撴灉锛� + List<FlowMyBusiness> businessList = flowMyBusinessService.list( + new QueryWrapper<FlowMyBusiness>() + .eq("process_instance_id", guideCardBatchFlowTaskVo.getInstanceId()) + ); + if (businessList.isEmpty()) { + return Result.error("娴佺▼璁板綍涓嶅瓨鍦�"); + } + FlowMyBusiness flowMyBusiness = businessList.get(0); + + // 3. 鏍¢獙鐢ㄦ埛鏄惁涓哄�欓�夊鐞嗕汉 + List<String> todoUsers = JSON.parseArray(flowMyBusiness.getTodoUsers(), String.class); + if (todoUsers == null || !todoUsers.contains(user.getUsername())) { + return Result.error("鐢ㄦ埛鏃犳潈鎿嶄綔姝や换鍔�"); + } + + // 4. 璁ら浠诲姟锛堝鐞嗗凡琚棰嗙殑鎯呭喌锛� + String taskId = flowMyBusiness.getTaskId(); + Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); + if (task == null) { + return Result.error("浠诲姟涓嶅瓨鍦ㄦ垨宸插畬鎴�"); + } + if (task.getAssignee() != null && !task.getAssignee().equals(user.getUsername())) { + return Result.error("浠诲姟宸茶浠栦汉璁ら"); + } + taskService.claim(taskId, user.getUsername()); + + // 璁剧疆娴佺▼鍙橀噺 + Map<String, Object> values = new HashMap<>(); + values.put("dataId", guideCardBatch.getId()); + values.put("assignee", userId); + values.put("comment", guideCardBatchFlowTaskVo.getComment()); + values.put("organization", guideCardBatchFlowTaskVo.getComment()); + if (guideCardBatchFlowTaskVo.getCheckType() != null) { + values.put("checkType", guideCardBatchFlowTaskVo.getCheckType()); + } + if (guideCardBatchFlowTaskVo.getConfirmType() != null) { + values.put("confirmType", guideCardBatchFlowTaskVo.getConfirmType()); + } + if (guideCardBatchFlowTaskVo.getApproveType() != null) { + values.put("approveType", guideCardBatchFlowTaskVo.getApproveType()); + } + guideCardBatchFlowTaskVo.setValues(values); + // 瀹屾垚娴佺▼浠诲姟 + Result result = flowTaskService.complete(guideCardBatchFlowTaskVo); + if (result.isSuccess()) { + if (guideCardBatchFlowTaskVo.getCheckType() != null) { + if (guideCardBatchFlowTaskVo.getCheckType()){ + guideCardBatch.setFlowStatus(GuideCardBatchEnum.CONFIRM.getCode()); + guideCardBatch.setProofreader(user.getUsername()); + guideCardBatch.setProofreaderTime(new Date()); + }else { + guideCardBatch.setFlowStatus(GuideCardBatchEnum.PREPARE.getCode()); + } + } + if (guideCardBatchFlowTaskVo.getConfirmType() != null) { + if (guideCardBatchFlowTaskVo.getConfirmType()){ + guideCardBatch.setFlowStatus(GuideCardBatchEnum.APPROVE.getCode()); + guideCardBatch.setOperator(user.getUsername()); + guideCardBatch.setInspectionTime(new Date()); + guideCardBatch.setInspectionOpinion(guideCardBatchFlowTaskVo.getInspectionOpinion()); + }else { + guideCardBatch.setFlowStatus(GuideCardBatchEnum.PREPARE.getCode()); + } + } + if (guideCardBatchFlowTaskVo.getApproveType() != null) { + if (guideCardBatchFlowTaskVo.getApproveType()){ + guideCardBatch.setFlowStatus(GuideCardBatchEnum.COMPLETE.getCode()); + guideCardBatch.setApprover(user.getUsername()); + guideCardBatch.setApproverTime(new Date()); + }else { + guideCardBatch.setFlowStatus(GuideCardBatchEnum.PREPARE.getCode()); + } + } + this.updateById(guideCardBatch); + } else { + return result; + } + return Result.OK("鎿嶄綔鎴愬姛"); + } catch (Exception e) { + // 璁剧疆浜嬪姟鍥炴粴 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + return Result.error("鎿嶄綔澶辫触锛�" + e.getMessage()); + } + } + + @Override + public void afterFlowHandle(FlowMyBusiness business) { + business.getTaskNameId();//鎺ヤ笅鏉ュ鎵圭殑鑺傜偣 + business.getValues();//鍓嶇浼犺繘鏉ョ殑鍙傛暟 + business.getActStatus(); + } + + @Override + public Object getBusinessDataById(String dataId) { + return this.getById(dataId); + } + + @Override + public Map<String, Object> flowValuesOfTask(String taskNameId, Map<String, Object> values) { + return null; + } + + @Override + public List<String> flowCandidateUsernamesOfTask(String taskNameId, Map<String, Object> values) { + //涓氬姟鏄惁骞查娴佺▼锛屼笟鍔″共棰勶紝娴佺▼骞查锛屾寚瀹氫汉鍛樿繘琛屽鐞� + return null; + } } diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ProcessStreamServiceImpl.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ProcessStreamServiceImpl.java index 8b1fc58..c876f4e 100644 --- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ProcessStreamServiceImpl.java +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ProcessStreamServiceImpl.java @@ -540,10 +540,10 @@ List<DeviceType> deviceTypeList = deviceTypeService.getDeviceTypeByAttribution(processIds, DocAttributionTypeEnum.PROCESS.getCode(),treeInfoRequest.getDeviceManagementName(),treeInfoRequest.getDeviceManagementCode()); if (deviceTypeList != null && !deviceTypeList.isEmpty()) { - List<String> deviceManagementIds=deviceTypeList.stream().map(DeviceType::getId).collect(Collectors.toList()); + List<String> deviceTypeIds=deviceTypeList.stream().map(DeviceType::getId).collect(Collectors.toList()); DocInfoQueryRequest docQuery = new DocInfoQueryRequest(); BeanUtil.copyProperties(treeInfoRequest,docQuery); - docQuery.setAttributionIds(String.join(",",deviceManagementIds)); + docQuery.setAttributionIds(String.join(",",deviceTypeIds)); docQuery.setDocClassCode("NC"); docQuery.setAttributionType(DocAttributionTypeEnum.PROCESS.getCode()); docInfos=docInfoService.findListByDocQuery(docQuery); @@ -554,6 +554,10 @@ treeInfoRequest.setProcessIds(id); List<DocInfo> docInfoList = workStepService.getByWorkStepNCFile(treeInfoRequest); docInfos.addAll(docInfoList); + }else { + treeInfoRequest.setProcessIds(processIds); + List<DocInfo> docInfoList = workStepService.getByWorkStepNCFile(treeInfoRequest); + docInfos.addAll(docInfoList); } return docInfos; } diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/WorkStepServiceImpl.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/WorkStepServiceImpl.java index 37623aa..56a9a0d 100644 --- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/WorkStepServiceImpl.java +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/WorkStepServiceImpl.java @@ -469,10 +469,10 @@ List<DeviceType> deviceTypeList = deviceTypeService.getDeviceTypeByAttribution(workStepIds, DocAttributionTypeEnum.WORKSITE.getCode(),treeInfoRequest.getDeviceManagementName(),treeInfoRequest.getDeviceManagementCode()); if (deviceTypeList != null && !deviceTypeList.isEmpty()) { - List<String> deviceManagementIds=deviceTypeList.stream().map(DeviceType::getDeviceManagementId).collect(Collectors.toList()); + List<String> deviceTypeIds=deviceTypeList.stream().map(DeviceType::getId).collect(Collectors.toList()); DocInfoQueryRequest docQuery = new DocInfoQueryRequest(); BeanUtil.copyProperties(treeInfoRequest,docQuery); - docQuery.setAttributionIds(String.join(",",deviceManagementIds)); + docQuery.setAttributionIds(String.join(",",deviceTypeIds)); docQuery.setDocClassCode("NC"); docQuery.setAttributionType(DocAttributionTypeEnum.WORKSITE.getCode()); docInfos=docInfoService.findListByDocQuery(docQuery); diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/constant/DispatchFileEnum.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/constant/DispatchFileEnum.java new file mode 100644 index 0000000..10a6fc9 --- /dev/null +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/constant/DispatchFileEnum.java @@ -0,0 +1,36 @@ +package org.jeecg.modules.dncFlow.constant; + +public enum DispatchFileEnum { + COMPLETE("1", "缂栧埗"), + + VERIFY("2", "鏍″"), + + APPROVE("3", "鎵瑰噯"); + + private String code; + private String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + DispatchFileEnum() { + } + + DispatchFileEnum(String code, String name) { + this.code = code; + this.name = name; + } +} diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/constant/GuideCardBatchEnum.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/constant/GuideCardBatchEnum.java new file mode 100644 index 0000000..503fc13 --- /dev/null +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/constant/GuideCardBatchEnum.java @@ -0,0 +1,41 @@ +package org.jeecg.modules.dncFlow.constant; + +public enum GuideCardBatchEnum { + PREPARE("1", "缂栧埗"), + + VERIFY("2", "鏍″"), + + CONFIRM("3", "鎿嶄綔纭"), + + APPROVE("4", "瀹℃壒"), + + COMPLETE("5", "瀹屾垚"); + + + private String code; + private String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + GuideCardBatchEnum() { + } + + GuideCardBatchEnum(String code, String name) { + this.code = code; + this.name = name; + } +} diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/vo/GuideCardBatchFlowTaskVo.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/vo/GuideCardBatchFlowTaskVo.java new file mode 100644 index 0000000..2c5a2b4 --- /dev/null +++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/vo/GuideCardBatchFlowTaskVo.java @@ -0,0 +1,38 @@ +package org.jeecg.modules.dncFlow.vo; + +import io.swagger.annotations.ApiModel; +import lombok.Data; +import org.jeecg.modules.flowable.domain.vo.FlowTaskVo; + +@Data +@ApiModel("绋嬪簭鍔犲伐纭琛ㄥ伐浣滄祦浠诲姟鐩稿叧--璇锋眰鍙傛暟") +public class GuideCardBatchFlowTaskVo extends FlowTaskVo { + /** + * taskIds + */ + private String taskIds; + + /** + * 鏍″绫诲瀷 + * true:鏍″閫氳繃 + * false:鏍″涓嶉�氳繃 + */ + private Boolean checkType; + + /** + * 纭绫诲瀷 + * true:纭閫氳繃 + * false:纭涓嶉�氳繃 + */ + private Boolean confirmType; + + /** + * 瀹℃壒绫诲瀷 + * true:瀹℃壒閫氳繃 + * false:瀹℃壒涓嶉�氳繃 + */ + private Boolean approveType; + + /**棣栨鎰忚*/ + private String inspectionOpinion; +} -- Gitblit v1.9.3