Commit 4d332a13 authored by yff's avatar yff

Merge branch 'master' of gitlab.gavelinfo.com:gavelinfo/kwell-mes

parents e910bbf2 0bf46187
......@@ -2,6 +2,7 @@ package com.gavel.kwell.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.utils.ThreadContext;
import com.gavel.kwell.service.KmesBoardService;
import com.gavel.kwell.vo.GpfkHgVO;
import com.gavel.kwell.vo.PcslVO;
......@@ -158,5 +159,17 @@ public class KmesBoardController extends BaseController {
}
@RequestMapping(value = "/queryOA", method = RequestMethod.POST)
@ResponseBody
public Object queryOAqueryOA(@RequestBody JSONObject param) {
try {
return buildReturnData(kmesBoardService.queryOA());
} catch (Exception e) {
ThreadContext.getReturnData().setSuccess(false);
ThreadContext.getReturnData().setMessage(e.getMessage());
}
return ThreadContext.getReturnData();
}
}
......@@ -7,10 +7,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.gavel.common.base.service.BaseEditService;
import com.gavel.kwell.vo.GpfkHgVO;
import com.gavel.kwell.vo.PcslVO;
import com.gavel.kwell.vo.SdclVO;
import com.gavel.kwell.vo.UWoVO;
import com.gavel.kwell.vo.*;
public interface KmesBoardService extends BaseEditService {
......@@ -41,4 +38,6 @@ public interface KmesBoardService extends BaseEditService {
public int querySafeDays();
/**查询在制品状态 */
public Map<String,Object> queryCurrentMadeZtsl();
public KqtjVO queryOA();
}
package com.gavel.kwell.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.base.service.impl.BaseEditServiceImpl;
import com.gavel.common.business.service.CommonService;
import com.gavel.common.http.HttpUtils;
import com.gavel.common.utils.CollectionUtils;
import com.gavel.common.utils.DateUtils;
import com.gavel.common.utils.NumberUtils;
import com.gavel.common.utils.StringUtils;
import com.gavel.kwell.dao.GpfkcxDao;
import com.gavel.kwell.dao.KmesBoardDao;
import com.gavel.kwell.persistent.Gpfk;
import com.gavel.kwell.persistent.Gpfkjg;
import com.gavel.kwell.service.KmesBoardService;
import com.gavel.kwell.utils.DateCalculateUtil;
import com.gavel.kwell.utils.KwellParamEnum;
import com.gavel.kwell.vo.GpfkHgVO;
import com.gavel.kwell.vo.PcslVO;
import com.gavel.kwell.vo.SdclVO;
import com.gavel.kwell.vo.UWoVO;
import com.gavel.kwell.vo.*;
import com.gavel.wo.persistent.Pcjhmx;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -310,6 +308,28 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
maps.put(KwellParamEnum.DASHBOARD_JYZT.getId(), jycount);
return maps;
}
/**
* 考勤接口
* @return
*/
@Override
public KqtjVO queryOA() {
KqtjVO kqtjVO = new KqtjVO();
String url = "http://oa.kewell.com.cn/api/cube/restful/interface/getModeDataPageList/mes_kqtj";
String param = "{\"datajson\":{\"operationinfo\":{\"operator\":\"1\"},\"mainTable\":{},\"pageInfo\":{\"pageNo\":\"1\",\"pageSize\":\"10\"}," +
"\"header\":{\"systemid\":\"CRM_System\",\"currentDateTime\":\"20200101010101\",\"Md5\":\"c4ca4238a0b923820dcc509a6f75849b\"}}}";
try {
String response = HttpUtils.doPost(url, param);
if(StringUtils.isNotEmpty(response)){
JSONObject jsonObject = JSONObject.parseObject(response);
logger.info("返回信息:"+response);
}
} catch (Exception e) {
logger.error("错误信息:",e);
}
return kqtjVO;
}
}
package com.gavel.kwell.vo;
import com.gavel.common.base.entity.BaseEntity;
public class KqtjVO extends BaseEntity {
private Integer ydrs;//应到人数
private Integer sdrs;//实到人数
public Integer getYdrs() {
return ydrs;
}
public void setYdrs(Integer ydrs) {
this.ydrs = ydrs;
}
public Integer getSdrs() {
return sdrs;
}
public void setSdrs(Integer sdrs) {
this.sdrs = sdrs;
}
}
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