Commit 05a34c99 authored by tianbo's avatar tianbo

两员配备统计表生成

parent 7ff006e3
package com.yeejoin.amos.boot.module.tcm.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzsTwoStaffingCompanyDto;
import com.yeejoin.amos.boot.module.tcm.api.entity.TzsTwoStaffing;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -20,4 +20,8 @@ public interface TzsTwoStaffingMapper extends BaseMapper<TzsTwoStaffing> {
@Param("companyDto") TzsTwoStaffingCompanyDto companyDto,
@Param("orgCode") String orgCode);
List<TzsTwoStaffing> getListByOrgCode(@Param("orgCode")String orgCode, @Param("type")String type);
List<TzsTwoStaffingCompanyDto> getListAll();
void truncateTwoStaffingStatistics();
}
......@@ -2,10 +2,8 @@ package com.yeejoin.amos.boot.module.tcm.api.service;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzsTwoStaffingCompanyDto;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzsTwoStaffingCompanyDto;
import com.yeejoin.amos.boot.module.tcm.api.entity.TzsTwoStaffing;
import java.util.LinkedHashMap;
......@@ -21,4 +19,6 @@ public interface ITzsTwoStaffingService {
List<TzsTwoStaffing> getStatisticsMessage(List<LinkedHashMap> list);
Page<TzsTwoStaffingCompanyDto> getCompanyList(String orgCode, TzsTwoStaffingCompanyDto companyDto,Page<TzsTwoStaffingCompanyDto> page);
public void generateTwoStaffingStatistics();
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.tcm.api.mapper.TzsTwoStaffingMapper">
<select id="getCompanyList" resultType="com.yeejoin.amos.boot.module.tcm.api.dto.TzsTwoStaffingCompanyDto">
<select id="getCompanyList" resultType="com.yeejoin.amos.boot.module.tcm.api.dto.TzsTwoStaffingCompanyDto">
SELECT
*
......@@ -23,4 +22,13 @@
<select id="getListByOrgCode" resultType="com.yeejoin.amos.boot.module.tcm.api.entity.TzsTwoStaffing">
</select>
<select id="getListAll" resultType="com.yeejoin.amos.boot.module.tcm.api.dto.TzsTwoStaffingCompanyDto">
SELECT
*
FROM
view_two_staffing
</select>
<select id="truncateTwoStaffingStatistics">
TRUNCATE TABLE tzs_two_staffing;
</select>
</mapper>
......@@ -2,34 +2,18 @@ package com.yeejoin.amos.boot.module.tcm.biz.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzsTwoStaffingCompanyDto;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzsTwoStaffingCompanyDto;
import com.yeejoin.amos.boot.module.tcm.api.service.ITzsTwoStaffingService;
import com.yeejoin.amos.boot.module.tcm.biz.service.impl.TzsUserInfoServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
import java.util.Map;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
......@@ -39,6 +23,8 @@ import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
;
@RestController
@Api(tags = "统计")
@RequestMapping(value = "/twoStaff")
......@@ -80,4 +66,11 @@ public class TzsTwoStaffingController extends BaseController {
return ResponseHelper.buildResponse(tzsTwoStaffingService.getStatisticsMessage(list));
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/generateTwoStaffingStatistics")
@ApiOperation(httpMethod = "GET", value = "生成两员配备统计", notes = "生成两员配备统计")
public ResponseModel<Object> generateTwoStaffingStatistics() {
tzsTwoStaffingService.generateTwoStaffingStatistics();
return ResponseHelper.buildResponse(null);
}
}
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