包头bug修改
This commit is contained in:
parent
0809e6fa6c
commit
a98b9c897c
@ -1,33 +1,31 @@
|
||||
package com.zhgd.xmgl.modules.baotou.controller;
|
||||
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.vo.PartyConstructionMemberStats;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.PartyConstructionMember;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IPartyConstructionMemberService;
|
||||
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.PartyConstructionMember;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.vo.PartyConstructionMemberStats;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IPartyConstructionMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 组织建设成员
|
||||
* @author: pds
|
||||
* @date: 2024-08-28
|
||||
* @date: 2024-08-28
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@ -35,95 +33,112 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Slf4j
|
||||
@Api(tags = "组织建设成员相关Api")
|
||||
public class PartyConstructionMemberController {
|
||||
@Autowired
|
||||
private IPartyConstructionMemberService partyConstructionMemberService;
|
||||
@Autowired
|
||||
private IPartyConstructionMemberService partyConstructionMemberService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "组织建设成员管理", operType = "分页查询", operDesc = "分页列表查询组织建设成员信息")
|
||||
@ApiOperation(value = "分页列表查询组织建设成员信息", notes = "分页列表查询组织建设成员信息", httpMethod="GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "getChildPartyConstructionMemberId", value = "获取自己及子级下的成员的组织建设组织id", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<PartyConstructionMember>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(partyConstructionMemberService.queryPageList(param));
|
||||
}
|
||||
@ApiOperation(value = "分页列表查询组织建设成员信息", notes = "分页列表查询组织建设成员信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "getChildPartyConstructionMemberId", value = "获取自己及子级下的成员的组织建设组织id", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<PartyConstructionMember>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(partyConstructionMemberService.queryPageList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "组织建设成员管理", operType = "列表查询", operDesc = "列表查询组织建设成员信息")
|
||||
@ApiOperation(value = "列表查询组织建设成员信息", notes = "列表查询组织建设成员信息", httpMethod="GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PartyConstructionMember>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(partyConstructionMemberService.queryList(param));
|
||||
}
|
||||
@ApiOperation(value = "列表查询组织建设成员信息", notes = "列表查询组织建设成员信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PartyConstructionMember>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(partyConstructionMemberService.queryList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param partyConstructionMember
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param partyConstructionMember
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "组织建设成员管理", operType = "添加", operDesc = "添加组织建设成员信息")
|
||||
@ApiOperation(value = "添加组织建设成员信息", notes = "添加组织建设成员信息" , httpMethod="POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<PartyConstructionMember> add(@RequestBody @Validate PartyConstructionMember partyConstructionMember) {
|
||||
partyConstructionMemberService.add(partyConstructionMember);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param partyConstructionMember
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "组织建设成员管理", operType = "编辑", operDesc = "编辑组织建设成员信息")
|
||||
@ApiOperation(value = "编辑组织建设成员信息", notes = "编辑组织建设成员信息" , httpMethod="POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<PartyConstructionMember> edit(@RequestBody PartyConstructionMember partyConstructionMember) {
|
||||
partyConstructionMemberService.edit(partyConstructionMember);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "组织建设成员管理", operType = "删除", operDesc = "删除组织建设成员信息")
|
||||
@ApiOperation(value = "删除组织建设成员信息", notes = "删除组织建设成员信息" , httpMethod="POST")
|
||||
@ApiImplicitParam(name = "id", value = "组织建设成员ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<PartyConstructionMember> delete(@ApiIgnore @RequestBody HashMap<String ,Object> map) {
|
||||
partyConstructionMemberService.delete(MapUtils.getString(map, "id"));
|
||||
@ApiOperation(value = "添加组织建设成员信息", notes = "添加组织建设成员信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<PartyConstructionMember> add(@RequestBody @Validate PartyConstructionMember partyConstructionMember) {
|
||||
partyConstructionMemberService.add(partyConstructionMember);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param partyConstructionMember
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "组织建设成员管理", operType = "编辑", operDesc = "编辑组织建设成员信息")
|
||||
@ApiOperation(value = "编辑组织建设成员信息", notes = "编辑组织建设成员信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<PartyConstructionMember> edit(@RequestBody PartyConstructionMember partyConstructionMember) {
|
||||
partyConstructionMemberService.edit(partyConstructionMember);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "组织建设成员管理", operType = "删除", operDesc = "删除组织建设成员信息")
|
||||
@ApiOperation(value = "删除组织建设成员信息", notes = "删除组织建设成员信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "组织建设成员ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<PartyConstructionMember> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
partyConstructionMemberService.delete(MapUtils.getString(map, "id"));
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "组织建设成员管理", operType = "通过id查询", operDesc = "通过id查询组织建设成员信息")
|
||||
@ApiOperation(value = "通过id查询组织建设成员信息", notes = "通过id查询组织建设成员信息" , httpMethod="GET")
|
||||
@ApiImplicitParam(name = "id", value = "组织建设成员ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<PartyConstructionMember> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
return Result.success(partyConstructionMemberService.queryById(id));
|
||||
}
|
||||
@ApiOperation(value = "通过id查询组织建设成员信息", notes = "通过id查询组织建设成员信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "组织建设成员ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<PartyConstructionMember> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
return Result.success(partyConstructionMemberService.queryById(id));
|
||||
}
|
||||
|
||||
@OperLog(operModul = "组织建设成员管理", operType = "通过id查询", operDesc = "党员統计")
|
||||
@ApiOperation(value = "党员統计", notes = "党员統计" , httpMethod="GET")
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String")
|
||||
@GetMapping(value = "/stats")
|
||||
public Result<PartyConstructionMemberStats> stats(@RequestParam String projectSn) {
|
||||
return Result.success(partyConstructionMemberService.stats(projectSn));
|
||||
}
|
||||
@OperLog(operModul = "组织建设成员管理", operType = "通过id查询", operDesc = "党员統计")
|
||||
@ApiOperation(value = "党员統计", notes = "党员統计", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String")
|
||||
@GetMapping(value = "/stats")
|
||||
public Result<PartyConstructionMemberStats> stats(@RequestParam String projectSn) {
|
||||
return Result.success(partyConstructionMemberService.stats(projectSn));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@OperLog(operModul = "组织建设成员管理", operType = "添加", operDesc = "从人员管理录入成员")
|
||||
@ApiOperation(value = "从人员管理录入成员", notes = "从人员管理录入成员", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "workerIds", value = "人员ids(多个,分割)", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "classifyId", value = "组织id", paramType = "query", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/addFromWorker")
|
||||
public Result addFromWorker(@RequestBody @Validate HashMap<String, Object> param) {
|
||||
partyConstructionMemberService.addFromWorker(param);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,13 +63,6 @@ public class PartyConstructionOrganizationController {
|
||||
return Result.success(partyConstructionOrganizationService.queryList(param));
|
||||
}
|
||||
|
||||
@OperLog(operModul = "组织建设组织管理", operType = "列表查询", operDesc = "树形列表查询组织建设组织信息")
|
||||
@ApiOperation(value = "树形列表查询组织建设组织信息", notes = "树形列表查询组织建设组织信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/tree/list")
|
||||
public Result<List<PartyConstructionOrganization>> queryTreeList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(partyConstructionOrganizationService.queryTreeList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
@ -126,4 +119,11 @@ public class PartyConstructionOrganizationController {
|
||||
return Result.success(partyConstructionOrganizationService.queryById(id));
|
||||
}
|
||||
|
||||
@OperLog(operModul = "组织建设组织管理", operType = "列表查询", operDesc = "树形列表查询组织建设组织信息")
|
||||
@ApiOperation(value = "树形列表查询组织建设组织信息", notes = "树形列表查询组织建设组织信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/tree/list")
|
||||
public Result<List<PartyConstructionOrganization>> queryTreeList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(partyConstructionOrganizationService.queryTreeList(param));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,149 @@
|
||||
package com.zhgd.xmgl.modules.baotou.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.SunshineConstructionList;
|
||||
import com.zhgd.xmgl.modules.baotou.service.ISunshineConstructionListService;
|
||||
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 施工管理过程公开列表
|
||||
* @author: pds
|
||||
* @date: 2025-03-07
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/sunshineConstructionList")
|
||||
@Slf4j
|
||||
@Api(tags = "施工管理过程公开列表相关Api")
|
||||
public class SunshineConstructionListController {
|
||||
@Autowired
|
||||
private ISunshineConstructionListService sunshineConstructionListService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "施工管理过程公开列表管理", operType = "分页查询", operDesc = "分页列表查询施工管理过程公开列表信息")
|
||||
@ApiOperation(value = "分页列表查询施工管理过程公开列表信息", notes = "分页列表查询施工管理过程公开列表信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<SunshineConstructionList>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(sunshineConstructionListService.queryPageList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "施工管理过程公开列表管理", operType = "列表查询", operDesc = "列表查询施工管理过程公开列表信息")
|
||||
@ApiOperation(value = "列表查询施工管理过程公开列表信息", notes = "列表查询施工管理过程公开列表信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<SunshineConstructionList>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
return Result.success(sunshineConstructionListService.queryList(param));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param sunshineConstructionList
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "施工管理过程公开列表管理", operType = "添加", operDesc = "添加施工管理过程公开列表信息")
|
||||
@ApiOperation(value = "添加施工管理过程公开列表信息", notes = "添加施工管理过程公开列表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<SunshineConstructionList> add(@RequestBody @Validate SunshineConstructionList sunshineConstructionList) {
|
||||
sunshineConstructionListService.add(sunshineConstructionList);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param sunshineConstructionList
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "施工管理过程公开列表管理", operType = "编辑", operDesc = "编辑施工管理过程公开列表信息")
|
||||
@ApiOperation(value = "编辑施工管理过程公开列表信息", notes = "编辑施工管理过程公开列表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<SunshineConstructionList> edit(@RequestBody SunshineConstructionList sunshineConstructionList) {
|
||||
sunshineConstructionListService.edit(sunshineConstructionList);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "施工管理过程公开列表管理", operType = "删除", operDesc = "删除施工管理过程公开列表信息")
|
||||
@ApiOperation(value = "删除施工管理过程公开列表信息", notes = "删除施工管理过程公开列表信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "施工管理过程公开列表ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<SunshineConstructionList> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
sunshineConstructionListService.delete(MapUtils.getString(map, "id"));
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "施工管理过程公开列表管理", operType = "通过id查询", operDesc = "通过id查询施工管理过程公开列表信息")
|
||||
@ApiOperation(value = "通过id查询施工管理过程公开列表信息", notes = "通过id查询施工管理过程公开列表信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "施工管理过程公开列表ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<SunshineConstructionList> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
return Result.success(sunshineConstructionListService.queryById(id));
|
||||
}
|
||||
|
||||
}
|
||||
@ -134,6 +134,9 @@ public class WorkerAdmissionController {
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IProjectGroupService projectGroupService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IPartyConstructionOrganizationService partyConstructionOrganizationService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@ -536,6 +539,16 @@ public class WorkerAdmissionController {
|
||||
return null;
|
||||
}
|
||||
|
||||
// @OperLog(operModul = "人员入场管理", operType = "", operDesc = "人员入场导入模板下载")
|
||||
// @ApiOperation(value = "人员入场导入模板下载", notes = "人员入场导入模板下载", httpMethod = "GET")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
// })
|
||||
// @GetMapping(value = "/exportExcelWorkAdmissionTemplate")
|
||||
// public void exportExcelWorkAdmissionTemplate(HttpServletResponse response, String projectSn) {
|
||||
// workerAdmissionService.exportExcelWorkAdmissionTemplate(response, projectSn);
|
||||
// }
|
||||
|
||||
@ApiOperation(value = "根据“导出人员申请表”查询身份证号列表", notes = "根据“导出人员申请表”查询身份证号列表", httpMethod = "POST")
|
||||
@PostMapping(value = "/getIdCardsByExcel")
|
||||
public Result getIdCardsByExcel(@RequestParam(value = "file") MultipartFile file, @RequestParam String projectSn) throws Exception {
|
||||
@ -594,14 +607,14 @@ public class WorkerAdmissionController {
|
||||
}
|
||||
}
|
||||
|
||||
@OperLog(operModul = "人员入场管理", operType = "", operDesc = "人员入场导入模板下载")
|
||||
@ApiOperation(value = "人员入场导入模板下载", notes = "人员入场导入模板下载", httpMethod = "GET")
|
||||
@OperLog(operModul = "人员入场管理", operType = "", operDesc = "人员入场导入zip模板下载")
|
||||
@ApiOperation(value = "人员入场导入zip模板下载", notes = "人员入场导入zip模板下载", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
||||
})
|
||||
@GetMapping(value = "/exportExcelWorkAdmissionTemplate")
|
||||
public void exportExcelWorkAdmissionTemplate(HttpServletResponse response, String projectSn) {
|
||||
workerAdmissionService.exportExcelWorkAdmissionTemplate(response, projectSn);
|
||||
@GetMapping(value = "/exportZipWorkAdmissionTemplate")
|
||||
public void exportZipWorkAdmissionTemplate(HttpServletResponse response, String projectSn) {
|
||||
workerAdmissionService.exportZipWorkAdmissionTemplate(response, projectSn);
|
||||
}
|
||||
|
||||
@OperLog(operModul = "人员入场管理", operType = "", operDesc = "读取导入的人员入场excel模板数据")
|
||||
@ -726,8 +739,9 @@ public class WorkerAdmissionController {
|
||||
Map<String, DictionariesRecord> certTypeMap = dictionariesRecordService.selectCertTypeList(new MapBuilder<String, Object>()
|
||||
.put("type", 1)
|
||||
.build()).stream().collect(Collectors.toMap(DictionariesRecord::getDictionaryName, Function.identity(), (o1, o2) -> o1));
|
||||
;
|
||||
List<String> isc = Arrays.asList("市场监督管理局", "应急管理局", "住房和城乡建设厅", "人力资源和社会保障部(厅)");
|
||||
Map<String, PartyConstructionOrganization> orgMap = partyConstructionOrganizationService.list(new LambdaQueryWrapper<PartyConstructionOrganization>()
|
||||
.eq(PartyConstructionOrganization::getProjectSn, projectSn)).stream().collect(Collectors.toMap(PartyConstructionOrganization::getClassificationName, Function.identity(), (o1, o2) -> o1));
|
||||
for (Map<String, String> importInfo : list) {
|
||||
UploadZipWorkAdmissionVo detail = new UploadZipWorkAdmissionVo();
|
||||
detail.setNum(importInfo.get("*编号"));
|
||||
@ -757,6 +771,34 @@ public class WorkerAdmissionController {
|
||||
detail.setIssueTime(StrUtil.isNotBlank(issueTime) ? DateUtil.formatDate(DateUtil.parse(issueTime)) : null);
|
||||
String effectTime = importInfo.get("截止日期");
|
||||
detail.setEffectTime(StrUtil.isNotBlank(effectTime) ? DateUtil.formatDate(DateUtil.parse(effectTime)) : null);
|
||||
detail.setPartyPosition(importInfo.get("党内职务"));
|
||||
detail.setNativePlace(importInfo.get("籍贯"));
|
||||
detail.setNation(importInfo.get("民族"));
|
||||
List<String> ps = Arrays.asList("群众",
|
||||
"正式党员",
|
||||
"预备党员");
|
||||
int p = ps.indexOf(importInfo.get("政治面貌"));
|
||||
detail.setPoliticsStatus(p != -1 ? p + 1 : null);
|
||||
detail.setPoliticsStatusStr(importInfo.get("政治面貌"));
|
||||
List<String> edus = Arrays.asList("小学",
|
||||
"初中",
|
||||
"中专",
|
||||
"高中",
|
||||
"大专",
|
||||
"本科",
|
||||
"研究生",
|
||||
"博士",
|
||||
"博士后");
|
||||
int edu = edus.indexOf(importInfo.get("学历"));
|
||||
detail.setEducational(edu != -1 ? edu + 1 : null);
|
||||
detail.setEducationalStr(importInfo.get("学历"));
|
||||
PartyConstructionOrganization organization = orgMap.get(importInfo.get("支部名称"));
|
||||
if (organization != null) {
|
||||
List<String> ids = StrUtil.split(organization.getAncestors(), ",");
|
||||
ids.remove("0");
|
||||
ids.add(organization.getId() + "");
|
||||
detail.setBranchIdStr(StrUtil.join("-", ids));
|
||||
}
|
||||
admissionVos.add(detail);
|
||||
}
|
||||
return admissionVos;
|
||||
|
||||
@ -73,14 +73,22 @@ public class PartyConstructionMember implements Serializable {
|
||||
@Excel(name = "所属项目SN", width = 15)
|
||||
@ApiModelProperty(value="所属项目SN")
|
||||
private java.lang.String projectSn ;
|
||||
/**创建时间*/
|
||||
@ApiModelProperty(value="创建时间")
|
||||
private java.util.Date createDate ;
|
||||
/**更新时间*/
|
||||
@ApiModelProperty(value="更新时间")
|
||||
private java.util.Date updateDate ;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createDate;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateDate;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "劳务人员名称")
|
||||
private java.lang.String workerName;
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "组织建设组织名称")
|
||||
private java.lang.String classificationName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value="劳务人员名称")
|
||||
private java.lang.String workerName ;
|
||||
}
|
||||
|
||||
@ -0,0 +1,76 @@
|
||||
package com.zhgd.xmgl.modules.baotou.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @Description: 施工管理过程公开列表
|
||||
* @author: pds
|
||||
* @date: 2025-03-07
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("sunshine_construction_list")
|
||||
@ApiModel(value = "SunshineConstructionList实体类", description = "SunshineConstructionList")
|
||||
public class SunshineConstructionList implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Long id;
|
||||
/**
|
||||
* 阳光工程id
|
||||
*/
|
||||
@ApiModelProperty(value = "阳光工程id")
|
||||
private java.lang.Long sunshineId;
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ApiModelProperty(value = "标题")
|
||||
private java.lang.String title;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@ApiModelProperty(value = "内容")
|
||||
private java.lang.String content;
|
||||
/**
|
||||
* 所属项目SN
|
||||
*/
|
||||
@ApiModelProperty(value = "所属项目SN")
|
||||
private java.lang.String projectSn;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createDate;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateDate;
|
||||
/**
|
||||
* 记录时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "记录时间")
|
||||
private java.util.Date recordDate;
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
@ApiModelProperty(value = "附件")
|
||||
private java.lang.String attachment;
|
||||
}
|
||||
@ -29,20 +29,40 @@ public class SunshineProject implements Serializable {
|
||||
private java.lang.Long id ;
|
||||
/**标题*/
|
||||
@ApiModelProperty(value="标题")
|
||||
private java.lang.String title ;
|
||||
/**内容*/
|
||||
@ApiModelProperty(value="内容")
|
||||
private java.lang.String content ;
|
||||
/**类型:1:招标过程;2:资金使用公开;3:施工管理过程;4:交工验收;5:非招标类物资 服务采购公开;6:征地管理;7:重大合同及设计变更公开;8:装置投用运行效果后评价公开;9:各类检查;*/
|
||||
@ApiModelProperty(value="类型:1:招标过程;2:资金使用公开;3:施工管理过程;4:交工验收;5:非招标类物资 服务采购公开;6:征地管理;7:重大合同及设计变更公开;8:装置投用运行效果后评价公开;9:各类检查;")
|
||||
private java.lang.Integer type ;
|
||||
/**所属项目SN*/
|
||||
@ApiModelProperty(value="所属项目SN")
|
||||
private java.lang.String projectSn ;
|
||||
/**创建时间*/
|
||||
@ApiModelProperty(value="创建时间")
|
||||
private java.util.Date createDate ;
|
||||
/**更新时间*/
|
||||
@ApiModelProperty(value="更新时间")
|
||||
private java.util.Date updateDate ;
|
||||
private java.lang.String title;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@ApiModelProperty(value = "内容")
|
||||
private java.lang.String content;
|
||||
/**
|
||||
* 类型:1:招标过程;2:资金使用公开;3:施工管理过程;4:交工验收;5:非招标类物资 服务采购公开;6:征地管理;7:重大合同及设计变更公开;8:装置投用运行效果后评价公开;9:各类检查;
|
||||
*/
|
||||
@ApiModelProperty(value = "类型:1:招标过程;2:资金使用公开;3:施工管理过程;4:交工验收;5:非招标类物资 服务采购公开;6:征地管理;7:重大合同及设计变更公开;8:装置投用运行效果后评价公开;9:各类检查;")
|
||||
private java.lang.Integer type;
|
||||
/**
|
||||
* 所属项目SN
|
||||
*/
|
||||
@ApiModelProperty(value = "所属项目SN")
|
||||
private java.lang.String projectSn;
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
@Excel(name = "附件", width = 15)
|
||||
@ApiModelProperty(value = "附件")
|
||||
private java.lang.String attachment;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "记录时间 yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date recordDate;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createDate;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateDate;
|
||||
}
|
||||
|
||||
@ -185,6 +185,42 @@ public class WorkerAdmissionDetail implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty(value = "区域项目组")
|
||||
private java.lang.Long projectGroup;
|
||||
/**
|
||||
* 党内职务
|
||||
*/
|
||||
@Excel(name = "党内职务", width = 15)
|
||||
@ApiModelProperty(value = "党内职务")
|
||||
private java.lang.String partyPosition;
|
||||
/**
|
||||
* 籍贯
|
||||
*/
|
||||
@Excel(name = "籍贯", width = 15)
|
||||
@ApiModelProperty(value = "籍贯")
|
||||
private java.lang.String nativePlace;
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@Excel(name = "民族", width = 15)
|
||||
@ApiModelProperty(value = "民族")
|
||||
private java.lang.String nation;
|
||||
/**
|
||||
* 政治面貌:1:群众,2:正式党员,3:预备党员
|
||||
*/
|
||||
@Excel(name = "政治面貌:1:群众,2:正式党员,3:预备党员", width = 15)
|
||||
@ApiModelProperty(value = "政治面貌:1:群众,2:正式党员,3:预备党员")
|
||||
private java.lang.Integer politicsStatus;
|
||||
/**
|
||||
* 学历:1小学、2初中、3中专、4高中、5大专、6本科、7研究生、8博士、9博士后
|
||||
*/
|
||||
@Excel(name = "学历:1小学、2初中、3中专、4高中、5大专、6本科、7研究生、8博士、9博士后", width = 15)
|
||||
@ApiModelProperty(value = "学历:1小学、2初中、3中专、4高中、5大专、6本科、7研究生、8博士、9博士后")
|
||||
private java.lang.Integer educational;
|
||||
/**
|
||||
* 支部名称Id
|
||||
*/
|
||||
@Excel(name = "支部名称Id", width = 15)
|
||||
@ApiModelProperty(value = "支部名称Id")
|
||||
private java.lang.Long branchId;
|
||||
@TableField(exist = false)
|
||||
private String random;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ -14,143 +15,143 @@ public class UploadZipWorkAdmissionVo {
|
||||
* id
|
||||
*/
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Long id;
|
||||
private Long id;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@ApiModelProperty(value = "编号")
|
||||
private java.lang.String num;
|
||||
private String num;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private java.lang.String workerName;
|
||||
private String workerName;
|
||||
/**
|
||||
* 人脸采集照片
|
||||
*/
|
||||
@ApiModelProperty(value = "人脸采集照片")
|
||||
private java.lang.String fieldAcquisitionUrl;
|
||||
private String fieldAcquisitionUrl;
|
||||
/**
|
||||
* 身份证人像面
|
||||
*/
|
||||
@ApiModelProperty(value = "身份证人像面")
|
||||
private java.lang.String idCardDownPhotoUrl;
|
||||
private String idCardDownPhotoUrl;
|
||||
/**
|
||||
* 身份证国徽面
|
||||
*/
|
||||
@ApiModelProperty(value = "身份证国徽面")
|
||||
private java.lang.String idCardUpPhotoUrl;
|
||||
private String idCardUpPhotoUrl;
|
||||
/**
|
||||
* EPC承包商
|
||||
*/
|
||||
@ApiModelProperty(value = "EPC承包商")
|
||||
private java.lang.Long epcCbs;
|
||||
private Long epcCbs;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@ApiModelProperty(value = "单位")
|
||||
private java.lang.Long enterpriseId;
|
||||
private Long enterpriseId;
|
||||
/**
|
||||
* 工作区域(装置)
|
||||
*/
|
||||
@ApiModelProperty(value = "工作区域(装置)")
|
||||
private java.lang.String workAreaName;
|
||||
private String workAreaName;
|
||||
/**
|
||||
* 岗位(工种)
|
||||
*/
|
||||
@ApiModelProperty(value = "岗位(工种)")
|
||||
private java.lang.Long postWorkType;
|
||||
private Long postWorkType;
|
||||
/**
|
||||
* 班组
|
||||
*/
|
||||
@ApiModelProperty(value = "班组")
|
||||
private java.lang.String team;
|
||||
private String team;
|
||||
/**
|
||||
* 性别,1男,2女
|
||||
*/
|
||||
@ApiModelProperty(value = "性别,1男,2女")
|
||||
private java.lang.Integer sex;
|
||||
private Integer sex;
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@ApiModelProperty(value = "年龄")
|
||||
private java.lang.String age;
|
||||
private String age;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private java.lang.String idCard;
|
||||
private String idCard;
|
||||
/**
|
||||
* 劳动合同
|
||||
*/
|
||||
@ApiModelProperty(value = "劳动合同")
|
||||
private java.lang.String laborContract;
|
||||
private String laborContract;
|
||||
/**
|
||||
* 保险
|
||||
*/
|
||||
@ApiModelProperty(value = "保险")
|
||||
private java.lang.String insurance;
|
||||
private String insurance;
|
||||
/**
|
||||
* 体检报告
|
||||
*/
|
||||
@ApiModelProperty(value = "体检报告")
|
||||
private java.lang.String examinationImage;
|
||||
private String examinationImage;
|
||||
/**
|
||||
* 截止入场日期
|
||||
*/
|
||||
@ApiModelProperty(value = "截止入场日期")
|
||||
private java.lang.String entryDeadline;
|
||||
private String entryDeadline;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private java.lang.String remark;
|
||||
private String remark;
|
||||
/**
|
||||
* 项目sn
|
||||
*/
|
||||
@ApiModelProperty(value = "项目sn")
|
||||
private java.lang.String projectSn;
|
||||
private String projectSn;
|
||||
/**
|
||||
* 人员类型 1、劳务人员,2、管理人员,3临时人员
|
||||
*/
|
||||
@ApiModelProperty(value = "人员类型 1、劳务人员,2、管理人员,3临时人员")
|
||||
private java.lang.Integer personType;
|
||||
private Integer personType;
|
||||
/**
|
||||
* 人员入场ID
|
||||
*/
|
||||
@ApiModelProperty(value = "人员入场ID")
|
||||
private java.lang.Long workerAdmissionId;
|
||||
private Long workerAdmissionId;
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
@ApiModelProperty(value = "出生日期")
|
||||
private java.lang.String birthday;
|
||||
private String birthday;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createDate;
|
||||
private Date createDate;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateDate;
|
||||
private Date updateDate;
|
||||
@ApiModelProperty(value = "联系电话")
|
||||
private java.lang.String phone;
|
||||
private String phone;
|
||||
@ApiModelProperty(value = "资质是否合格0不合格1合格")
|
||||
private java.lang.Integer isCertificateQualified;
|
||||
private Integer isCertificateQualified;
|
||||
@ApiModelProperty(value = "1已经录入0未录入")
|
||||
private Integer isImport;
|
||||
|
||||
@ApiModelProperty(value = "EPC承包商名称")
|
||||
private java.lang.String epcCbsName;
|
||||
private String epcCbsName;
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private java.lang.String enterpriseName;
|
||||
private String enterpriseName;
|
||||
@ApiModelProperty(value = "岗位(工种)名称")
|
||||
private java.lang.String postWorkTypeName;
|
||||
private String postWorkTypeName;
|
||||
@ApiModelProperty(value = "成绩")
|
||||
private java.lang.String score;
|
||||
private String score;
|
||||
@ApiModelProperty(value = "是否合格")
|
||||
private Integer isPass;
|
||||
@ApiModelProperty(value = "开始考试时间")
|
||||
@ -158,50 +159,89 @@ public class UploadZipWorkAdmissionVo {
|
||||
@ApiModelProperty(value = "考试记录id")
|
||||
private Long recordId;
|
||||
@ApiModelProperty(value = "办证人")
|
||||
private java.lang.Long certificateIssuingPerson;
|
||||
private Long certificateIssuingPerson;
|
||||
|
||||
/**
|
||||
* 资格证书编号
|
||||
*/
|
||||
@ApiModelProperty(value = "资格证书编号")
|
||||
private java.lang.String certificateNumber;
|
||||
private String certificateNumber;
|
||||
/**
|
||||
* 证书类型
|
||||
*/
|
||||
@ApiModelProperty(value = "证书类型")
|
||||
private java.lang.Integer certificateType;
|
||||
private Integer certificateType;
|
||||
/**
|
||||
* 证书签发单位:1:市场监督管理局;2:应急管理局;3:住房和城乡建设厅;4:人力资源和社会保障部(厅);
|
||||
*/
|
||||
@ApiModelProperty(value = "证书签发单位:1:市场监督管理局;2:应急管理局;3:住房和城乡建设厅;4:人力资源和社会保障部(厅);")
|
||||
private java.lang.Integer issueCompany;
|
||||
private Integer issueCompany;
|
||||
/**
|
||||
* 签发日期
|
||||
*/
|
||||
@ApiModelProperty(value = "签发日期")
|
||||
private java.lang.String issueTime;
|
||||
private String issueTime;
|
||||
/**
|
||||
* 截止有效日期
|
||||
*/
|
||||
@ApiModelProperty(value = "截止有效日期")
|
||||
private java.lang.String effectTime;
|
||||
private String effectTime;
|
||||
/**
|
||||
* 证书图片路径
|
||||
*/
|
||||
@ApiModelProperty(value = "证书图片路径")
|
||||
private java.lang.String photoUrl;
|
||||
private String photoUrl;
|
||||
/**
|
||||
* 资质验证
|
||||
*/
|
||||
@ApiModelProperty(value = "资质验证")
|
||||
private java.lang.String qualificationVerification;
|
||||
private String qualificationVerification;
|
||||
/**
|
||||
* 人员入场明细ID
|
||||
*/
|
||||
@ApiModelProperty(value = "人员入场明细ID")
|
||||
private java.lang.Long workerAdmissionDetailId;
|
||||
private Long workerAdmissionDetailId;
|
||||
@ApiModelProperty(value = "证书类型名称")
|
||||
private java.lang.String certificateTypeName;
|
||||
private String certificateTypeName;
|
||||
@ApiModelProperty(value = "区域项目组")
|
||||
private java.lang.Long projectGroup;
|
||||
private Long projectGroup;
|
||||
/**
|
||||
* 党内职务
|
||||
*/
|
||||
@Excel(name = "党内职务", width = 15)
|
||||
@ApiModelProperty(value = "党内职务")
|
||||
private String partyPosition;
|
||||
/**
|
||||
* 籍贯
|
||||
*/
|
||||
@Excel(name = "籍贯", width = 15)
|
||||
@ApiModelProperty(value = "籍贯")
|
||||
private String nativePlace;
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@Excel(name = "民族", width = 15)
|
||||
@ApiModelProperty(value = "民族")
|
||||
private String nation;
|
||||
/**
|
||||
* 政治面貌:1:群众,2:正式党员,3:预备党员
|
||||
*/
|
||||
@Excel(name = "政治面貌:1:群众,2:正式党员,3:预备党员", width = 15)
|
||||
@ApiModelProperty(value = "政治面貌:1:群众,2:正式党员,3:预备党员")
|
||||
private Integer politicsStatus;
|
||||
private String politicsStatusStr;
|
||||
/**
|
||||
* 学历:1小学、2初中、3中专、4高中、5大专、6本科、7研究生、8博士、9博士后
|
||||
*/
|
||||
@Excel(name = "学历:1小学、2初中、3中专、4高中、5大专、6本科、7研究生、8博士、9博士后", width = 15)
|
||||
@ApiModelProperty(value = "学历:1小学、2初中、3中专、4高中、5大专、6本科、7研究生、8博士、9博士后")
|
||||
private Integer educational;
|
||||
private String educationalStr;
|
||||
/**
|
||||
* 支部名称Id
|
||||
*/
|
||||
@Excel(name = "支部名称Id", width = 15)
|
||||
@ApiModelProperty(value = "支部名称Id")
|
||||
private Long branchId;
|
||||
private String branchIdStr;
|
||||
}
|
||||
|
||||
@ -0,0 +1,51 @@
|
||||
package com.zhgd.xmgl.modules.baotou.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.zhgd.xmgl.modules.baotou.entity.SunshineConstructionList;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 施工管理过程公开列表
|
||||
* @author: pds
|
||||
* @date: 2025-03-07
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface SunshineConstructionListMapper extends BaseMapper<SunshineConstructionList> {
|
||||
|
||||
/**
|
||||
* 分页列表查询施工管理过程公开列表信息
|
||||
*
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
IPage<SunshineConstructionList> queryList(Page<SunshineConstructionList> page, @Param(Constants.WRAPPER) QueryWrapper<SunshineConstructionList> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询施工管理过程公开列表信息
|
||||
*
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<SunshineConstructionList> queryList(@Param(Constants.WRAPPER) QueryWrapper<SunshineConstructionList> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询施工管理过程公开列表信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
SunshineConstructionList queryById(String id);
|
||||
}
|
||||
@ -6,6 +6,7 @@
|
||||
select *
|
||||
from (select t.*,
|
||||
wi.worker_name
|
||||
,pco.classification_name
|
||||
from party_construction_member t
|
||||
left join worker_info wi on wi.id=t.worker_info_id
|
||||
join party_construction_organization pco on t.party_construction_organization_id=pco.id
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
<?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.zhgd.xmgl.modules.baotou.mapper.SunshineConstructionListMapper">
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.baotou.entity.SunshineConstructionList">
|
||||
select * from (
|
||||
select t.*
|
||||
from sunshine_construction_list t
|
||||
)t
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
<select id="queryById" resultType="com.zhgd.xmgl.modules.baotou.entity.SunshineConstructionList">
|
||||
select * from (
|
||||
select t.*
|
||||
from sunshine_construction_list t
|
||||
)t
|
||||
where t.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -45,12 +45,16 @@ public interface IPartyConstructionMemberService extends IService<PartyConstruct
|
||||
* @return
|
||||
*/
|
||||
void delete(String id);
|
||||
|
||||
/**
|
||||
* 根据id查询组织建设成员信息
|
||||
*
|
||||
* @param id 组织建设成员的id
|
||||
* @return
|
||||
*/
|
||||
PartyConstructionMember queryById(String id);
|
||||
|
||||
PartyConstructionMemberStats stats(String projectSn);
|
||||
|
||||
void addFromWorker(HashMap<String, Object> param);
|
||||
}
|
||||
|
||||
@ -0,0 +1,65 @@
|
||||
package com.zhgd.xmgl.modules.baotou.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.baotou.entity.SunshineConstructionList;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 施工管理过程公开列表
|
||||
* @author: pds
|
||||
* @date: 2025-03-07
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface ISunshineConstructionListService extends IService<SunshineConstructionList> {
|
||||
/**
|
||||
* 分页列表查询施工管理过程公开列表信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
IPage<SunshineConstructionList> queryPageList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询施工管理过程公开列表信息
|
||||
*
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
List<SunshineConstructionList> queryList(HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 添加施工管理过程公开列表信息
|
||||
*
|
||||
* @param sunshineConstructionList 施工管理过程公开列表
|
||||
* @return
|
||||
*/
|
||||
void add(SunshineConstructionList sunshineConstructionList);
|
||||
|
||||
/**
|
||||
* 编辑施工管理过程公开列表信息
|
||||
*
|
||||
* @param sunshineConstructionList 施工管理过程公开列表
|
||||
* @return
|
||||
*/
|
||||
void edit(SunshineConstructionList sunshineConstructionList);
|
||||
|
||||
/**
|
||||
* 根据id删除施工管理过程公开列表信息
|
||||
*
|
||||
* @param id 施工管理过程公开列表的id
|
||||
* @return
|
||||
*/
|
||||
void delete(String id);
|
||||
|
||||
/**
|
||||
* 根据id查询施工管理过程公开列表信息
|
||||
*
|
||||
* @param id 施工管理过程公开列表的id
|
||||
* @return
|
||||
*/
|
||||
SunshineConstructionList queryById(String id);
|
||||
|
||||
}
|
||||
@ -72,7 +72,7 @@ public interface IWorkerAdmissionService extends IService<WorkerAdmission> {
|
||||
|
||||
void subQualifiedWorkerNum(Long workerAdmissionId);
|
||||
|
||||
void exportExcelWorkAdmissionTemplate(HttpServletResponse response, String projectSn);
|
||||
void exportZipWorkAdmissionTemplate(HttpServletResponse response, String projectSn);
|
||||
|
||||
Result getUploadExcelWorkAdmissions(MultipartFile excelFile, String projectSn);
|
||||
|
||||
|
||||
@ -1,48 +1,56 @@
|
||||
package com.zhgd.xmgl.modules.baotou.service.impl;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.PartyConstructionMember;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.vo.PartyConstructionMemberStats;
|
||||
import com.zhgd.xmgl.modules.baotou.mapper.PartyConstructionMemberMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IPartyConstructionMemberService;
|
||||
import org.hibernate.validator.constraints.Mod10Check;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
||||
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 组织建设成员
|
||||
* @author: pds
|
||||
* @date: 2024-08-28
|
||||
* @date: 2024-08-28
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Service
|
||||
public class PartyConstructionMemberServiceImpl extends ServiceImpl<PartyConstructionMemberMapper, PartyConstructionMember> implements IPartyConstructionMemberService {
|
||||
@Autowired
|
||||
private PartyConstructionMemberMapper partyConstructionMemberMapper;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IWorkerInfoService workerInfoService;
|
||||
|
||||
@Override
|
||||
public IPage<PartyConstructionMember> queryPageList(HashMap<String, Object> param) {
|
||||
QueryWrapper<PartyConstructionMember> queryWrapper = this.getQueryWrapper(param);
|
||||
Page<PartyConstructionMember> page = PageUtil.getPage(param);
|
||||
IPage<PartyConstructionMember> pageList = baseMapper.queryList(page, queryWrapper,param);
|
||||
IPage<PartyConstructionMember> pageList = baseMapper.queryList(page, queryWrapper, param);
|
||||
pageList.setRecords(this.dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
@ -72,7 +80,7 @@ public class PartyConstructionMemberServiceImpl extends ServiceImpl<PartyConstru
|
||||
@Override
|
||||
public void edit(PartyConstructionMember partyConstructionMember) {
|
||||
PartyConstructionMember oldPartyConstructionMember = baseMapper.selectById(partyConstructionMember.getId());
|
||||
if(oldPartyConstructionMember==null) {
|
||||
if (oldPartyConstructionMember == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.updateById(partyConstructionMember);
|
||||
@ -81,7 +89,7 @@ public class PartyConstructionMemberServiceImpl extends ServiceImpl<PartyConstru
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
PartyConstructionMember partyConstructionMember = baseMapper.selectById(id);
|
||||
if(partyConstructionMember==null) {
|
||||
if (partyConstructionMember == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
@ -114,16 +122,55 @@ public class PartyConstructionMemberServiceImpl extends ServiceImpl<PartyConstru
|
||||
List<PartyConstructionMember> mans = members.stream().filter(m -> Objects.equals(m.getSex(), 1)).collect(Collectors.toList());
|
||||
stats.setMenNum(mans.size());
|
||||
stats.setWomenNum(members.size() - mans.size());
|
||||
stats.setMenPercent(NumberUtil.div(stats.getMenNum(),stats.getTotal(),2));
|
||||
stats.setWomenPercent(NumberUtil.div(stats.getWomenNum(),stats.getTotal(),2));
|
||||
List<PartyConstructionMember> dzs = members.stream().filter(m -> Optional.ofNullable(Convert.toInt(m.getEducationalBackground())).map(x->x>=5).orElse(false)).collect(Collectors.toList());
|
||||
List<PartyConstructionMember> sss = members.stream().filter(m -> !Objects.equals(m.getNation(),"汉族")).collect(Collectors.toList());
|
||||
stats.setMenPercent(NumberUtil.div(stats.getMenNum(), stats.getTotal(), 2));
|
||||
stats.setWomenPercent(NumberUtil.div(stats.getWomenNum(), stats.getTotal(), 2));
|
||||
List<PartyConstructionMember> dzs = members.stream().filter(m -> Optional.ofNullable(Convert.toInt(m.getEducationalBackground())).map(x -> x >= 5).orElse(false)).collect(Collectors.toList());
|
||||
List<PartyConstructionMember> sss = members.stream().filter(m -> !Objects.equals(m.getNation(), "汉族")).collect(Collectors.toList());
|
||||
stats.setDzNum(dzs.size());
|
||||
stats.setSsNum(sss.size());
|
||||
stats.setDzPercent(NumberUtil.div(stats.getDzNum(),stats.getTotal(),2));
|
||||
stats.setSsPercent(NumberUtil.div(stats.getSsNum(),stats.getTotal(),2));
|
||||
}
|
||||
stats.setDzPercent(NumberUtil.div(stats.getDzNum(), stats.getTotal(), 2));
|
||||
stats.setSsPercent(NumberUtil.div(stats.getSsNum(), stats.getTotal(), 2));
|
||||
}
|
||||
return stats;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addFromWorker(HashMap<String, Object> param) {
|
||||
String workerIds = MapUtils.getString(param, "workerIds");
|
||||
String projectSn = MapUtils.getString(param, "projectSn");
|
||||
Long classifyId = MapUtils.getLong(param, "classifyId");
|
||||
if (StrUtil.isBlank(workerIds)) {
|
||||
return;
|
||||
}
|
||||
List<WorkerInfo> workerInfos = workerInfoService.list(new LambdaQueryWrapper<WorkerInfo>()
|
||||
.eq(WorkerInfo::getId, StrUtil.split(workerIds, ",")));
|
||||
List<String> idCards = workerInfos.stream().map(WorkerInfo::getIdCard).collect(Collectors.toList());
|
||||
Map<String, PartyConstructionMember> idCardMap = this.list(new LambdaQueryWrapper<PartyConstructionMember>()
|
||||
.eq(PartyConstructionMember::getIdCard, idCards)).stream().collect(Collectors.toMap(PartyConstructionMember::getIdCard, Function.identity(), (o1, o2) -> o1));
|
||||
for (WorkerInfo info : workerInfos) {
|
||||
PartyConstructionMember member = idCardMap.get(info.getIdCard());
|
||||
if (member == null) {
|
||||
member = new PartyConstructionMember();
|
||||
}
|
||||
member.setWorkerInfoId(info.getId());
|
||||
member.setPartyConstructionOrganizationId(classifyId);
|
||||
member.setSex(info.getSex());
|
||||
member.setPartyPosition(info.getPartyPosition());
|
||||
member.setNation(info.getNation());
|
||||
member.setEducationalBackground(info.getEducational());
|
||||
member.setNativePlace(info.getNativePlace());
|
||||
member.setPersonnelCategory(Optional.ofNullable(info.getPoliticsStatus()).map(m -> m == 2 ? "正式党员" : "预备党员").orElse(null));
|
||||
member.setIdCard(info.getIdCard());
|
||||
member.setPhoneNumber(info.getPhoneNumber());
|
||||
member.setProjectSn(info.getProjectSn());
|
||||
if (member.getId() != null) {
|
||||
this.updateById(member);
|
||||
} else {
|
||||
this.save(member);
|
||||
}
|
||||
info.setBranchId(classifyId);
|
||||
workerInfoService.updateById(info);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -13,8 +13,7 @@ import com.zhgd.redis.lock.redisson.DistributedLock;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.DeviceUnit;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.ProjectGroup;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.ProjectGroupUnit;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.vo.CountEnterpriseVo;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.UserDevGroup;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.vo.ProjectGroupEnterpriseVo;
|
||||
import com.zhgd.xmgl.modules.baotou.mapper.DeviceUnitMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.mapper.ProjectGroupMapper;
|
||||
@ -23,9 +22,7 @@ import com.zhgd.xmgl.modules.baotou.service.IDeviceUnitService;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IProjectGroupService;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IUserDevGroupService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||
//import com.zhgd.xmgl.security.SecurityUtil;
|
||||
import com.zhgd.xmgl.security.util.SecurityUtils;
|
||||
import com.zhgd.xmgl.util.MapBuilder;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -205,10 +202,18 @@ public class ProjectGroupServiceImpl extends ServiceImpl<ProjectGroupMapper, Pro
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getTreeList(HashMap<String, Object> param) {
|
||||
Long userId = SecurityUtils.getUser().getUserId();
|
||||
List<DeviceUnit> deviceUnits = deviceUnitService.queryList(param);
|
||||
Integer accountType = SecurityUtils.getUser().getAccountType();
|
||||
List<UserDevGroup> devGroupList = new ArrayList<>();
|
||||
if (accountType == 6) {
|
||||
devGroupList = userDevGroupService.list(new LambdaQueryWrapper<UserDevGroup>()
|
||||
.eq(UserDevGroup::getUserId, userId));
|
||||
Map<Long, List<UserDevGroup>> devMap = devGroupList.stream().filter(o -> o.getType() == 1).collect(Collectors.groupingBy(UserDevGroup::getDevGroupId));
|
||||
deviceUnits = deviceUnits.stream().filter(o -> devMap.containsKey(o.getId())).collect(Collectors.toList());
|
||||
}
|
||||
List<ProjectGroup> groupList = projectGroupMapper.selectList(new LambdaQueryWrapper<ProjectGroup>()
|
||||
.eq(ProjectGroup::getProjectSn, MapUtils.getString(param, "projectSn")));
|
||||
List<Map<String, Object>> treeList = new ArrayList<>();
|
||||
@ -218,7 +223,14 @@ public class ProjectGroupServiceImpl extends ServiceImpl<ProjectGroupMapper, Pro
|
||||
m.put("name", unit.getDeviceUnitName());
|
||||
treeList.add(m);
|
||||
String projectGroupIds = unit.getProjectGroupIds();
|
||||
List<ProjectGroup> groups = groupList.stream().filter(o -> projectGroupIds.contains(o.getId().toString())).collect(Collectors.toList());
|
||||
List<ProjectGroup> groups;
|
||||
if (accountType == 6) {
|
||||
List<UserDevGroup> hasGroupList = devGroupList.stream().filter(o -> o.getNodeId().contains(unit.getId() + "") && o.getType() == 2).collect(Collectors.toList());
|
||||
groups = groupList.stream().filter(o -> projectGroupIds.contains(o.getId().toString()) &&
|
||||
hasGroupList.stream().anyMatch(has -> has.getDevGroupId().equals(o.getId()))).collect(Collectors.toList());
|
||||
} else {
|
||||
groups = groupList.stream().filter(o -> projectGroupIds.contains(o.getId().toString())).collect(Collectors.toList());
|
||||
}
|
||||
ArrayList<Map<String, Object>> children = new ArrayList<>();
|
||||
for (ProjectGroup group : groups) {
|
||||
Map<String, Object> m1 = new HashMap<>();
|
||||
|
||||
@ -0,0 +1,91 @@
|
||||
package com.zhgd.xmgl.modules.baotou.service.impl;
|
||||
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.SunshineConstructionList;
|
||||
import com.zhgd.xmgl.modules.baotou.mapper.SunshineConstructionListMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.service.ISunshineConstructionListService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @Description: 施工管理过程公开列表
|
||||
* @author: pds
|
||||
* @date: 2025-03-07
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class SunshineConstructionListServiceImpl extends ServiceImpl<SunshineConstructionListMapper, SunshineConstructionList> implements ISunshineConstructionListService {
|
||||
@Autowired
|
||||
private SunshineConstructionListMapper sunshineConstructionListMapper;
|
||||
|
||||
@Override
|
||||
public IPage<SunshineConstructionList> queryPageList(HashMap<String, Object> param) {
|
||||
QueryWrapper<SunshineConstructionList> queryWrapper = this.getQueryWrapper(param);
|
||||
Page<SunshineConstructionList> page = PageUtil.getPage(param);
|
||||
IPage<SunshineConstructionList> pageList = baseMapper.queryList(page, queryWrapper, param);
|
||||
pageList.setRecords(this.dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SunshineConstructionList> queryList(HashMap<String, Object> param) {
|
||||
QueryWrapper<SunshineConstructionList> queryWrapper = getQueryWrapper(param);
|
||||
return dealList(baseMapper.queryList(queryWrapper, param));
|
||||
}
|
||||
|
||||
private QueryWrapper<SunshineConstructionList> getQueryWrapper(HashMap<String, Object> param) {
|
||||
QueryWrapper<SunshineConstructionList> queryWrapper = QueryGenerator.initPageQueryWrapper(SunshineConstructionList.class, param, true);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(SunshineConstructionList::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<SunshineConstructionList> dealList(List<SunshineConstructionList> list) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(SunshineConstructionList sunshineConstructionList) {
|
||||
sunshineConstructionList.setId(null);
|
||||
baseMapper.insert(sunshineConstructionList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(SunshineConstructionList sunshineConstructionList) {
|
||||
SunshineConstructionList oldSunshineConstructionList = baseMapper.selectById(sunshineConstructionList.getId());
|
||||
if (oldSunshineConstructionList == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.updateById(sunshineConstructionList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
SunshineConstructionList sunshineConstructionList = baseMapper.selectById(id);
|
||||
if (sunshineConstructionList == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SunshineConstructionList queryById(String id) {
|
||||
SunshineConstructionList entity = baseMapper.queryById(id);
|
||||
if (entity == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
}
|
||||
@ -44,7 +44,7 @@ public class SunshineProjectServiceImpl extends ServiceImpl<SunshineProjectMappe
|
||||
|
||||
private QueryWrapper<SunshineProject> getQueryWrapper(HashMap<String, Object> param) {
|
||||
QueryWrapper<SunshineProject> queryWrapper = QueryGenerator.initPageQueryWrapper(SunshineProject.class, param, true);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(SunshineProject::getId));
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(SunshineProject::getRecordDate));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.baotou.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@ -12,10 +13,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.constant.Cts;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.PartyConstructionMember;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.WorkerAdmission;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.WorkerAdmissionCertificateDetail;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.WorkerAdmissionDetail;
|
||||
import com.zhgd.xmgl.modules.baotou.mapper.WorkerAdmissionDetailMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IPartyConstructionMemberService;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IWorkerAdmissionCertificateDetailService;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IWorkerAdmissionDetailService;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IWorkerAdmissionService;
|
||||
@ -92,6 +95,9 @@ public class WorkerAdmissionDetailServiceImpl extends ServiceImpl<WorkerAdmissio
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IWorkerPhysicalsService workerPhysicalsService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IPartyConstructionMemberService partyConstructionMemberService;
|
||||
|
||||
@Override
|
||||
public IPage<WorkerAdmissionDetail> queryPageList(HashMap<String, Object> param) {
|
||||
@ -362,6 +368,13 @@ public class WorkerAdmissionDetailServiceImpl extends ServiceImpl<WorkerAdmissio
|
||||
}
|
||||
Map<String, WorkerAdmissionDetail> idCardMap = detailList.stream().collect(Collectors.toMap(WorkerAdmissionDetail::getIdCard, Function.identity(), (o1, o2) -> o1));
|
||||
existDepartmentInfos.addAll(addDepartments);
|
||||
//党员身份证
|
||||
List<String> partyIdCards = addWorkers.stream().filter(o -> o.getBranchId() != null && (o.getPoliticsStatus() != null && o.getPoliticsStatus() == 2 || o.getPoliticsStatus() == 3)).map(WorkerInfo::getIdCard).collect(Collectors.toList());
|
||||
Map<String, PartyConstructionMember> existIdCardMap = new HashMap<>();
|
||||
if (CollUtil.isNotEmpty(partyIdCards)) {
|
||||
existIdCardMap = partyConstructionMemberService.list(new LambdaQueryWrapper<PartyConstructionMember>()
|
||||
.eq(PartyConstructionMember::getIdCard, partyIdCards)).stream().collect(Collectors.toMap(PartyConstructionMember::getIdCard, Function.identity(), (o1, o2) -> o1));
|
||||
}
|
||||
for (WorkerInfo addWorker : addWorkers) {
|
||||
try {
|
||||
if (Objects.equals(addWorker.getPersonType(), 1)) {
|
||||
@ -374,6 +387,7 @@ public class WorkerAdmissionDetailServiceImpl extends ServiceImpl<WorkerAdmissio
|
||||
} else {
|
||||
workerInfoService.editWorkerInfo(addWorker);
|
||||
}
|
||||
this.savePartyMember(partyIdCards, existIdCardMap, addWorker);
|
||||
List<WorkerCertificate> workerCertificates = addCertificates.stream().filter(o -> Objects.equals(o.getIdCard(), addWorker.getIdCard())).collect(Collectors.toList());
|
||||
for (WorkerCertificate workerCertificate : workerCertificates) {
|
||||
workerCertificate.setWorkerId(addWorker.getId());
|
||||
@ -426,6 +440,39 @@ public class WorkerAdmissionDetailServiceImpl extends ServiceImpl<WorkerAdmissio
|
||||
return msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存党员
|
||||
*
|
||||
* @param partyIdCards
|
||||
* @param existIdCardMap
|
||||
* @param addWorker
|
||||
*/
|
||||
private void savePartyMember(List<String> partyIdCards, Map<String, PartyConstructionMember> existIdCardMap, WorkerInfo addWorker) {
|
||||
if (partyIdCards.contains(addWorker.getIdCard())) {
|
||||
//保存党员
|
||||
PartyConstructionMember member = existIdCardMap.get(addWorker.getIdCard());
|
||||
if (member == null) {
|
||||
member = new PartyConstructionMember();
|
||||
}
|
||||
member.setWorkerInfoId(addWorker.getId());
|
||||
member.setPartyConstructionOrganizationId(addWorker.getBranchId());
|
||||
member.setSex(addWorker.getSex());
|
||||
member.setPartyPosition(addWorker.getPartyPosition());
|
||||
member.setNation(addWorker.getNation());
|
||||
member.setEducationalBackground(addWorker.getEducational());
|
||||
member.setNativePlace(addWorker.getNativePlace());
|
||||
member.setPersonnelCategory(Optional.ofNullable(addWorker.getPoliticsStatus()).map(m -> m == 2 ? "正式党员" : "预备党员").orElse(null));
|
||||
member.setIdCard(addWorker.getIdCard());
|
||||
member.setPhoneNumber(addWorker.getPhoneNumber());
|
||||
member.setProjectSn(addWorker.getProjectSn());
|
||||
if (member.getId() != null) {
|
||||
partyConstructionMemberService.updateById(member);
|
||||
} else {
|
||||
partyConstructionMemberService.save(member);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getIssueCompany(Integer issueCompany) {
|
||||
if (issueCompany == null) {
|
||||
return null;
|
||||
@ -498,6 +545,12 @@ public class WorkerAdmissionDetailServiceImpl extends ServiceImpl<WorkerAdmissio
|
||||
}
|
||||
workerInfo.setEnterDate(enterDate);
|
||||
workerInfo.setPhoneNumber(detail.getPhone());
|
||||
workerInfo.setPartyPosition(detail.getPartyPosition());
|
||||
workerInfo.setNativePlace(detail.getNativePlace());
|
||||
workerInfo.setNation(detail.getNation());
|
||||
workerInfo.setPoliticsStatus(detail.getPoliticsStatus());
|
||||
workerInfo.setEducational(Convert.toStr(detail.getEducational()));
|
||||
workerInfo.setBranchId(detail.getBranchId());
|
||||
return workerInfo;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,9 +2,11 @@ package com.zhgd.xmgl.modules.baotou.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -30,6 +32,7 @@ import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
|
||||
import com.zhgd.xmgl.util.*;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.flowable.engine.HistoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
@ -38,7 +41,11 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
@ -90,6 +97,9 @@ public class WorkerAdmissionServiceImpl extends ServiceImpl<WorkerAdmissionMappe
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IProjectGroupService projectGroupService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IPartyConstructionOrganizationService partyConstructionOrganizationService;
|
||||
|
||||
@Override
|
||||
public IPage<WorkerAdmission> queryPageList(HashMap<String, Object> param) {
|
||||
@ -268,6 +278,26 @@ public class WorkerAdmissionServiceImpl extends ServiceImpl<WorkerAdmissionMappe
|
||||
detail.setRandom(random);
|
||||
detail.setIsCertificateQualified(isCertificateQualified);
|
||||
detail.setPhone(FlowUtil.getString(m, "field6776257685667"));
|
||||
detail.setPartyPosition(FlowUtil.getString(m, "field7296732795454"));
|
||||
detail.setNativePlace(FlowUtil.getString(m, "field4503632783321"));
|
||||
detail.setNation(FlowUtil.getString(m, "field8376532894670"));
|
||||
List<String> ps = Arrays.asList("群众",
|
||||
"正式党员",
|
||||
"预备党员");
|
||||
int p = ps.indexOf(FlowUtil.getString(m, "field1540833140001"));
|
||||
detail.setPoliticsStatus(p != -1 ? p + 1 : null);
|
||||
List<String> edus = Arrays.asList("小学",
|
||||
"初中",
|
||||
"中专",
|
||||
"高中",
|
||||
"大专",
|
||||
"本科",
|
||||
"研究生",
|
||||
"博士",
|
||||
"博士后");
|
||||
int edu = edus.indexOf(FlowUtil.getString(m, "field9454332932104"));
|
||||
detail.setEducational(edu != -1 ? edu + 1 : null);
|
||||
detail.setBranchId(FlowUtil.getLongByCascade(m, "field7244036504230"));
|
||||
if (nums.contains(num)) {
|
||||
repeatStrs.add(detail.getWorkerName() + "[" + detail.getNum() + "]");
|
||||
continue;
|
||||
@ -375,7 +405,7 @@ public class WorkerAdmissionServiceImpl extends ServiceImpl<WorkerAdmissionMappe
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportExcelWorkAdmissionTemplate(HttpServletResponse response, String projectSn) {
|
||||
public void exportZipWorkAdmissionTemplate(HttpServletResponse response, String projectSn) {
|
||||
List<EnterpriseInfo> enterpriseInfos = projectEnterpriseService.queryPageList(new MapBuilder<String, Object>()
|
||||
.put("projectSn", projectSn)
|
||||
.put(Cts.PAGE_SIZE, -1)
|
||||
@ -397,7 +427,34 @@ public class WorkerAdmissionServiceImpl extends ServiceImpl<WorkerAdmissionMappe
|
||||
.build());
|
||||
List<ProjectGroup> groupList = projectGroupService.list(new LambdaQueryWrapper<ProjectGroup>()
|
||||
.eq(ProjectGroup::getProjectSn, projectSn));
|
||||
ExcelUtils.exportExcelWorkAdmissionTemplate(response, epcInfos, enterpriseInfos, deviceUnits, postWorkTypes, certTypeList, groupList);
|
||||
List<PartyConstructionOrganization> organizations = partyConstructionOrganizationService.list(new LambdaQueryWrapper<PartyConstructionOrganization>()
|
||||
.eq(PartyConstructionOrganization::getProjectSn, projectSn));
|
||||
String dir = PathUtil.getBasePath() + "/temp/" + IdUtil.randomUUID() + "/人员入场导入模版";
|
||||
FileUtil.mkdir(dir);
|
||||
Arrays.asList("体检报告",
|
||||
"保险",
|
||||
"劳动合同",
|
||||
"人脸采集图片",
|
||||
"人员资质",
|
||||
"人员资质验证",
|
||||
"身份证国徽面",
|
||||
"身份证人像面文件夹").forEach(o -> {
|
||||
FileUtil.mkdir(new File(dir, o));
|
||||
});
|
||||
ExcelUtils.exportExcelWorkAdmissionTemplate(response, epcInfos, enterpriseInfos, deviceUnits, postWorkTypes, certTypeList, groupList, new File(dir, "人员入场导入模板.xlsx"), organizations);
|
||||
ZipUtil.zip(dir);
|
||||
try {
|
||||
OutputStream out = response.getOutputStream();
|
||||
response.setContentType("application/json");
|
||||
response.setHeader("Content-disposition", "attachment; filename=" +
|
||||
URLEncoder.encode(new File(dir + ".zip").getName(), "UTF-8"));
|
||||
InputStream fis = new FileInputStream(dir + ".zip");
|
||||
IOUtils.copy(fis, out);
|
||||
out.flush();
|
||||
out.close();
|
||||
} catch (Exception e) {
|
||||
log.error("", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -191,8 +191,8 @@ public class ExamTrainRecordServiceImpl extends ServiceImpl<ExamTrainRecordMappe
|
||||
this.updateById(submit);
|
||||
ExamSubject subject = examSubjectService.getById(examPaper.getSubjectId());
|
||||
if (Objects.equals(submit.getIsPass(), 1)) {
|
||||
//重新按人员入场的顺序编号,剔除不合格的人
|
||||
// resetWorkerNum(submit, subject);
|
||||
//重新按人员入场的顺序编号,从小到大排序
|
||||
resetWorkerNum(submit, subject);
|
||||
|
||||
//违章再教育合格:下发门禁
|
||||
//复工培训合格:下发门禁,自动修改成入场
|
||||
@ -236,7 +236,7 @@ public class ExamTrainRecordServiceImpl extends ServiceImpl<ExamTrainRecordMappe
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新按人员入场的顺序编号,剔除不合格的人
|
||||
* 重新按人员入场的顺序编号,从小到大排序
|
||||
*
|
||||
* @param submit
|
||||
* @param subject
|
||||
@ -246,14 +246,18 @@ public class ExamTrainRecordServiceImpl extends ServiceImpl<ExamTrainRecordMappe
|
||||
.put("projectSn", subject.getProjectSn())
|
||||
.put("workerAdmissionId", submit.getApplicationId())
|
||||
.build());
|
||||
List<WorkerAdmissionDetail> admissionDetails = detailList.stream().filter(o -> !Objects.equals(o.getIsPass(), 0)).collect(Collectors.toList());
|
||||
List<WorkerAdmissionDetail> admissionDetails = detailList.stream().sorted((o1, o2) -> o1.getNum().compareTo(o2.getNum())).collect(Collectors.toList());
|
||||
String firstNum = "";
|
||||
if (CollUtil.isNotEmpty(admissionDetails)) {
|
||||
WorkerAdmissionDetail detail = admissionDetails.get(0);
|
||||
String num = detail.getNum();
|
||||
Matcher matcher = lastNumPattern.matcher(num);
|
||||
firstNum = detail.getNum();
|
||||
}
|
||||
admissionDetails = admissionDetails.stream().sorted(Comparator.comparing(WorkerAdmissionDetail::getIsPass, Comparator.nullsLast(Integer::compareTo))).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(admissionDetails)) {
|
||||
Matcher matcher = lastNumPattern.matcher(firstNum);
|
||||
if (matcher.find()) {
|
||||
String group = matcher.group();
|
||||
String prefix = StringUtils.substring(num, 0, num.length() - group.length());
|
||||
String prefix = StringUtils.substring(firstNum, 0, firstNum.length() - group.length());
|
||||
Integer n = Convert.toInt(group);
|
||||
for (WorkerAdmissionDetail d : admissionDetails) {
|
||||
String newNum = prefix + NumberUtils.fillZero(n, group.length());
|
||||
|
||||
@ -174,7 +174,7 @@ public class WorkerInfoController {
|
||||
@ApiImplicitParam(name = "chargePersonName", value = "负责人姓名(部门)", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "belongingSection", value = "所属标段(部门)", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "projectSnList", value = "项目SN列表", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "orderBy", value = "排序:1退场时间倒序2进场日期倒序", paramType = "body", required = false, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "orderBy", value = "排序:1退场时间倒序2进场日期倒序,numAsc:编号正序,numDesc:编号倒序", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "workerInfos", value = "劳务人员id(多个,分割)", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "presence", value = "1在场2离场", paramType = "body", required = false, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "attendance", value = "1今日出勤", paramType = "body", required = false, dataType = "Integer"),
|
||||
@ -183,6 +183,7 @@ public class WorkerInfoController {
|
||||
@ApiImplicitParam(name = "safeScoreLevel", value = "安全得分风险(1高风险2中风险3低风险)", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "workerTypeId", value = "工种id", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "isSpecial", value = "1是特殊工种", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "isPartyMember", value = "1是正式或预备党员", paramType = "body", required = false, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/selectWorkerInfoList")
|
||||
public Result<IPage<WorkerInfo>> selectWorkerInfoList(@RequestBody Map<String, Object> map) {
|
||||
|
||||
@ -129,10 +129,10 @@ public class WorkerInfo implements Serializable {
|
||||
@ApiModelProperty(value = "血型")
|
||||
private java.lang.String blood;
|
||||
/**
|
||||
* 1小学、2初中、3中专、4高中、5大专、6本科、7研究生、8博士、9博士后
|
||||
* 学历:1小学、2初中、3中专、4高中、5大专、6本科、7研究生、8博士、9博士后
|
||||
*/
|
||||
@Excel(name = "1小学、2初中、3中专、4高中、5大专、6本科、7研究生、8博士、9博士后", width = 15)
|
||||
@ApiModelProperty(value = "1小学、2初中、3中专、4高中、5大专、6本科、7研究生、8博士、9博士后")
|
||||
@Excel(name = "学历:1小学、2初中、3中专、4高中、5大专、6本科、7研究生、8博士、9博士后", width = 15)
|
||||
@ApiModelProperty(value = "学历:1小学、2初中、3中专、4高中、5大专、6本科、7研究生、8博士、9博士后")
|
||||
private java.lang.String educational;
|
||||
/**
|
||||
* 婚否 1未婚 2已婚 3离异 4丧偶
|
||||
@ -141,10 +141,10 @@ public class WorkerInfo implements Serializable {
|
||||
@ApiModelProperty(value = "婚否 1未婚 2已婚 3离异 4丧偶")
|
||||
private java.lang.Integer marry;
|
||||
/**
|
||||
* 政治面貌:1.中共党员 2.共青团团员 3.普通居民 4.其他党派人士
|
||||
* 政治面貌:1:群众,2:正式党员,3:预备党员
|
||||
*/
|
||||
@Excel(name = "政治面貌:1.中共党员 2.共青团团员 3.普通居民 4.其他党派人士", width = 15)
|
||||
@ApiModelProperty(value = "政治面貌:1.中共党员 2.共青团团员 3.普通居民 4.其他党派人士")
|
||||
@Excel(name = "政治面貌:1:群众,2:正式党员,3:预备党员", width = 15)
|
||||
@ApiModelProperty(value = "政治面貌:1:群众,2:正式党员,3:预备党员")
|
||||
private java.lang.Integer politicsStatus;
|
||||
/**
|
||||
* 紧急联系人
|
||||
@ -363,6 +363,18 @@ public class WorkerInfo implements Serializable {
|
||||
private Long noticeUserId;
|
||||
@ApiModelProperty(value = "区域项目组")
|
||||
private java.lang.Long projectGroup;
|
||||
/**
|
||||
* 党内职务
|
||||
*/
|
||||
@Excel(name = "党内职务", width = 15)
|
||||
@ApiModelProperty(value = "党内职务")
|
||||
private java.lang.String partyPosition;
|
||||
/**
|
||||
* 支部名称Id
|
||||
*/
|
||||
@Excel(name = "支部名称Id", width = 15)
|
||||
@ApiModelProperty(value = "支部名称Id")
|
||||
private java.lang.Long branchId;
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "人脸分数")
|
||||
private java.lang.Integer faceScore;
|
||||
|
||||
@ -53,6 +53,9 @@
|
||||
and create_time>=current_date group by person_sn ) wa on wa.person_sn = a.person_sn
|
||||
</if>
|
||||
WHERE 1 = 1
|
||||
<if test="param.isPartyMember == '1'.toString()">
|
||||
and (a.politics_status = 2 or a.politics_status = 3)
|
||||
</if>
|
||||
<if test="param.btDepartment != null and param.btDepartment != ''">
|
||||
and a.bt_department like concat('%', #{param.btDepartment},'%')
|
||||
</if>
|
||||
@ -79,7 +82,7 @@
|
||||
and if(a.person_type=1,wt.type_name,c.department_name) like concat('%', #{param.postWorkTypeName},'%')
|
||||
</if>
|
||||
<if test="param.workAreaName != null and param.workAreaName != ''">
|
||||
and du.device_unit_name like concat('%',#{param.workAreaName},'%')
|
||||
<!-- and du.device_unit_name like concat('%',#{param.workAreaName},'%')-->
|
||||
</if>
|
||||
<if test="param.postWorkTypeName != null and param.postWorkTypeName != ''">
|
||||
and (c.department_name like CONCAT(CONCAT('%',#{param.postWorkTypeName}),'%') or wt.type_name like
|
||||
@ -270,6 +273,48 @@
|
||||
<when test="param.orderBy == '2'.toString()">
|
||||
order by a.enter_date desc
|
||||
</when>
|
||||
<when test="param.orderBy == 'numAsc'.toString()">
|
||||
order by a.num asc
|
||||
</when>
|
||||
<when test="param.orderBy == 'numDesc'.toString()">
|
||||
order by a.num desc
|
||||
</when>
|
||||
<when test="param.orderBy == 'enterpriseNameAsc'.toString()">
|
||||
order by en.enterprise_name asc
|
||||
</when>
|
||||
<when test="param.orderBy == 'enterpriseNameDesc'.toString()">
|
||||
order by en.enterprise_name desc
|
||||
</when>
|
||||
<when test="param.orderBy == 'workerNameAsc'.toString()">
|
||||
order by a.worker_name asc
|
||||
</when>
|
||||
<when test="param.orderBy == 'workerNameDesc'.toString()">
|
||||
order by a.worker_name desc
|
||||
</when>
|
||||
<when test="param.orderBy == 'postWorkTypeNameAsc'.toString()">
|
||||
order by post_work_type_name asc
|
||||
</when>
|
||||
<when test="param.orderBy == 'postWorkTypeNameDesc'.toString()">
|
||||
order by post_work_type_name desc
|
||||
</when>
|
||||
<when test="param.orderBy == 'sexAsc'.toString()">
|
||||
order by a.sex asc
|
||||
</when>
|
||||
<when test="param.orderBy == 'sexDesc'.toString()">
|
||||
order by a.sex desc
|
||||
</when>
|
||||
<when test="param.orderBy == 'ageAsc'.toString()">
|
||||
order by age asc
|
||||
</when>
|
||||
<when test="param.orderBy == 'ageDesc'.toString()">
|
||||
order by age desc
|
||||
</when>
|
||||
<when test="param.orderBy == 'phoneNumberAsc'.toString()">
|
||||
order by a.phone_number asc
|
||||
</when>
|
||||
<when test="param.orderBy == 'phoneNumberDesc'.toString()">
|
||||
order by a.phone_number desc
|
||||
</when>
|
||||
<otherwise>
|
||||
order by a.add_time desc,a.id desc
|
||||
</otherwise>
|
||||
|
||||
@ -32,9 +32,11 @@ import com.zhgd.xmgl.base.entity.vo.TrendOneVo;
|
||||
import com.zhgd.xmgl.call.HikvisionCall;
|
||||
import com.zhgd.xmgl.constant.Cts;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.DeviceUnit;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.PartyConstructionOrganization;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.ProjectGroup;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.WorkerAdmissionDetail;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IDeviceUnitService;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IPartyConstructionOrganizationService;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IProjectGroupService;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IWorkerAdmissionDetailService;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Company;
|
||||
@ -311,6 +313,9 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IDictionariesRecordService dictionariesRecordService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IPartyConstructionOrganizationService partyConstructionOrganizationService;
|
||||
|
||||
/**
|
||||
* 人员管理分页
|
||||
@ -375,6 +380,21 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
return data;
|
||||
}
|
||||
|
||||
// public boolean check(WorkerInfo workerInfo) throws Exception {
|
||||
// Project project = projectMapper.selectOne(new LambdaQueryWrapper<Project>()
|
||||
// .eq(Project::getProjectSn, workerInfo.getProjectSn()));
|
||||
// if (project == null) {
|
||||
// throw new OpenAlertException("项目不存在");
|
||||
// }
|
||||
// JSONObject param = new JSONObject();
|
||||
// String fieldAcquisitionUrl = workerInfo.getFieldAcquisitionUrl();
|
||||
// if (StrUtil.isBlank(fieldAcquisitionUrl)) {
|
||||
// throw new OpenAlertException("fieldAcquisitionUrl不能为空");
|
||||
// }
|
||||
// param.put("facePicBinaryData", Base64Util.convertFileToBase64(PathUtil.reviseSlash(basePath + "/" + fieldAcquisitionUrl)));
|
||||
// return hikvisionCall.faceScore(project, param);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 修改人员班组
|
||||
*
|
||||
@ -393,21 +413,6 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
}
|
||||
}
|
||||
|
||||
// public boolean check(WorkerInfo workerInfo) throws Exception {
|
||||
// Project project = projectMapper.selectOne(new LambdaQueryWrapper<Project>()
|
||||
// .eq(Project::getProjectSn, workerInfo.getProjectSn()));
|
||||
// if (project == null) {
|
||||
// throw new OpenAlertException("项目不存在");
|
||||
// }
|
||||
// JSONObject param = new JSONObject();
|
||||
// String fieldAcquisitionUrl = workerInfo.getFieldAcquisitionUrl();
|
||||
// if (StrUtil.isBlank(fieldAcquisitionUrl)) {
|
||||
// throw new OpenAlertException("fieldAcquisitionUrl不能为空");
|
||||
// }
|
||||
// param.put("facePicBinaryData", Base64Util.convertFileToBase64(PathUtil.reviseSlash(basePath + "/" + fieldAcquisitionUrl)));
|
||||
// return hikvisionCall.faceScore(project, param);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void updateWorkerDepartment(Map<String, Object> map) {
|
||||
String workerIdStr = MapUtils.getString(map, "workerIdStr");
|
||||
@ -1144,26 +1149,6 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
return workerInfoMapper.selectProjectPresentWorkerList(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectWorkerTypeTotalVo> selectProjectWorkerTypeTotalList(Map<String, Object> map) {
|
||||
List<ProjectWorkerTypeTotalVo> list = workerInfoMapper.selectProjectWorkerTypeTotalList(map);
|
||||
if (list != null && list.size() > 0) {
|
||||
List<ProjectWorkerTypeTotalVo> typeData = workerInfoMapper.selelctWorkerTypePersonCount(map);
|
||||
for (ProjectWorkerTypeTotalVo data : list) {
|
||||
int num = 0;
|
||||
String id = data.getId();
|
||||
for (ProjectWorkerTypeTotalVo tempData : typeData) {
|
||||
if (id.equals(tempData.getWorkerTypeId())) {
|
||||
num = tempData.getPersonNum();
|
||||
}
|
||||
}
|
||||
//总人数
|
||||
data.setWorkerNum(num);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void exporZipWorkerInfo(HttpServletResponse response, Map<String, Object> map) {
|
||||
// try {
|
||||
@ -1251,6 +1236,26 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
public List<ProjectWorkerTypeTotalVo> selectProjectWorkerTypeTotalList(Map<String, Object> map) {
|
||||
List<ProjectWorkerTypeTotalVo> list = workerInfoMapper.selectProjectWorkerTypeTotalList(map);
|
||||
if (list != null && list.size() > 0) {
|
||||
List<ProjectWorkerTypeTotalVo> typeData = workerInfoMapper.selelctWorkerTypePersonCount(map);
|
||||
for (ProjectWorkerTypeTotalVo data : list) {
|
||||
int num = 0;
|
||||
String id = data.getId();
|
||||
for (ProjectWorkerTypeTotalVo tempData : typeData) {
|
||||
if (id.equals(tempData.getWorkerTypeId())) {
|
||||
num = tempData.getPersonNum();
|
||||
}
|
||||
}
|
||||
//总人数
|
||||
data.setWorkerNum(num);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员下载
|
||||
*
|
||||
@ -1942,7 +1947,9 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
// .build());
|
||||
List<ProjectGroup> groupList = projectGroupService.list(new LambdaQueryWrapper<ProjectGroup>()
|
||||
.eq(ProjectGroup::getProjectSn, projectSn));
|
||||
ExcelUtils.exporExcelWorkerTemplate(response, deviceUnitList, enterpriseInfoList, departmentList, workerTypeList, groupList);
|
||||
List<PartyConstructionOrganization> organizations = partyConstructionOrganizationService.list(new LambdaQueryWrapper<PartyConstructionOrganization>()
|
||||
.eq(PartyConstructionOrganization::getProjectSn, projectSn));
|
||||
ExcelUtils.exporExcelWorkerTemplate(response, deviceUnitList, enterpriseInfoList, departmentList, workerTypeList, groupList, organizations);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1993,6 +2000,8 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
.eq(DeviceUnit::getProjectSn, projectSn)).stream().collect(Collectors.toMap(DeviceUnit::getDeviceUnitName, Function.identity(), (deviceUnit, deviceUnit2) -> deviceUnit));
|
||||
Map<String, ProjectGroup> groupMap = projectGroupService.list(new LambdaQueryWrapper<ProjectGroup>()
|
||||
.eq(ProjectGroup::getProjectSn, projectSn)).stream().collect(Collectors.toMap(ProjectGroup::getProjectGroupName, Function.identity(), (o1, o2) -> o1));
|
||||
Map<String, PartyConstructionOrganization> orgMap = partyConstructionOrganizationService.list(new LambdaQueryWrapper<PartyConstructionOrganization>()
|
||||
.eq(PartyConstructionOrganization::getProjectSn, projectSn)).stream().collect(Collectors.toMap(PartyConstructionOrganization::getClassificationName, Function.identity(), (o1, o2) -> o1));
|
||||
for (Map<String, String> importInfo : list) {
|
||||
WorkerInfo workerInfo = new WorkerInfo();
|
||||
workerInfo.setProjectSn(projectSn);
|
||||
@ -2061,17 +2070,14 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
} else if ("丧偶".equals(importInfo.get("婚姻状况"))) {
|
||||
workerInfo.setMarry(4);
|
||||
}
|
||||
|
||||
if ("中共党员".equals(importInfo.get("政治面貌"))) {
|
||||
workerInfo.setPoliticsStatus(1);
|
||||
} else if ("共青团团员".equals(importInfo.get("政治面貌"))) {
|
||||
workerInfo.setPoliticsStatus(2);
|
||||
} else if ("普通居民".equals(importInfo.get("政治面貌"))) {
|
||||
workerInfo.setPoliticsStatus(3);
|
||||
} else if ("其他党派人士".equals(importInfo.get("政治面貌"))) {
|
||||
workerInfo.setPoliticsStatus(4);
|
||||
}
|
||||
List<String> ps = Arrays.asList("群众",
|
||||
"正式党员",
|
||||
"预备党员");
|
||||
int p = ps.indexOf(importInfo.get("政治面貌"));
|
||||
workerInfo.setPoliticsStatus(p != -1 ? p + 1 : null);
|
||||
workerInfo.setPartyPosition(importInfo.get("党内职务"));
|
||||
workerInfo.setPayRollBankNumber(importInfo.get("银行卡号"));
|
||||
workerInfo.setBranchId(Optional.ofNullable(orgMap.get(importInfo.get("支部名称"))).map(m -> m.getId()).orElse(null));
|
||||
workerInfo.setInserviceType(1);
|
||||
workerInfo.setUfaceDevId(ufaceId);
|
||||
workerInfo.setWorkAreaName(importInfo.get("工作区域"));
|
||||
|
||||
@ -2,6 +2,7 @@ package com.zhgd.xmgl.util;
|
||||
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.DeviceUnit;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.PartyConstructionOrganization;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.PostWorkType;
|
||||
import com.zhgd.xmgl.modules.baotou.entity.ProjectGroup;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.DictionariesRecord;
|
||||
@ -24,9 +25,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
@ -232,12 +231,22 @@ public class ExcelUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void exporExcelWorkerTemplate(HttpServletResponse response, List<DeviceUnit> deviceUnitList, List<EntityMap> enterpriseInfoList, List<EntityMap> departmentList, List<WorkerType> typeList, List<ProjectGroup> groupList) {
|
||||
public static void exporExcelWorkerTemplate(HttpServletResponse response, List<DeviceUnit> deviceUnitList, List<EntityMap> enterpriseInfoList, List<EntityMap> departmentList, List<WorkerType> typeList, List<ProjectGroup> groupList, List<PartyConstructionOrganization> organizations) {
|
||||
try {
|
||||
ClassPathResource classPathResource = new ClassPathResource("excel/人员导入模板.xlsx");
|
||||
InputStream inputStream = classPathResource.getInputStream();
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
|
||||
|
||||
//支部名称下拉
|
||||
XSSFSheet sheet7 = workbook.getSheet("支部名称");
|
||||
if (organizations.size() > 0) {
|
||||
for (int i = 0; i < organizations.size(); i++) {
|
||||
XSSFRow row1 = sheet7.createRow(i);
|
||||
XSSFCell cell1 = row1.createCell(0);
|
||||
PartyConstructionOrganization obj = organizations.get(i);
|
||||
cell1.setCellType(CellType.STRING);
|
||||
cell1.setCellValue(obj.getClassificationName());
|
||||
}
|
||||
}
|
||||
//项目组下拉
|
||||
XSSFSheet sheet5 = workbook.getSheet("项目组");
|
||||
if (groupList.size() > 0) {
|
||||
@ -479,11 +488,22 @@ public class ExcelUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void exportExcelWorkAdmissionTemplate(HttpServletResponse response, List<EnterpriseInfo> epcInfos, List<EnterpriseInfo> enterpriseInfos, List<DeviceUnit> deviceUnits, List<PostWorkType> workerTypeList, List<DictionariesRecord> certTypeList, List<ProjectGroup> groupList) {
|
||||
public static void exportExcelWorkAdmissionTemplate(HttpServletResponse response, List<EnterpriseInfo> epcInfos, List<EnterpriseInfo> enterpriseInfos, List<DeviceUnit> deviceUnits, List<PostWorkType> workerTypeList, List<DictionariesRecord> certTypeList, List<ProjectGroup> groupList, File output, List<PartyConstructionOrganization> organizations) {
|
||||
try {
|
||||
ClassPathResource classPathResource = new ClassPathResource("excel/人员入场导入模板.xlsx");
|
||||
InputStream inputStream = classPathResource.getInputStream();
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
|
||||
//支部名称下拉
|
||||
XSSFSheet sheet7 = workbook.getSheet("支部名称");
|
||||
if (organizations.size() > 0) {
|
||||
for (int i = 0; i < organizations.size(); i++) {
|
||||
XSSFRow row1 = sheet7.createRow(i);
|
||||
XSSFCell cell1 = row1.createCell(0);
|
||||
PartyConstructionOrganization obj = organizations.get(i);
|
||||
cell1.setCellType(CellType.STRING);
|
||||
cell1.setCellValue(obj.getClassificationName());
|
||||
}
|
||||
}
|
||||
//资质类型下拉
|
||||
XSSFSheet sheet6 = workbook.getSheet("资质类型");
|
||||
if (certTypeList.size() > 0) {
|
||||
@ -554,7 +574,8 @@ public class ExcelUtils {
|
||||
cell1.setCellValue(obj.getPostWorkTypeName());
|
||||
}
|
||||
}
|
||||
downLoadExcel("人员入场导入模板.xlsx", response, workbook);
|
||||
workbook.write(new FileOutputStream(output));
|
||||
// downLoadExcel("人员入场导入模板.xlsx", response, workbook);
|
||||
} catch (IOException e) {
|
||||
log.error("error:", e);
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.zhgd.xmgl.util;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@ -216,4 +217,17 @@ public class FlowUtil {
|
||||
}
|
||||
return url.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取级联的最后的long
|
||||
*
|
||||
* @param m
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public static Long getLongByCascade(Map m, String name) {
|
||||
List<String> classs = StrUtil.split(FlowUtil.getString(m, name), "-");
|
||||
return CollUtil.isNotEmpty(classs) ? Long.valueOf(classs.get(classs.size() - 1)) : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user