Commit 949695f2 authored by litengwei's avatar litengwei

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 276bcc4f 5de65a60
package com.yeejoin.amos.boot.module.tcm.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
*
*
......@@ -18,53 +22,72 @@ public class TzsTwoStaffingCompanyDto {
@ApiModelProperty(value = "监管单位ID")
@ExcelIgnore
private String sequenceNbr;
@ApiModelProperty(value = "监管单位名称")
@ExcelProperty(value = "管辖机构", index = 0)
private String superviseOrgName;
@ApiModelProperty(value = "监管单位orgCode")
@ExcelIgnore
private String superviseOrgCode;
@ApiModelProperty(value = "单位类型")
@ExcelProperty(value = "单位类型", index = 1)
private String unitType;
@ApiModelProperty(value = "企业名称")
@ExcelProperty(value = "企业名称", index = 2)
private String useUnit;
@ApiModelProperty(value = "企业编码")
@ExcelProperty(value = "企业编码", index = 3)
private String useCode;
@ApiModelProperty(value = "企业类型")
@ApiModelProperty(value = "主要负责人")
@ExcelIgnore
private String mainCharger;
@ApiModelProperty(value = "完成配备")
@ExcelProperty(value = "完成配备", index = 4)
private String completeNormal;
@ApiModelProperty(value = "使用单位完成配备")
@ExcelIgnore
private String useDone;
@ApiModelProperty(value = "生产单位完成配备")
@ExcelIgnore
private String productDone;
@ApiModelProperty(value = "使用且生产完成配备")
@ExcelIgnore
private String allDone;
//下述字段待定
@ApiModelProperty(value = "主要负责人数")
@ExcelIgnore
private String mainNum;
@ApiModelProperty(value = "安全总监数")
@ExcelIgnore
private String majordomoNum;
@ApiModelProperty(value = "安全员数")
@ExcelIgnore
private String safetyNum;
@ApiModelProperty(value = "质量安全总监数")
@ExcelIgnore
private String QualityMajNumber;
@ApiModelProperty(value = "质量安全员数")
@ExcelIgnore
private String QualitySafetyNum;
@ExcelIgnore
List<String> ids;
}
......@@ -19,11 +19,13 @@
<if test="companyDto.useCode != '' and companyDto.useCode != null">
and use_code like concat('%',#{companyDto.useCode},'%')
</if>
<if test="companyDto.completeNormal != '' and companyDto.completeNormal == 1 ">
and (useDone = '1' or productDone = '1')
<if test="companyDto.useCode != '' and companyDto.useCode != null">
and completeNormal like concat('%',#{companyDto.completeNormal},'%')
</if>
<if test="companyDto.completeNormal != '' and companyDto.completeNormal == 0 ">
and useDone = '0' and productDone = '0'
<if test='companyDto.ids != null and companyDto.ids.size > 0'> and sequence_nbr in
<foreach collection="companyDto.ids" item="id" open="(" close=")" separator=",">
#{id}
</foreach>
</if>
</select>
<select id="getListByOrgCode" resultType="com.yeejoin.amos.boot.module.tcm.api.entity.TzsTwoStaffing">
......
......@@ -2,42 +2,29 @@ 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.biz.common.excel.ExcelUtil;
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.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;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
@RestController
@Api(tags = "统计")
......@@ -69,6 +56,20 @@ public class TzsTwoStaffingController extends BaseController {
return ResponseHelper.buildResponse(tzsTwoStaffingService.getCompanyList(orgCode, companyDto,page));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/exportCompanyData")
@ApiOperation(httpMethod = "GET", value = "企业两员配备情况导出", notes = "企业两员配备情况导出")
public void exportData(HttpServletResponse response,
@RequestParam(value = "orgCode") String orgCode,
TzsTwoStaffingCompanyDto dto) {
Page<TzsTwoStaffingCompanyDto> page = new Page<>();
page.setCurrent(1);
page.setSize(Long.MAX_VALUE);
List<TzsTwoStaffingCompanyDto> equipExportData = tzsTwoStaffingService.getCompanyList(orgCode, dto, page).getRecords();
ExcelUtil.createTemplate(response, "企业两员配备情况", "企业两员配备情况", equipExportData, TzsTwoStaffingCompanyDto.class, null, false);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getStatisticsMessage")
......
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