|
|
|
@ -5,7 +5,10 @@ import com.engine.jucailinkq.attendance.workflow.service.impl.BusinessTripsApply
|
|
|
|
|
import com.engine.jucailinkq.common.util.ApiReturnTools;
|
|
|
|
|
import com.engine.common.util.ParamUtil;
|
|
|
|
|
import com.engine.common.util.ServiceUtil;
|
|
|
|
|
import com.engine.jucailinkq.common.util.ResponseResult;
|
|
|
|
|
import com.google.gson.Gson;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import weaver.general.Util;
|
|
|
|
|
import weaver.hrm.HrmUserVarify;
|
|
|
|
|
import weaver.hrm.User;
|
|
|
|
|
|
|
|
|
@ -16,6 +19,8 @@ import javax.ws.rs.Path;
|
|
|
|
|
import javax.ws.rs.Produces;
|
|
|
|
|
import javax.ws.rs.core.Context;
|
|
|
|
|
import javax.ws.rs.core.MediaType;
|
|
|
|
|
import java.lang.reflect.Type;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -48,6 +53,30 @@ public class BusinessTripsApplyApi {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生成出差明细表数据
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/generateBusinessTripsList")
|
|
|
|
|
@Produces({"text/plain"})
|
|
|
|
|
public String generateBusinessTripsList(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
|
try {
|
|
|
|
|
Map<String,Object> param = ParamUtil.request2Map(request);
|
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
|
String mainTableDataStr = Util.null2String(param.get("mainTableData"));
|
|
|
|
|
String detailTableDataStr = Util.null2String(param.get("detailTableData"));
|
|
|
|
|
Gson gson = new Gson();
|
|
|
|
|
Map<String,Object> mainTableData = gson.fromJson(mainTableDataStr, (Type) Map.class);
|
|
|
|
|
List<Map<String, String>> detailTableData = gson.fromJson(detailTableDataStr, (Type) List.class);
|
|
|
|
|
|
|
|
|
|
param.put("mainTableData",mainTableData);
|
|
|
|
|
param.put("detailTableData",detailTableData);
|
|
|
|
|
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getBusinessTripsApplyService(user) :: generateBusinessTripsList,param);
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
log.error("generateBusinessTripsList status fail,catch error: [{}]",e);
|
|
|
|
|
return ApiReturnTools.error("200","查询失败");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|