|
@@ -8,11 +8,14 @@ import com.idea.oa.apply.model.inout.ApplyPaymentSettleIn;
|
|
|
import com.idea.oa.apply.service.ApplyPaymentSettleService;
|
|
|
import com.idea.oa.apply.util.constant.ConstantFlowType;
|
|
|
import com.idea.oa.flow2.model.FlowMain;
|
|
|
+import com.idea.oa.flow2.model.FlowMainExample;
|
|
|
import com.idea.oa.flow2.model.FlowMainPush;
|
|
|
+import com.idea.oa.flow2.model.FlowMainPushExample;
|
|
|
import com.idea.oa.flow2.model.in.FlowMainCcVo;
|
|
|
import com.idea.oa.flow2.service.FlowMainCcService;
|
|
|
import com.idea.oa.flow2.service.FlowMainPushService;
|
|
|
import com.idea.oa.flow2.service.FlowMainService;
|
|
|
+import com.idea.util.DateUtils;
|
|
|
import com.rockstar.common.base.BaseController;
|
|
|
import com.rockstar.common.domain.AjaxResult;
|
|
|
import com.rockstar.flow.exception.FlowException;
|
|
@@ -20,7 +23,9 @@ import com.rockstar.frame.service.FrameUserService;
|
|
|
import com.rockstar.shiro.util.ShiroUtils;
|
|
|
import com.rockstar.util.UUIDUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.StringUtils;
|
|
@@ -59,7 +64,8 @@ public class ApplyPaymentSettleController extends BaseController {
|
|
|
@Autowired
|
|
|
private FrameUserService frameUserService;
|
|
|
|
|
|
-
|
|
|
+ @Value("${serverUrl}")
|
|
|
+ private String serverUrl;
|
|
|
|
|
|
|
|
|
|
|
@@ -120,6 +126,40 @@ public class ApplyPaymentSettleController extends BaseController {
|
|
|
if ("ok_end".equals(isOkString)) {
|
|
|
isEnd = true;
|
|
|
isAgree = true;
|
|
|
+ }else {
|
|
|
+ // 推送OA信息
|
|
|
+ FlowMain flowMain = flowMainService.selectByPrimaryKey(flowMainPush.getFlowMainId());
|
|
|
+
|
|
|
+ String syscode = "CESHI";
|
|
|
+ String flowId = "";
|
|
|
+ String requestname = flowMain.getApplyTheme();
|
|
|
+ String workflowname = ConstantFlowType.PAYMENT_NAME;
|
|
|
+ String nodeName = flowMainPush.getNodeName();
|
|
|
+ String pcurl = serverUrl;
|
|
|
+ String appurl = "";
|
|
|
+ String isremark = "0";
|
|
|
+ String viewtype = "0";
|
|
|
+ // TODO: 2024/11/15 创建者和接收者需求oa协商
|
|
|
+ String creator = "";
|
|
|
+ String receiver = "";
|
|
|
+ String date = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, new Date());
|
|
|
+ String receivets = System.currentTimeMillis()+ "";
|
|
|
+
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
+ json.put("syscode",syscode);
|
|
|
+ json.put("flowId",flowId);
|
|
|
+ json.put("requestname",requestname);
|
|
|
+ json.put("workflowname",workflowname);
|
|
|
+ json.put("nodeName",nodeName);
|
|
|
+ json.put("pcurl",pcurl);
|
|
|
+ json.put("appurl",appurl);
|
|
|
+ json.put("isremark",isremark);
|
|
|
+ json.put("viewtype",viewtype);
|
|
|
+ json.put("creator",creator);
|
|
|
+ json.put("receiver",receiver);
|
|
|
+ json.put("date",date);
|
|
|
+ json.put("receivets",receivets);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
//添加业务信息(将请假信息中的修改掉,剩余年假,剩余调休,冻结年假,冻结调休都修改掉)
|
|
@@ -187,7 +227,7 @@ public class ApplyPaymentSettleController extends BaseController {
|
|
|
public AjaxResult myaddApplyPayment(ApplyPaymentSettleIn record,String addSystemRemark) throws FlowException {
|
|
|
|
|
|
|
|
|
-
|
|
|
+ String id = UUIDUtils.middleUUID();
|
|
|
{
|
|
|
record.setUpdatedAt(new Date());
|
|
|
record.setCreatedAt(record.getUpdatedAt());
|
|
@@ -196,7 +236,8 @@ public class ApplyPaymentSettleController extends BaseController {
|
|
|
record.setCreatedByDept(ShiroUtils.getUser().getDepartment());
|
|
|
record.setFlowNum(UUIDUtils.middleUUID());
|
|
|
record.setStatus(0);
|
|
|
- modelService.insert(record);
|
|
|
+ record.setId(id);
|
|
|
+ modelService.insertWithoutId(record);
|
|
|
}
|
|
|
|
|
|
HashMap<String, Object> feeMoneyTotalMap = null;//new HashMap<>();
|
|
@@ -220,6 +261,52 @@ public class ApplyPaymentSettleController extends BaseController {
|
|
|
ConstantFlowType.PAYMENT_PROCESSDEFINE, ConstantFlowType.PAYMENT_DEPLOYMENTID,
|
|
|
feeMoneyTotalMap, ConstantFlowType.PAYMENT_NAME, ConstantFlowType.PAYMENT,ShiroUtils.getUser());
|
|
|
|
|
|
+ // 推送OA信息
|
|
|
+ String syscode = "CESHI";
|
|
|
+ String flowId = "";
|
|
|
+ String requestname = applyTheme;
|
|
|
+ String workflowname = ConstantFlowType.PAYMENT_NAME;
|
|
|
+ String nodeName = "";
|
|
|
+ String pcurl = serverUrl;
|
|
|
+ String appurl = "";
|
|
|
+ String isremark = "0";
|
|
|
+ String viewtype = "0";
|
|
|
+ // TODO: 2024/11/15 创建者和接收者需求oa协商
|
|
|
+ String creator = "";
|
|
|
+ String receiver = "";
|
|
|
+ String date = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, new Date());
|
|
|
+ String receivets = System.currentTimeMillis()+ "";
|
|
|
+
|
|
|
+ FlowMainExample flowMainExample = new FlowMainExample();
|
|
|
+ flowMainExample.createCriteria().andFormIdEqualTo(id).andFlowTypeEqualTo(ConstantFlowType.PAYMENT);
|
|
|
+ List<FlowMain> flowMains = flowMainService.selectByExample(flowMainExample);
|
|
|
+ if(CollectionUtils.isNotEmpty(flowMains)){
|
|
|
+ FlowMain flowMain = flowMains.get(0);
|
|
|
+ flowId = flowMain.getId();
|
|
|
+ }
|
|
|
+ FlowMainPushExample flowMainPushExample = new FlowMainPushExample();
|
|
|
+ flowMainPushExample.createCriteria().andFlowMainIdEqualTo(flowId).andStatusEqualTo(0);
|
|
|
+ List<FlowMainPush> flowMainPushes = flowMainPushService.selectByExample(flowMainPushExample);
|
|
|
+ if(CollectionUtils.isNotEmpty(flowMainPushes)){
|
|
|
+ FlowMainPush flowMainPush = flowMainPushes.get(0);
|
|
|
+ nodeName = flowMainPush.getNodeName();
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONObject json = new JSONObject();
|
|
|
+ json.put("syscode",syscode);
|
|
|
+ json.put("flowId",flowId);
|
|
|
+ json.put("requestname",requestname);
|
|
|
+ json.put("workflowname",workflowname);
|
|
|
+ json.put("nodeName",nodeName);
|
|
|
+ json.put("pcurl",pcurl);
|
|
|
+ json.put("appurl",appurl);
|
|
|
+ json.put("isremark",isremark);
|
|
|
+ json.put("viewtype",viewtype);
|
|
|
+ json.put("creator",creator);
|
|
|
+ json.put("receiver",receiver);
|
|
|
+ json.put("date",date);
|
|
|
+ json.put("receivets",receivets);
|
|
|
+
|
|
|
if (ajaxResult.get("code").equals(1688)) {
|
|
|
// //表成功了 且已经审核完成
|
|
|
//// 需要进行后续的处理
|