55 changed files with 2203 additions and 57 deletions
@ -0,0 +1,97 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
|
|||
/** |
|||
* 员工登记表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@Data |
|||
public class IcEmployeeRegisterDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
@NotBlank(message = "customerId不能为空",groups = {AddGroup.class}) |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 场所id |
|||
*/ |
|||
@NotBlank(message = "enterpriseId不能为空",groups = {AddGroup.class}) |
|||
private String enterpriseId; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
@NotBlank(message = "name不能为空",groups = {AddGroup.class}) |
|||
private String name; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@NotBlank(message = "mobile不能为空",groups = {AddGroup.class}) |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 身份证号或护照号 |
|||
*/ |
|||
@NotBlank(message = "idCard不能为空",groups = {AddGroup.class}) |
|||
private String idCard; |
|||
|
|||
@NotNull(message = "ymjzCount不能为空",groups = {AddGroup.class}) |
|||
private Integer ymjzCount; |
|||
|
|||
@NotNull(message = "latestNatTime不能为空",groups = {AddGroup.class}) |
|||
@JsonFormat(pattern="yyyy-MM-dd") |
|||
private Date latestNatTime; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,74 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 员工登记明细表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@Data |
|||
public class IcEmployeeRegisterDetailDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* ic_employee_register.ID |
|||
*/ |
|||
private String registerId; |
|||
|
|||
/** |
|||
* 疫苗接种次数:0,1,2,3 |
|||
*/ |
|||
private Integer ymjzCount; |
|||
|
|||
/** |
|||
* 最近一次核酸检测时间:yyyy-MM-dd 日期 |
|||
*/ |
|||
private Date latestNatTime; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,91 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
|
|||
/** |
|||
* 受众群体登记表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@Data |
|||
public class IcGroupPeopleRegisterDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
@NotBlank(message = "customerId不能为空",groups = {AddGroup.class}) |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 场所id |
|||
*/ |
|||
@NotBlank(message = "enterpriseId不能为空",groups = {AddGroup.class}) |
|||
private String enterpriseId; |
|||
|
|||
/** |
|||
* 核酸检测时间:yyyy-MM-dd 日期 |
|||
*/ |
|||
@NotNull(message = "natTime不能为空",groups = {AddGroup.class}) |
|||
@JsonFormat(pattern="yyyy-MM-dd") |
|||
private Date natTime; |
|||
|
|||
/** |
|||
* 受众人数 |
|||
*/ |
|||
@NotNull(message = "szTotal不能为空",groups = {AddGroup.class}) |
|||
private Integer szTotal; |
|||
|
|||
/** |
|||
* 核酸检测人数 |
|||
*/ |
|||
@NotNull(message = "customerId不能为空",groups = {AddGroup.class}) |
|||
private Integer hsjcTotal; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/10/27 09:01 |
|||
*/ |
|||
@Data |
|||
public class EmployeeRegisterListFormDTO extends PageFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -5327830228503748858L; |
|||
|
|||
private String customerId; |
|||
private String staffId; |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 核酸检测开始、结束日期,eg:2022-02-02 |
|||
*/ |
|||
private String natStartDate; |
|||
private String natEndDate; |
|||
|
|||
/** |
|||
* 检查状态,1:已检测;0:未检测 |
|||
*/ |
|||
private String checkStatus; |
|||
|
|||
private String placeOrgName; |
|||
|
|||
/** |
|||
* 场所类别:0九小场所、1企事业单位 |
|||
*/ |
|||
private String placeCategory; |
|||
|
|||
private String name; |
|||
private String mobile; |
|||
private String idCard; |
|||
|
|||
public interface RegisterDetailList{} |
|||
|
|||
/** |
|||
* 人员详情列表使用 |
|||
*/ |
|||
@NotBlank(message = "registerId不能为空",groups = RegisterDetailList.class) |
|||
private String registerId; |
|||
|
|||
private List<String> registerIds; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/10/27 10:47 |
|||
*/ |
|||
@Data |
|||
public class GroupPeopleRegisterListFormDTO extends PageFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 6837328932168590069L; |
|||
|
|||
private String customerId; |
|||
private String staffId; |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 核酸检测开始、结束日期,eg:2022-02-02 |
|||
*/ |
|||
private String natStartDate; |
|||
private String natEndDate; |
|||
|
|||
private String placeOrgName; |
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/10/27 09:10 |
|||
*/ |
|||
@Data |
|||
public class EmployeeRegisterListResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -7966608283208846072L; |
|||
|
|||
private String placeOrgName; |
|||
private String name; |
|||
private String mobile; |
|||
private String idCard; |
|||
private Integer ymjzCount; |
|||
private String latestNatTime; |
|||
private String registerId; |
|||
|
|||
private String agencyId; |
|||
|
|||
public EmployeeRegisterListResultDTO() { |
|||
this.placeOrgName = ""; |
|||
this.name = ""; |
|||
this.mobile = ""; |
|||
this.idCard = ""; |
|||
this.ymjzCount = NumConstant.ZERO; |
|||
this.latestNatTime = ""; |
|||
this.registerId = ""; |
|||
this.agencyId = ""; |
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/10/27 10:53 |
|||
*/ |
|||
@Data |
|||
public class GroupPeopleRegisterListResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -3000826126115218664L; |
|||
|
|||
private String placeOrgName; |
|||
private String natTime; |
|||
private String szTotal; |
|||
private String hsjcTotal; |
|||
private String id; |
|||
private String agencyId; |
|||
} |
@ -0,0 +1,117 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.annotation.MaskResponse; |
|||
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.dto.IcEmployeeRegisterDTO; |
|||
import com.epmet.dto.form.EmployeeRegisterListFormDTO; |
|||
import com.epmet.dto.result.EmployeeRegisterListResultDTO; |
|||
import com.epmet.service.IcEmployeeRegisterService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 员工登记表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("icEmployeeRegister") |
|||
public class IcEmployeeRegisterController { |
|||
|
|||
@Autowired |
|||
private IcEmployeeRegisterService icEmployeeRegisterService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<IcEmployeeRegisterDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<IcEmployeeRegisterDTO> page = icEmployeeRegisterService.page(params); |
|||
return new Result<PageData<IcEmployeeRegisterDTO>>().ok(page); |
|||
} |
|||
|
|||
@PostMapping(value = "{id}") |
|||
public Result<IcEmployeeRegisterDTO> get(@PathVariable("id") String id){ |
|||
IcEmployeeRegisterDTO data = icEmployeeRegisterService.get(id); |
|||
return new Result<IcEmployeeRegisterDTO>().ok(data); |
|||
} |
|||
|
|||
/** |
|||
* @Description 新增 员工登记:http://yapi.elinkservice.cn/project/102/interface/api/8214
|
|||
* @param dto |
|||
* @Author zxc |
|||
* @Date 2022/10/27 08:57 |
|||
*/ |
|||
@NoRepeatSubmit |
|||
@PostMapping("add") |
|||
public Result save(@RequestBody IcEmployeeRegisterDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
icEmployeeRegisterService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody IcEmployeeRegisterDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
icEmployeeRegisterService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 批量删除 http://yapi.elinkservice.cn/project/102/interface/api/8238
|
|||
* @param ids |
|||
* @Author zxc |
|||
* @Date 2022/10/27 08:57 |
|||
*/ |
|||
@PostMapping("delete") |
|||
public Result delete(@LoginUser TokenDto tokenDto,@RequestBody List<String> ids){ |
|||
icEmployeeRegisterService.delete(ids,tokenDto.getUserId()); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 员工疫情管理列表 |
|||
* @param formDTO |
|||
* @param tokenDto |
|||
* @Author zxc |
|||
* @Date 2022/10/27 09:15 |
|||
*/ |
|||
@PostMapping("list") |
|||
@MaskResponse(fieldNames = { "mobile", "idCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) |
|||
public Result<PageData<EmployeeRegisterListResultDTO>> employeeRegisterList(@RequestBody EmployeeRegisterListFormDTO formDTO, @LoginUser TokenDto tokenDto){ |
|||
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); |
|||
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
formDTO.setStaffId(tokenDto.getUserId()); |
|||
return new Result<PageData<EmployeeRegisterListResultDTO>>().ok(icEmployeeRegisterService.employeeRegisterList(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 员工疫情管理详情列表 |
|||
* @param formDTO |
|||
* @param tokenDto |
|||
* @Author zxc |
|||
* @Date 2022/10/27 09:22 |
|||
*/ |
|||
@PostMapping("detailList") |
|||
@MaskResponse(fieldNames = { "mobile", "idCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) |
|||
public Result<PageData<EmployeeRegisterListResultDTO>> employeeRegisterDetailList(@RequestBody EmployeeRegisterListFormDTO formDTO, @LoginUser TokenDto tokenDto){ |
|||
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class, EmployeeRegisterListFormDTO.RegisterDetailList.class); |
|||
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
formDTO.setStaffId(tokenDto.getUserId()); |
|||
return new Result<PageData<EmployeeRegisterListResultDTO>>().ok(icEmployeeRegisterService.employeeRegisterDetailList(formDTO)); |
|||
} |
|||
} |
@ -0,0 +1,72 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.IcEmployeeRegisterDetailDTO; |
|||
import com.epmet.service.IcEmployeeRegisterDetailService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 员工登记明细表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("icEmployeeRegisterDetail") |
|||
public class IcEmployeeRegisterDetailController { |
|||
|
|||
@Autowired |
|||
private IcEmployeeRegisterDetailService icEmployeeRegisterDetailService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<IcEmployeeRegisterDetailDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<IcEmployeeRegisterDetailDTO> page = icEmployeeRegisterDetailService.page(params); |
|||
return new Result<PageData<IcEmployeeRegisterDetailDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
|||
public Result<IcEmployeeRegisterDetailDTO> get(@PathVariable("id") String id){ |
|||
IcEmployeeRegisterDetailDTO data = icEmployeeRegisterDetailService.get(id); |
|||
return new Result<IcEmployeeRegisterDetailDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@RequestBody IcEmployeeRegisterDetailDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
icEmployeeRegisterDetailService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody IcEmployeeRegisterDetailDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
icEmployeeRegisterDetailService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
icEmployeeRegisterDetailService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,99 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.dto.IcGroupPeopleRegisterDTO; |
|||
import com.epmet.dto.form.GroupPeopleRegisterListFormDTO; |
|||
import com.epmet.dto.result.GroupPeopleRegisterListResultDTO; |
|||
import com.epmet.service.IcGroupPeopleRegisterService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 受众群体登记表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("icGroupPeopleRegister") |
|||
public class IcGroupPeopleRegisterController { |
|||
|
|||
@Autowired |
|||
private IcGroupPeopleRegisterService icGroupPeopleRegisterService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<IcGroupPeopleRegisterDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<IcGroupPeopleRegisterDTO> page = icGroupPeopleRegisterService.page(params); |
|||
return new Result<PageData<IcGroupPeopleRegisterDTO>>().ok(page); |
|||
} |
|||
|
|||
@PostMapping(value = "{id}") |
|||
public Result<IcGroupPeopleRegisterDTO> get(@PathVariable("id") String id){ |
|||
IcGroupPeopleRegisterDTO data = icGroupPeopleRegisterService.get(id); |
|||
return new Result<IcGroupPeopleRegisterDTO>().ok(data); |
|||
} |
|||
|
|||
/** |
|||
* 受众群体登记 http://yapi.elinkservice.cn/project/102/interface/api/8220
|
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@NoRepeatSubmit |
|||
@PostMapping("add") |
|||
public Result save(@RequestBody IcGroupPeopleRegisterDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
icGroupPeopleRegisterService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody IcGroupPeopleRegisterDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
icGroupPeopleRegisterService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* 受众群体管理删除 |
|||
* http://yapi.elinkservice.cn/project/102/interface/api/8250
|
|||
* @param ids |
|||
* @return |
|||
*/ |
|||
@PostMapping("delete") |
|||
public Result delete(@LoginUser TokenDto tokenDto,@RequestBody List<String> ids){ |
|||
icGroupPeopleRegisterService.delete(ids,tokenDto.getUserId()); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 受众群体列表 http://yapi.elinkservice.cn/project/102/interface/api/8244
|
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @Author zxc |
|||
* @Date 2022/10/27 10:51 |
|||
*/ |
|||
@PostMapping("list") |
|||
public Result<PageData<GroupPeopleRegisterListResultDTO>> groupPeopleRegisterList(@LoginUser TokenDto tokenDto, @RequestBody GroupPeopleRegisterListFormDTO formDTO){ |
|||
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); |
|||
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
formDTO.setStaffId(tokenDto.getUserId()); |
|||
return new Result<PageData<GroupPeopleRegisterListResultDTO>>().ok(icGroupPeopleRegisterService.groupPeopleRegisterList(formDTO)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,55 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.IcEmployeeRegisterDTO; |
|||
import com.epmet.dto.form.EmployeeRegisterListFormDTO; |
|||
import com.epmet.dto.result.EmployeeRegisterListResultDTO; |
|||
import com.epmet.entity.IcEmployeeRegisterEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 员工登记表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@Mapper |
|||
public interface IcEmployeeRegisterDao extends BaseDao<IcEmployeeRegisterEntity> { |
|||
|
|||
/** |
|||
* @Description 根据身份证查询是否存在 |
|||
* @param idCard |
|||
* @Author zxc |
|||
* @Date 2022/10/26 17:34 |
|||
*/ |
|||
IcEmployeeRegisterEntity getEmployeeRegisterByIdCard(@Param("idCard")String idCard); |
|||
|
|||
/** |
|||
* @Description 根据主表ID删除子表 |
|||
* @param registerIds |
|||
* @Author zxc |
|||
* @Date 2022/10/26 17:34 |
|||
*/ |
|||
void delRegisterDetail(@Param("registerIds")List<String> registerIds,@Param("operUserId")String operUserId); |
|||
|
|||
/** |
|||
* @Description 员工疫情管理列表 |
|||
* @param formDTO |
|||
* @Author zxc |
|||
* @Date 2022/10/27 09:15 |
|||
*/ |
|||
List<EmployeeRegisterListResultDTO> employeeRegisterList(EmployeeRegisterListFormDTO formDTO); |
|||
List<EmployeeRegisterListResultDTO> employeeRegisterListNoCheck(EmployeeRegisterListFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Description 员工疫情管理详情列表 |
|||
* @param formDTO |
|||
* @Author zxc |
|||
* @Date 2022/10/27 13:24 |
|||
*/ |
|||
List<EmployeeRegisterListResultDTO> employeeRegisterDetailList(EmployeeRegisterListFormDTO formDTO); |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.IcEmployeeRegisterDetailEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 员工登记明细表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@Mapper |
|||
public interface IcEmployeeRegisterDetailDao extends BaseDao<IcEmployeeRegisterDetailEntity> { |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.form.GroupPeopleRegisterListFormDTO; |
|||
import com.epmet.dto.result.GroupPeopleRegisterListResultDTO; |
|||
import com.epmet.entity.IcGroupPeopleRegisterEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 受众群体登记表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@Mapper |
|||
public interface IcGroupPeopleRegisterDao extends BaseDao<IcGroupPeopleRegisterEntity> { |
|||
|
|||
List<GroupPeopleRegisterListResultDTO> groupPeopleRegisterList(GroupPeopleRegisterListFormDTO formDTO); |
|||
|
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 员工登记明细表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_employee_register_detail") |
|||
public class IcEmployeeRegisterDetailEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* ic_employee_register.ID |
|||
*/ |
|||
private String registerId; |
|||
|
|||
/** |
|||
* 疫苗接种次数:0,1,2,3 |
|||
*/ |
|||
private Integer ymjzCount; |
|||
|
|||
/** |
|||
* 最近一次核酸检测时间:yyyy-MM-dd 日期 |
|||
*/ |
|||
private Date latestNatTime; |
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 员工登记表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_employee_register") |
|||
public class IcEmployeeRegisterEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 场所id |
|||
*/ |
|||
private String enterpriseId; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 身份证号或护照号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 受众群体登记表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ic_group_people_register") |
|||
public class IcGroupPeopleRegisterEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 场所id |
|||
*/ |
|||
private String enterpriseId; |
|||
|
|||
/** |
|||
* 核酸检测时间:yyyy-MM-dd 日期 |
|||
*/ |
|||
private Date natTime; |
|||
|
|||
/** |
|||
* 受众人数 |
|||
*/ |
|||
private Integer szTotal; |
|||
|
|||
/** |
|||
* 核酸检测人数 |
|||
*/ |
|||
private Integer hsjcTotal; |
|||
|
|||
} |
@ -0,0 +1,78 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.IcEmployeeRegisterDetailDTO; |
|||
import com.epmet.entity.IcEmployeeRegisterDetailEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 员工登记明细表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
public interface IcEmployeeRegisterDetailService extends BaseService<IcEmployeeRegisterDetailEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IcEmployeeRegisterDetailDTO> |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
PageData<IcEmployeeRegisterDetailDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IcEmployeeRegisterDetailDTO> |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
List<IcEmployeeRegisterDetailDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IcEmployeeRegisterDetailDTO |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
IcEmployeeRegisterDetailDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
void save(IcEmployeeRegisterDetailDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
void update(IcEmployeeRegisterDetailDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,95 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.IcEmployeeRegisterDTO; |
|||
import com.epmet.dto.form.EmployeeRegisterListFormDTO; |
|||
import com.epmet.dto.result.EmployeeRegisterListResultDTO; |
|||
import com.epmet.entity.IcEmployeeRegisterEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 员工登记表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
public interface IcEmployeeRegisterService extends BaseService<IcEmployeeRegisterEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IcEmployeeRegisterDTO> |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
PageData<IcEmployeeRegisterDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IcEmployeeRegisterDTO> |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
List<IcEmployeeRegisterDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IcEmployeeRegisterDTO |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
IcEmployeeRegisterDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
void save(IcEmployeeRegisterDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
void update(IcEmployeeRegisterDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
void delete(List<String> ids,String operUserId); |
|||
|
|||
/** |
|||
* @Description 员工疫情管理列表 |
|||
* @param formDTO |
|||
* @Author zxc |
|||
* @Date 2022/10/27 09:15 |
|||
*/ |
|||
PageData<EmployeeRegisterListResultDTO> employeeRegisterList(EmployeeRegisterListFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Description 员工疫情管理详情列表 |
|||
* @param formDTO |
|||
* @Author zxc |
|||
* @Date 2022/10/27 09:22 |
|||
*/ |
|||
PageData<EmployeeRegisterListResultDTO> employeeRegisterDetailList(EmployeeRegisterListFormDTO formDTO); |
|||
} |
@ -0,0 +1,88 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.IcGroupPeopleRegisterDTO; |
|||
import com.epmet.dto.form.GroupPeopleRegisterListFormDTO; |
|||
import com.epmet.dto.result.GroupPeopleRegisterListResultDTO; |
|||
import com.epmet.entity.IcGroupPeopleRegisterEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 受众群体登记表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
public interface IcGroupPeopleRegisterService extends BaseService<IcGroupPeopleRegisterEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<IcGroupPeopleRegisterDTO> |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
PageData<IcGroupPeopleRegisterDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<IcGroupPeopleRegisterDTO> |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
List<IcGroupPeopleRegisterDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return IcGroupPeopleRegisterDTO |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
IcGroupPeopleRegisterDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
void save(IcGroupPeopleRegisterDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
void update(IcGroupPeopleRegisterDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-10-26 |
|||
*/ |
|||
void delete(List<String> ids,String operUserId); |
|||
|
|||
/** |
|||
* @Description 受众群体列表 |
|||
* @param formDTO |
|||
* @Author zxc |
|||
* @Date 2022/10/27 10:51 |
|||
*/ |
|||
PageData<GroupPeopleRegisterListResultDTO> groupPeopleRegisterList(GroupPeopleRegisterListFormDTO formDTO); |
|||
|
|||
} |
@ -0,0 +1,83 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.dao.IcEmployeeRegisterDetailDao; |
|||
import com.epmet.dto.IcEmployeeRegisterDetailDTO; |
|||
import com.epmet.entity.IcEmployeeRegisterDetailEntity; |
|||
import com.epmet.service.IcEmployeeRegisterDetailService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 员工登记明细表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@Service |
|||
public class IcEmployeeRegisterDetailServiceImpl extends BaseServiceImpl<IcEmployeeRegisterDetailDao, IcEmployeeRegisterDetailEntity> implements IcEmployeeRegisterDetailService { |
|||
|
|||
@Override |
|||
public PageData<IcEmployeeRegisterDetailDTO> page(Map<String, Object> params) { |
|||
IPage<IcEmployeeRegisterDetailEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IcEmployeeRegisterDetailDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<IcEmployeeRegisterDetailDTO> list(Map<String, Object> params) { |
|||
List<IcEmployeeRegisterDetailEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IcEmployeeRegisterDetailDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<IcEmployeeRegisterDetailEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IcEmployeeRegisterDetailEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IcEmployeeRegisterDetailDTO get(String id) { |
|||
IcEmployeeRegisterDetailEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IcEmployeeRegisterDetailDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(IcEmployeeRegisterDetailDTO dto) { |
|||
IcEmployeeRegisterDetailEntity entity = ConvertUtils.sourceToTarget(dto, IcEmployeeRegisterDetailEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(IcEmployeeRegisterDetailDTO dto) { |
|||
IcEmployeeRegisterDetailEntity entity = ConvertUtils.sourceToTarget(dto, IcEmployeeRegisterDetailEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,195 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.EpmetException; |
|||
import com.epmet.commons.tools.exception.ErrorCode; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.IdCardRegexUtils; |
|||
import com.epmet.dao.IcEmployeeRegisterDao; |
|||
import com.epmet.dto.IcEmployeeRegisterDTO; |
|||
import com.epmet.dto.form.EmployeeRegisterListFormDTO; |
|||
import com.epmet.dto.result.EmployeeRegisterListResultDTO; |
|||
import com.epmet.entity.IcEmployeeRegisterDetailEntity; |
|||
import com.epmet.entity.IcEmployeeRegisterEntity; |
|||
import com.epmet.service.IcEmployeeRegisterDetailService; |
|||
import com.epmet.service.IcEmployeeRegisterService; |
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.lang3.RegExUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* 员工登记表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@Service |
|||
public class IcEmployeeRegisterServiceImpl extends BaseServiceImpl<IcEmployeeRegisterDao, IcEmployeeRegisterEntity> implements IcEmployeeRegisterService { |
|||
|
|||
@Autowired |
|||
private IcEmployeeRegisterDetailService icEmployeeRegisterDetailService; |
|||
|
|||
@Override |
|||
public PageData<IcEmployeeRegisterDTO> page(Map<String, Object> params) { |
|||
IPage<IcEmployeeRegisterEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IcEmployeeRegisterDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<IcEmployeeRegisterDTO> list(Map<String, Object> params) { |
|||
List<IcEmployeeRegisterEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IcEmployeeRegisterDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<IcEmployeeRegisterEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IcEmployeeRegisterEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IcEmployeeRegisterDTO get(String id) { |
|||
IcEmployeeRegisterEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IcEmployeeRegisterDTO.class); |
|||
} |
|||
|
|||
/** |
|||
* @Description 新增 |
|||
* @param dto |
|||
* @Author zxc |
|||
* @Date 2022/10/27 08:57 |
|||
*/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(IcEmployeeRegisterDTO dto) { |
|||
if (!IdCardRegexUtils.validateIdCard(dto.getIdCard())) { |
|||
throw new EpmetException(EpmetErrorCode.ID_CARD_ERROR.getCode()); |
|||
} |
|||
IcEmployeeRegisterDetailEntity detailEntity = ConvertUtils.sourceToTarget(dto, IcEmployeeRegisterDetailEntity.class); |
|||
// 先看看存在不
|
|||
IcEmployeeRegisterEntity origin = baseDao.getEmployeeRegisterByIdCard(dto.getIdCard()); |
|||
if (null == origin){ |
|||
IcEmployeeRegisterEntity insertEntity = ConvertUtils.sourceToTarget(dto, IcEmployeeRegisterEntity.class); |
|||
insert(insertEntity); |
|||
detailEntity.setRegisterId(insertEntity.getId()); |
|||
}else { |
|||
if(!origin.getName().equals(dto.getName())||!origin.getMobile().equals(dto.getMobile())){ |
|||
origin.setMobile(dto.getMobile()); |
|||
origin.setName(dto.getName()); |
|||
origin.setUpdatedTime(new Date()); |
|||
updateById(origin); |
|||
} |
|||
detailEntity.setRegisterId(origin.getId()); |
|||
} |
|||
icEmployeeRegisterDetailService.insert(detailEntity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(IcEmployeeRegisterDTO dto) { |
|||
IcEmployeeRegisterEntity entity = ConvertUtils.sourceToTarget(dto, IcEmployeeRegisterEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
/** |
|||
* @Description 批量删除 |
|||
* @param ids |
|||
* @Author zxc |
|||
* @Date 2022/10/27 08:57 |
|||
*/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(List<String> ids,String operUserId) { |
|||
if (CollectionUtils.isNotEmpty(ids)){ |
|||
LambdaUpdateWrapper<IcEmployeeRegisterEntity> updateWrapper=new LambdaUpdateWrapper<>(); |
|||
updateWrapper.in(IcEmployeeRegisterEntity::getId,ids); |
|||
updateWrapper.set(IcEmployeeRegisterEntity::getDelFlag, NumConstant.ONE_STR) |
|||
.set(IcEmployeeRegisterEntity::getUpdatedBy,operUserId) |
|||
.set(IcEmployeeRegisterEntity::getUpdatedTime,new Date()); |
|||
baseDao.update(null,updateWrapper); |
|||
baseDao.delRegisterDetail(ids,operUserId); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @Description 员工疫情管理列表 |
|||
* @param formDTO |
|||
* @Author zxc |
|||
* @Date 2022/10/27 09:15 |
|||
*/ |
|||
@Override |
|||
public PageData<EmployeeRegisterListResultDTO> employeeRegisterList(EmployeeRegisterListFormDTO formDTO) { |
|||
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); |
|||
if (null == staffInfo){ |
|||
throw new EpmetException("未查询到工作人员信息:"+formDTO.getStaffId()); |
|||
} |
|||
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|||
PageData<EmployeeRegisterListResultDTO> result = new PageData<>(); |
|||
// 未核酸检测的查询,根据所有企业下登记过的员工,筛出时间段内已检测的,剩下的就是未检测
|
|||
if (formDTO.getIsPage()){ |
|||
PageInfo<EmployeeRegisterListResultDTO> pageInfo = new PageInfo<>(); |
|||
if (StringUtils.isNotBlank(formDTO.getCheckStatus()) && formDTO.getCheckStatus().equals(NumConstant.ZERO_STR)){ |
|||
// 已检测
|
|||
List<EmployeeRegisterListResultDTO> checked = baseDao.employeeRegisterList(formDTO); |
|||
if (CollectionUtils.isNotEmpty(checked)){ |
|||
formDTO.setRegisterIds(checked.stream().map(m -> m.getRegisterId()).collect(Collectors.toList())); |
|||
pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.employeeRegisterListNoCheck(formDTO)); |
|||
} |
|||
}else { |
|||
pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.employeeRegisterList(formDTO)); |
|||
} |
|||
result.setList(pageInfo.getList()); |
|||
result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); |
|||
} |
|||
return result; |
|||
} |
|||
|
|||
/** |
|||
* @Description 员工疫情管理详情列表 |
|||
* @param formDTO |
|||
* @Author zxc |
|||
* @Date 2022/10/27 09:22 |
|||
*/ |
|||
@Override |
|||
public PageData<EmployeeRegisterListResultDTO> employeeRegisterDetailList(EmployeeRegisterListFormDTO formDTO) { |
|||
PageData<EmployeeRegisterListResultDTO> result = new PageData<>(); |
|||
List<EmployeeRegisterListResultDTO> list; |
|||
if (formDTO.getIsPage()){ |
|||
PageInfo<EmployeeRegisterListResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.employeeRegisterDetailList(formDTO)); |
|||
result.setList(pageInfo.getList()); |
|||
result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); |
|||
}else { |
|||
list = baseDao.employeeRegisterDetailList(formDTO); |
|||
result.setTotal(list.size()); |
|||
result.setList(list); |
|||
} |
|||
return result; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,133 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|||
import com.epmet.commons.tools.exception.EpmetException; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.IcGroupPeopleRegisterDao; |
|||
import com.epmet.dto.IcGroupPeopleRegisterDTO; |
|||
import com.epmet.dto.form.GroupPeopleRegisterListFormDTO; |
|||
import com.epmet.dto.result.GroupPeopleRegisterListResultDTO; |
|||
import com.epmet.entity.IcGroupPeopleRegisterEntity; |
|||
import com.epmet.service.IcGroupPeopleRegisterService; |
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 受众群体登记表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-10-26 |
|||
*/ |
|||
@Service |
|||
public class IcGroupPeopleRegisterServiceImpl extends BaseServiceImpl<IcGroupPeopleRegisterDao, IcGroupPeopleRegisterEntity> implements IcGroupPeopleRegisterService { |
|||
|
|||
@Override |
|||
public PageData<IcGroupPeopleRegisterDTO> page(Map<String, Object> params) { |
|||
IPage<IcGroupPeopleRegisterEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, IcGroupPeopleRegisterDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<IcGroupPeopleRegisterDTO> list(Map<String, Object> params) { |
|||
List<IcGroupPeopleRegisterEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, IcGroupPeopleRegisterDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<IcGroupPeopleRegisterEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<IcGroupPeopleRegisterEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public IcGroupPeopleRegisterDTO get(String id) { |
|||
IcGroupPeopleRegisterEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, IcGroupPeopleRegisterDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(IcGroupPeopleRegisterDTO dto) { |
|||
IcGroupPeopleRegisterEntity entity = ConvertUtils.sourceToTarget(dto, IcGroupPeopleRegisterEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(IcGroupPeopleRegisterDTO dto) { |
|||
IcGroupPeopleRegisterEntity entity = ConvertUtils.sourceToTarget(dto, IcGroupPeopleRegisterEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
/** |
|||
* 受众群体管理删除 |
|||
* http://yapi.elinkservice.cn/project/102/interface/api/8250
|
|||
* @param ids |
|||
* @param operUserId 当前操作人 |
|||
* @return |
|||
*/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(List<String> ids,String operUserId) { |
|||
if (CollectionUtils.isNotEmpty(ids)){ |
|||
LambdaUpdateWrapper<IcGroupPeopleRegisterEntity> updateWrapper=new LambdaUpdateWrapper<>(); |
|||
updateWrapper.in(IcGroupPeopleRegisterEntity::getId,ids) |
|||
.set(IcGroupPeopleRegisterEntity::getUpdatedBy,operUserId) |
|||
.set(IcGroupPeopleRegisterEntity::getUpdatedTime,new Date()) |
|||
.set(IcGroupPeopleRegisterEntity::getDelFlag, NumConstant.ONE_STR); |
|||
baseDao.update(null,updateWrapper); |
|||
// baseDao.deleteBatchIds(ids);
|
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @Description 受众群体列表 |
|||
* @param formDTO |
|||
* @Author zxc |
|||
* @Date 2022/10/27 10:51 |
|||
*/ |
|||
@Override |
|||
public PageData<GroupPeopleRegisterListResultDTO> groupPeopleRegisterList(GroupPeopleRegisterListFormDTO formDTO) { |
|||
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); |
|||
if (null == staffInfo){ |
|||
throw new EpmetException("未查询到工作人员信息:"+formDTO.getStaffId()); |
|||
} |
|||
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|||
PageData<GroupPeopleRegisterListResultDTO> result = new PageData<>(); |
|||
List<GroupPeopleRegisterListResultDTO> list; |
|||
if (formDTO.getIsPage()){ |
|||
PageInfo<GroupPeopleRegisterListResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.groupPeopleRegisterList(formDTO)); |
|||
result.setList(pageInfo.getList()); |
|||
result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); |
|||
}else { |
|||
list = baseDao.groupPeopleRegisterList(formDTO); |
|||
result.setList(list); |
|||
result.setTotal(list.size()); |
|||
} |
|||
return result; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,24 @@ |
|||
alter table ic_enterprise MODIFY COLUMN `SCALE` varchar(128) NOT NULL DEFAULT'-1' COMMENT '已弃用该字段,字典value,场所规模【\r\n0:10人以下\r\n1:10-20人\r\n2:21-40人\r\n3:41-100人\r\n4:100人以上】'; |
|||
alter table ic_enterprise ADD COLUMN `SCALE_TOTAL` int(11) NOT NULL COMMENT '规模,手输数字' AFTER SCALE; |
|||
alter table ic_enterprise add COLUMN PLACE_CATEGORY varchar(32) NOT NULL DEFAULT '0' COMMENT '场所类别:0九小场所、1企事业单位' after PLACE_TYPE; |
|||
|
|||
|
|||
update ic_enterprise e |
|||
set e.SCALE_TOTAL=5 |
|||
where e.SCALE=0; |
|||
|
|||
update ic_enterprise e |
|||
set e.SCALE_TOTAL=15 |
|||
where e.SCALE=1; |
|||
|
|||
update ic_enterprise e |
|||
set e.SCALE_TOTAL=30 |
|||
where e.SCALE=2; |
|||
|
|||
update ic_enterprise e |
|||
set e.SCALE_TOTAL=70 |
|||
where e.SCALE=3; |
|||
|
|||
update ic_enterprise e |
|||
set e.SCALE_TOTAL=100 |
|||
where e.SCALE=4; |
@ -0,0 +1,48 @@ |
|||
CREATE TABLE `ic_employee_register` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
|||
`ENTERPRISE_ID` varchar(64) NOT NULL COMMENT '场所id', |
|||
`NAME` varchar(64) NOT NULL COMMENT '姓名', |
|||
`MOBILE` varchar(32) NOT NULL COMMENT '手机号', |
|||
`ID_CARD` varchar(32) NOT NULL COMMENT '身份证号或护照号', |
|||
`DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`), |
|||
KEY `IDX_ENTERPRISE_ID` (`ENTERPRISE_ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='员工登记表'; |
|||
|
|||
CREATE TABLE `ic_employee_register_detail` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
|||
`REGISTER_ID` varchar(64) NOT NULL COMMENT 'ic_employee_register.ID', |
|||
`YMJZ_COUNT` int(11) NOT NULL COMMENT '疫苗接种次数:0,1,2,3', |
|||
`LATEST_NAT_TIME` date NOT NULL COMMENT '最近一次核酸检测时间:yyyy-MM-dd 日期', |
|||
`DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`), |
|||
KEY `IDX_REGISTER_ID` (`REGISTER_ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='员工登记明细表'; |
|||
|
|||
CREATE TABLE `ic_group_people_register` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
|||
`ENTERPRISE_ID` varchar(64) NOT NULL COMMENT '场所id', |
|||
`NAT_TIME` date NOT NULL COMMENT '核酸检测时间:yyyy-MM-dd 日期', |
|||
`SZ_TOTAL` int(11) NOT NULL COMMENT '受众人数', |
|||
`HSJC_TOTAL` int(11) NOT NULL COMMENT '核酸检测人数', |
|||
`DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='受众群体登记表'; |
Binary file not shown.
@ -0,0 +1,152 @@ |
|||
<?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.epmet.dao.IcEmployeeRegisterDao"> |
|||
|
|||
<!-- 根据主表ID删除子表 --> |
|||
<update id="delRegisterDetail"> |
|||
update ic_employee_register_detail |
|||
set del_flag = 1, |
|||
updated_time = NOW(), |
|||
UPDATED_BY = #{operUserId} |
|||
where REGISTER_ID in ( |
|||
<foreach collection="registerIds" item="registerId" separator=","> |
|||
#{registerId} |
|||
</foreach> |
|||
) |
|||
</update> |
|||
|
|||
<select id="getEmployeeRegisterByIdCard" resultType="com.epmet.entity.IcEmployeeRegisterEntity"> |
|||
select * from ic_employee_register |
|||
where del_flag = 0 and id_card = #{idCard} |
|||
</select> |
|||
|
|||
<!-- 员工疫情管理列表 --> |
|||
<select id="employeeRegisterList" resultType="com.epmet.dto.result.EmployeeRegisterListResultDTO"> |
|||
SELECT |
|||
t.* |
|||
FROM( |
|||
SELECT |
|||
DISTINCT ier.ID AS registerId, |
|||
rd.YMJZ_COUNT, |
|||
rd.LATEST_NAT_TIME, |
|||
rd.CREATED_TIME, |
|||
ier.`NAME`, |
|||
ier.MOBILE, |
|||
ier.ID_CARD, |
|||
ier.ENTERPRISE_ID, |
|||
ie.PLACE_ORG_NAME, |
|||
ie.PLACE_CATEGORY, |
|||
ie.AGENCY_ID |
|||
FROM ic_enterprise ie |
|||
INNER join ic_employee_register ier ON ier.ENTERPRISE_ID = ie.ID AND ier.DEL_FLAG = 0 |
|||
left JOIN ic_employee_register_detail rd ON rd.REGISTER_ID = ier.ID AND rd.DEL_FLAG = 0 |
|||
WHERE ie.DEL_FLAG = 0 |
|||
AND CONCAT(ie.AGENCY_PIDS,':',ie.AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%') |
|||
<if test='null != natStartDate and natStartDate != ""'> |
|||
AND DATE_FORMAT(rd.LATEST_NAT_TIME,'%Y-%m-%d') >= #{natStartDate} |
|||
</if> |
|||
<if test='null != natEndDate and natEndDate != ""'> |
|||
AND DATE_FORMAT(rd.LATEST_NAT_TIME,'%Y-%m-%d') <![CDATA[<=]]> #{natEndDate} |
|||
</if> |
|||
ORDER BY rd.CREATED_TIME DESC |
|||
)t |
|||
where 1=1 |
|||
<if test='null != natStartDate and natStartDate != ""'> |
|||
AND DATE_FORMAT(LATEST_NAT_TIME,'%Y-%m-%d') >= #{natStartDate} |
|||
</if> |
|||
<if test='null != natEndDate and natEndDate != ""'> |
|||
AND DATE_FORMAT(LATEST_NAT_TIME,'%Y-%m-%d') <![CDATA[<=]]> #{natEndDate} |
|||
</if> |
|||
<if test='null != placeOrgName and placeOrgName != ""'> |
|||
AND PLACE_ORG_NAME LIKE CONCAT('%',#{placeOrgName},'%') |
|||
</if> |
|||
<if test='null != placeCategory and placeCategory != ""'> |
|||
AND PLACE_CATEGORY = #{placeCategory} |
|||
</if> |
|||
<if test='null != name and name != ""'> |
|||
AND name LIKE CONCAT('%',#{name},'%') |
|||
</if> |
|||
<if test='null != mobile and mobile != ""'> |
|||
AND mobile LIKE CONCAT('%',#{mobile},'%') |
|||
</if> |
|||
<if test='null != idCard and idCard != ""'> |
|||
AND ID_CARD LIKE CONCAT('%',#{idCard},'%') |
|||
</if> |
|||
GROUP BY t.registerId |
|||
ORDER BY LATEST_NAT_TIME desc |
|||
</select> |
|||
|
|||
<!-- 员工疫情管理详情列表 --> |
|||
<select id="employeeRegisterDetailList" resultType="com.epmet.dto.result.EmployeeRegisterListResultDTO"> |
|||
SELECT |
|||
ier.`NAME`, |
|||
ier.MOBILE, |
|||
ier.ID_CARD, |
|||
rd.YMJZ_COUNT, |
|||
rd.LATEST_NAT_TIME, |
|||
ie.PLACE_ORG_NAME, |
|||
ie.AGENCY_ID, |
|||
ier.ID AS registerId |
|||
FROM ic_employee_register ier |
|||
LEFT JOIN ic_enterprise ie ON ie.ID = ier.ENTERPRISE_ID AND ie.DEL_FLAG = 0 |
|||
LEFT JOIN ic_employee_register_detail rd ON rd.REGISTER_ID = ier.ID AND rd.DEL_FLAG = 0 |
|||
WHERE ier.DEL_FLAG = 0 |
|||
AND ier.ID = #{registerId} |
|||
<if test='null != natStartDate and natStartDate != "" '> |
|||
AND DATE_FORMAT(rd.LATEST_NAT_TIME,'%Y-%m-%d') >= #{natStartDate} |
|||
</if> |
|||
<if test='null != natEndDate and natEndDate != "" '> |
|||
AND DATE_FORMAT(rd.LATEST_NAT_TIME,'%Y-%m-%d') <![CDATA[<=]]> #{natEndDate} |
|||
</if> |
|||
ORDER BY rd.LATEST_NAT_TIME DESC,rd.CREATED_TIME desc |
|||
</select> |
|||
|
|||
<select id="employeeRegisterListNoCheck" resultType="com.epmet.dto.result.EmployeeRegisterListResultDTO"> |
|||
SELECT |
|||
t.* |
|||
FROM( |
|||
SELECT |
|||
DISTINCT ier.ID AS registerId, |
|||
rd.YMJZ_COUNT, |
|||
rd.LATEST_NAT_TIME, |
|||
rd.CREATED_TIME, |
|||
ier.`NAME`, |
|||
ier.MOBILE, |
|||
ier.ID_CARD, |
|||
ier.ENTERPRISE_ID, |
|||
ie.PLACE_ORG_NAME, |
|||
ie.PLACE_CATEGORY, |
|||
ie.AGENCY_ID |
|||
FROM ic_enterprise ie |
|||
INNER join ic_employee_register ier ON ier.ENTERPRISE_ID = ie.ID AND ier.DEL_FLAG = 0 |
|||
left JOIN ic_employee_register_detail rd ON rd.REGISTER_ID = ier.ID AND rd.DEL_FLAG = 0 |
|||
WHERE ie.DEL_FLAG = 0 |
|||
AND CONCAT(ie.AGENCY_PIDS,':',ie.AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%') |
|||
ORDER BY rd.CREATED_TIME DESC |
|||
)t |
|||
where 1=1 |
|||
AND ( |
|||
<foreach collection="registerIds" item="id" separator=" AND "> |
|||
registerId != #{id} |
|||
</foreach> |
|||
) |
|||
<if test='null != placeOrgName and placeOrgName != ""'> |
|||
AND PLACE_ORG_NAME LIKE CONCAT('%',#{placeOrgName},'%') |
|||
</if> |
|||
<if test='null != placeCategory and placeCategory != ""'> |
|||
AND PLACE_CATEGORY = #{placeCategory} |
|||
</if> |
|||
<if test='null != name and name != ""'> |
|||
AND name LIKE CONCAT('%',#{name},'%') |
|||
</if> |
|||
<if test='null != mobile and mobile != ""'> |
|||
AND mobile LIKE CONCAT('%',#{mobile},'%') |
|||
</if> |
|||
<if test='null != idCard and idCard != ""'> |
|||
AND ID_CARD LIKE CONCAT('%',#{idCard},'%') |
|||
</if> |
|||
GROUP BY t.registerId |
|||
ORDER BY LATEST_NAT_TIME desc |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,6 @@ |
|||
<?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.epmet.dao.IcEmployeeRegisterDetailDao"> |
|||
|
|||
</mapper> |
@ -0,0 +1,29 @@ |
|||
<?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.epmet.dao.IcGroupPeopleRegisterDao"> |
|||
|
|||
<select id="groupPeopleRegisterList" resultType="com.epmet.dto.result.GroupPeopleRegisterListResultDTO"> |
|||
SELECT |
|||
ie.PLACE_ORG_NAME, |
|||
pr.ID, |
|||
pr.NAT_TIME, |
|||
pr.SZ_TOTAL, |
|||
pr.HSJC_TOTAL, |
|||
ie.AGENCY_ID |
|||
FROM ic_enterprise ie |
|||
INNER JOIN ic_group_people_register pr ON pr.ENTERPRISE_ID = ie.ID AND pr.DEL_FLAG = 0 |
|||
WHERE ie.DEL_FLAG = 0 |
|||
AND CONCAT(ie.AGENCY_PIDS,':',ie.AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%') |
|||
<if test='null != placeOrgName and placeOrgName != "" '> |
|||
AND ie.PLACE_ORG_NAME LIKE CONCAT('%',#{placeOrgName},'%') |
|||
</if> |
|||
<if test='null != natStartDate and natStartDate != "" '> |
|||
AND DATE_FORMAT(pr.NAT_TIME,'%Y-%m-%d') >= #{natStartDate} |
|||
</if> |
|||
<if test='null != natEndDate and natEndDate != "" '> |
|||
AND DATE_FORMAT(pr.NAT_TIME,'%Y-%m-%d') >= #{natEndDate} |
|||
</if> |
|||
ORDER BY pr.NAT_TIME DESC,pr.CREATED_TIME desc |
|||
</select> |
|||
</mapper> |
@ -0,0 +1 @@ |
|||
alter table ic_epidemic_special_attention MODIFY COLUMN ID_CARD VARCHAR(32) not null comment '身份证号'; |
Loading…
Reference in new issue