Commit a46e17c8 authored by 侯彦文's avatar 侯彦文

借阅单创建

parent 622961f8
...@@ -44,7 +44,7 @@ public class ExtBorrowingFormController<V extends ExtBorrowingFormVO, S extends ...@@ -44,7 +44,7 @@ public class ExtBorrowingFormController<V extends ExtBorrowingFormVO, S extends
return ApiResult.ok(extBorrowingFormService.borrowCount(searchVo)); return ApiResult.ok(extBorrowingFormService.borrowCount(searchVo));
} }
@ApiOperation("借阅统计") @ApiOperation("创建借阅单")
@PostMapping({"borrow"}) @PostMapping({"borrow"})
public ApiResult borrow(@RequestBody ExtBorrowingFormVO extBorrowingFormVO,@RequestParam("docId") Long docId) { public ApiResult borrow(@RequestBody ExtBorrowingFormVO extBorrowingFormVO,@RequestParam("docId") Long docId) {
extBorrowingFormService.borrow(extBorrowingFormVO,docId); extBorrowingFormService.borrow(extBorrowingFormVO,docId);
......
...@@ -2,6 +2,7 @@ package com.inet.dcs.document.core.event; ...@@ -2,6 +2,7 @@ package com.inet.dcs.document.core.event;
import com.inet.dcs.document.common.vo.ExtBorrowingDocLinkVO; import com.inet.dcs.document.common.vo.ExtBorrowingDocLinkVO;
import com.inet.dcs.document.common.vo.ExtBorrowingFormVO; import com.inet.dcs.document.common.vo.ExtBorrowingFormVO;
import com.inet.dcs.document.common.vo.ExtTransferDocumentVO;
import com.inet.dcs.document.core.constants.Constants; import com.inet.dcs.document.core.constants.Constants;
import com.inet.dcs.document.core.constants.SignConstants; import com.inet.dcs.document.core.constants.SignConstants;
import com.inet.dcs.document.core.service.ExtBorrowingDocLinkService; import com.inet.dcs.document.core.service.ExtBorrowingDocLinkService;
...@@ -14,6 +15,10 @@ import com.inet.dcs.document.core.util.WorkFlowUtil; ...@@ -14,6 +15,10 @@ import com.inet.dcs.document.core.util.WorkFlowUtil;
import com.yonde.dex.basedata.data.search.SearchItem; import com.yonde.dex.basedata.data.search.SearchItem;
import com.yonde.dex.basedata.data.search.SearchQueryCondition; import com.yonde.dex.basedata.data.search.SearchQueryCondition;
import com.yonde.dex.basedata.entity.data.OperatorType; import com.yonde.dex.basedata.entity.data.OperatorType;
import com.yonde.dex.dao.events.BusinessEventType;
import com.yonde.dex.dao.events.DxEvent;
import com.yonde.dex.dao.events.DxEventListener;
import com.yonde.dex.dao.events.DxEventWrap;
import com.yonde.dex.user.common.vo.DxUserInfoVO; import com.yonde.dex.user.common.vo.DxUserInfoVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO; import com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO;
import com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO; import com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO;
...@@ -33,6 +38,7 @@ import java.util.List; ...@@ -33,6 +38,7 @@ import java.util.List;
*/ */
@Slf4j @Slf4j
@Component @Component
@DxEvent
public class ExtBorrowingFormEvent { public class ExtBorrowingFormEvent {
@Autowired @Autowired
...@@ -47,10 +53,11 @@ public class ExtBorrowingFormEvent { ...@@ -47,10 +53,11 @@ public class ExtBorrowingFormEvent {
@Autowired @Autowired
private ExtDxDocumentService extDxDocumentService; private ExtDxDocumentService extDxDocumentService;
@Autowired
private ExtTransferDocLinkService extTransferDocLinkService;
public void postUpdate(ExtBorrowingFormVO extBorrowingFormVO) { @DxEventListener(value = ExtBorrowingFormVO.class, eventType = BusinessEventType.POST_LIFECYCLE_CHANGE_STATUS, order = 1)
public void postUpdate(List<DxEventWrap<ExtBorrowingFormVO>> eventWrapList ) {
for (DxEventWrap<ExtBorrowingFormVO> e : eventWrapList) {
ExtBorrowingFormVO extBorrowingFormVO = e.getTarget();
if (Constants.RETURNED.equals(extBorrowingFormVO.getState())) { if (Constants.RETURNED.equals(extBorrowingFormVO.getState())) {
// 获取档案组流程审批人信息 // 获取档案组流程审批人信息
DxWfProcessVO wfProcessInstVO = workFlowUtil.getWfProcessInst(extBorrowingFormVO); DxWfProcessVO wfProcessInstVO = workFlowUtil.getWfProcessInst(extBorrowingFormVO);
...@@ -76,4 +83,5 @@ public class ExtBorrowingFormEvent { ...@@ -76,4 +83,5 @@ public class ExtBorrowingFormEvent {
extDxDocumentService.updateBorrowingStatus(sourceId, ExtBorrowingFormServiceImpl.CAN_BE_BORROWED); extDxDocumentService.updateBorrowingStatus(sourceId, ExtBorrowingFormServiceImpl.CAN_BE_BORROWED);
} }
} }
}
} }
...@@ -63,8 +63,6 @@ public class ExtBorrowingFormServiceImpl<V extends ExtBorrowingFormVO> implement ...@@ -63,8 +63,6 @@ public class ExtBorrowingFormServiceImpl<V extends ExtBorrowingFormVO> implement
@Resource @Resource
private EntityManager entityManager; private EntityManager entityManager;
@Autowired
private ExtBorrowingFormEvent extBorrowingFormEvent;
@Autowired @Autowired
private DxUserInfoFeign userService; private DxUserInfoFeign userService;
...@@ -72,12 +70,6 @@ public class ExtBorrowingFormServiceImpl<V extends ExtBorrowingFormVO> implement ...@@ -72,12 +70,6 @@ public class ExtBorrowingFormServiceImpl<V extends ExtBorrowingFormVO> implement
@Autowired @Autowired
private ExtDxDocumentService extDxDocumentService; private ExtDxDocumentService extDxDocumentService;
@Override
public void postUpdate(Collection<V> target, Collection<V> origin) {
for (V v : target) {
extBorrowingFormEvent.postUpdate(v);
}
}
@Override @Override
public ExtBorrowingFormVO startWorkflow(Long id) { public ExtBorrowingFormVO startWorkflow(Long id) {
ExtBorrowingFormVO extBorrowingFormVO = this.get(id); ExtBorrowingFormVO extBorrowingFormVO = this.get(id);
......
...@@ -271,23 +271,19 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic ...@@ -271,23 +271,19 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
public String categoryNumber(String categoryNumber,int zhNumber,int jjNumber,int sbNumber,int jsNumber,int countNumber){ public String categoryNumber(String categoryNumber,int zhNumber,int jjNumber,int sbNumber,int jsNumber,int countNumber){
if (categoryNumber.contains("ZH")){ if (categoryNumber.contains("ZH")){
categoryNumber = "综合"; categoryNumber = "综合";
zhNumber++; countNumber= zhNumber + 1;
countNumber= zhNumber;
} }
if (categoryNumber.contains("JJ")){ if (categoryNumber.contains("JJ")){
categoryNumber = "基建"; categoryNumber = "基建";
jjNumber++; countNumber= jjNumber+1;
countNumber= jjNumber;
} }
if (categoryNumber.contains("SB")){ if (categoryNumber.contains("SB")){
categoryNumber = "设备"; categoryNumber = "设备";
sbNumber++; countNumber= sbNumber+1;
countNumber= sbNumber;
} }
if (categoryNumber.contains("JS")){ if (categoryNumber.contains("JS")){
categoryNumber = "技术"; categoryNumber = "技术";
jsNumber++; countNumber = jsNumber+1;
countNumber = jsNumber;
} }
return categoryNumber; return categoryNumber;
} }
......
...@@ -172,7 +172,7 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe ...@@ -172,7 +172,7 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
// 更新文档借阅状态 // 更新文档借阅状态
dxDocumentVO.setBorrowingStatus(borrowingInProgress); dxDocumentVO.setBorrowingStatus(borrowingInProgress);
dxDocumentVO.setOperator(OperatorType.MODIFY); dxDocumentVO.setOperator(OperatorType.MODIFY);
this.save((V) dxDocumentVO); this.saveRecursion((V) dxDocumentVO);
} }
private String getProcessDefKey(String subTypeName) { private String getProcessDefKey(String subTypeName) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment