|
@@ -24,6 +24,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
|
|
import com.google.gson.JsonObject;
|
|
|
+import com.pj.api.pushfee.oa.CallbackBO;
|
|
|
import com.pj.api.wx.bo.MsgDataBO;
|
|
|
import com.pj.api.wx.service.WxService;
|
|
|
import com.pj.constants.UserTypeEnum;
|
|
@@ -1381,4 +1382,31 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
this.addErrorBusiness(errorBusinessBO, false);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * oa审批回调
|
|
|
+ *
|
|
|
+ * @param callbackBO
|
|
|
+ */
|
|
|
+ public void approveCallback(CallbackBO callbackBO) {
|
|
|
+ String fdId = callbackBO.getFdId();
|
|
|
+ TbBusiness tbBusiness = this.findByFdId(fdId);
|
|
|
+ if (tbBusiness == null) {
|
|
|
+ throw new AjaxError("流程不存在");
|
|
|
+ }
|
|
|
+ tbBusiness.setOaResult(callbackBO.getAuditResult()).setOaContent(callbackBO.getRefuseReason())
|
|
|
+ .setOaJudgeTime(new Date());
|
|
|
+ this.updateById(tbBusiness);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据流程ID查询
|
|
|
+ *
|
|
|
+ * @param fdId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private TbBusiness findByFdId(String fdId) {
|
|
|
+ QueryWrapper<TbBusiness> ew = new QueryWrapper<>();
|
|
|
+ ew.lambda().eq(TbBusiness::getOaFdId, fdId);
|
|
|
+ return getOne(ew);
|
|
|
+ }
|
|
|
}
|