|
@@ -3,8 +3,15 @@ package com.yh.saas.plugin.yiliangyiyun.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
|
import com.baomidou.mybatisplus.mapper.Wrapper;
|
|
|
+import com.winsea.svc.base.base.entity.CommonStaff;
|
|
|
+import com.winsea.svc.base.base.entity.NotificationStaffTodoTask;
|
|
|
+import com.winsea.svc.base.base.service.ICommonStaffService;
|
|
|
import com.winsea.svc.base.security.util.AuthSecurityUtils;
|
|
|
import com.winsea.svc.base.workflow.entity.Workflow;
|
|
|
+import com.winsea.svc.notice.entity.NoticeTaskInfo;
|
|
|
+import com.winsea.svc.notice.entity.base.BaseNotice;
|
|
|
+import com.winsea.svc.notice.service.INoticeService;
|
|
|
+import com.winsea.svc.notice.service.INoticeTaskService;
|
|
|
import com.yh.saas.common.support.util.IdGenerator;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.NumberConstant;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
|
|
@@ -64,10 +71,15 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
|
private ISalesDeliveryReportService salesDeliveryReportService;
|
|
|
@Autowired
|
|
|
private ISaleOrderService saleOrderService;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private INoticeService noticeService;
|
|
|
+ @Autowired
|
|
|
+ private INoticeTaskService noticeTaskService;
|
|
|
@Autowired
|
|
|
private INewWorkflowService workflowService;
|
|
|
@Autowired
|
|
|
+ private ICommonStaffService staffService;
|
|
|
+ @Autowired
|
|
|
private IContractManagementInfoService contractManagementInfoService;
|
|
|
@Autowired
|
|
|
private GeTuiUtils geTuiUtils;
|
|
@@ -430,6 +442,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
|
if (tranCarInfo1 != null&& "3".equals(tranCarInfo1.getConfirmFlag())) {
|
|
|
purchaseReceiptReport.setCustomerConfirmationStatusFlag("1");
|
|
|
purchaseReceiptReport.setCustomerConfirmationStatus("是");
|
|
|
+ tesk(warehouseInOutInfo,"2");
|
|
|
geTuiUtils.pushByCid("卸货提醒", "您的合同车辆:"+warehouseInOutInfo.getCarNo()+"申请卸货,请及时确认", purchaseOrder.getCommonId());
|
|
|
} else {
|
|
|
purchaseReceiptReport.setCustomerConfirmationStatusFlag("3");
|
|
@@ -534,6 +547,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
|
salesDeliveryReport.setCustomerConfirmationStatusFlag("1");
|
|
|
salesDeliveryReport.setCustomerConfirmationStatus("是");
|
|
|
geTuiUtils.pushByCid("发货通知", "您的合同车辆:"+warehouseInOutInfo.getCarNo()+"已发出", saleOrder.getCommonId());
|
|
|
+ tesk(warehouseInOutInfo,"1");
|
|
|
} else {
|
|
|
salesDeliveryReport.setCustomerConfirmationStatusFlag("3");
|
|
|
salesDeliveryReport.setCustomerConfirmationStatus("否");
|
|
@@ -788,4 +802,45 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
|
|
|
return dataCount;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 任务
|
|
|
+ *
|
|
|
+ * @param warehouseInOutInfo
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public void tesk(WarehouseInOutInfo warehouseInOutInfo,String flag) {
|
|
|
+ // 先删除任务
|
|
|
+ noticeService.removeNotice(BaseNotice.NoticeStatus.TASK, "INOUTTASK-TASK-APPROVE",
|
|
|
+ warehouseInOutInfo.getId(), null);
|
|
|
+ String staffName = "XXX";
|
|
|
+ CommonStaff commitUserInfo = staffService.getInfo(AuthSecurityUtils.getCurrentUserId());
|
|
|
+ if (commitUserInfo != null) {
|
|
|
+ staffName = commitUserInfo.getMajorRole() != null
|
|
|
+ ? commitUserInfo.getMajorRole().getRoleName() + " " + commitUserInfo.getStaffName()
|
|
|
+ : commitUserInfo.getStaffName();
|
|
|
+ }
|
|
|
+ String taskContent ="";
|
|
|
+ // 向下一步操作人发送任务通知
|
|
|
+ if("1".equals(flag)){
|
|
|
+ taskContent = "您的合同("+warehouseInOutInfo.getContractNo()+")车辆:"+warehouseInOutInfo.getCarNo()+"已发出";
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ taskContent = "您的合同("+warehouseInOutInfo.getContractNo()+")车辆:"+warehouseInOutInfo.getCarNo()+"申请卸货,请及时确认";
|
|
|
+
|
|
|
+ }
|
|
|
+ NoticeTaskInfo taskInfo = new NoticeTaskInfo();
|
|
|
+ taskInfo.setCompId(commitUserInfo.getCompId());
|
|
|
+ taskInfo.setAcceptType(BaseNotice.AcceptStatus.STAFF);
|
|
|
+ taskInfo.setBusinessId(warehouseInOutInfo.getId());
|
|
|
+ taskInfo.setBusinessType("WAREHOUSE");
|
|
|
+ taskInfo.setMessageContent(taskContent);
|
|
|
+ taskInfo.setBusinessCode("INOUTTASK-TASK-APPROVE");
|
|
|
+// taskInfo.setNoticeTaskStatus(NoticeTaskInfo.NoticeTaskStatus.RETURN);
|
|
|
+ noticeTaskService.createNoticeTask(Lists.newArrayList(AuthSecurityUtils.getCurrentUserId()),
|
|
|
+ null, taskInfo);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|