Commit 08df2c37 by 翁国栋

8小时后台--

修改投保条件为不同月份可重复投递一个人
parent c5a0d90b
......@@ -10,7 +10,7 @@ import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Transient;
import javax.persistence.Transient;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
......@@ -167,4 +167,9 @@ public class InsureUser extends Model<InsureUser> {
@TableField(exist = false)
@ApiModelProperty(value = "导入备注")
private String remake;
@Transient
@TableField(exist = false)
@ApiModelProperty(value="新被保人",example="新被保人")
private InsureUser replaceUser;
}
......@@ -22,6 +22,7 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional;
import cn.timer.api.bean.insure.InsurePolicy;
import cn.timer.api.bean.yggl.*;
import cn.timer.api.bean.zzgl.ZzglLogDgjl;
import cn.timer.api.dao.zzgl.ZzglLogDgjlMapper;
......@@ -2084,8 +2085,16 @@ public class YgglController {
@GetMapping(value = "/getUserList")
@ApiOperation(value = "62-1.运营后台--查询员工列表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 62)
public Result<List<YgQueryDto>> getUserList(@RequestParam("companyId") String companyId) {
List<YgQueryDto> ygQueryDto = ygglMainEmpMapper.queryEmpMessage(Integer.parseInt(companyId), 0);
public Result<List<YgQueryDto>> getUserList(@RequestParam("companyId") String companyId,@RequestParam("policyId")Integer policyId) {
SimpleDateFormat dtf3 = new SimpleDateFormat("yyyy-MM");
List<YgQueryDto> ygQueryDto=Lists.newArrayList();
if(policyId!=null && policyId>0){
InsurePolicy insurePolicy = InsurePolicy.builder().id(policyId).build().selectById();
insurePolicy.getPolicyDateStart();
ygQueryDto = ygglMainEmpMapper.getInusrtUser(Integer.parseInt(companyId), null,dtf3.format(insurePolicy.getPolicyDateEnd()));
}else {
ygQueryDto = ygglMainEmpMapper.queryEmpMessage(Integer.parseInt(companyId), null);
}
for (YgQueryDto yg : ygQueryDto) {
if (StringUtil.isEmpty(yg.getHeadUrl())) {
yg.setHeadUrl("");
......
......@@ -22,7 +22,7 @@ import java.util.List;
public interface InsureUserMapper extends BaseMapper<InsureUser> {
List<PolicyDto> selectPolicyList(@Param("policyDto") PolicyDto policyDto );
Integer totalUser(@Param("policyDto") PolicyDto policyDto);
List<InsureUser> selectListByIds(@Param("array")String[] ids);
List<InsureUser> selectListByIds(@Param("array")String[] ids,@Param("policyId") Integer policyId,@Param("createTime")String createTime);
List<InsureUserDto> selectPlansListByIds(@Param("array")String[] ids);
List<InsureUserDto> selectPlansListById(@Param("policyId")String id);
int updateInsure(@Param("array")Integer[] ids);
......
......@@ -146,4 +146,7 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
List<YgglMainEmp> selectListByIZjNum(@Param("array")String[] zjNum,@Param("orgCode") Integer orgCode);
int updateInsure(@Param("array")Integer[] ids);
/*查询当月已投保人*/
List<YgQueryDto> getInusrtUser(@Param("orgCode") Integer orgCode, @Param("isInsure")Integer isInsure,@Param("createTime")String createTime);
}
......@@ -80,4 +80,6 @@ public class YgQueryDto extends Page {
@ApiModelProperty(value="证件号码 ",example="证件号码")
private String zjNum;
private Integer insureId;
}
......@@ -394,6 +394,13 @@
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
<if test="policyId!=null and policyId !=''">
and policy_id =#{policyId}
</if>
<if test="createTime!=null and createTime !=''">
and date_format(create_time,'%Y-%m') = #{createTime}
</if>
and status = 1 and insure_status = 1
</select>
<!--根据id数组查询员工-->
......
......@@ -483,4 +483,34 @@
</foreach>
</update>
<select id="getInusrtUser" resultType="cn.timer.api.dto.yggl.YgQueryDto">
SELECT
a.id id,
a.name empName,
a.emp_num empNum,
b.name deptName,
a.rz_time rzTime,
a.job_type jobType,
a.phone phone,
a.job_status jobStatus,
a.head_url headUrl,
a.sex sex,
a.is_insure isInsure,
a.zj_num zjNum,
iu.id insureId
FROM
yggl_main_emp a
LEFT JOIN zzgl_bmgw_m b ON a.bmgw_id = b.id
LEFT JOIN insure_user iu on iu.user_id=a.id AND date_format(iu.create_time,'%Y-%m') = #{createTime} and iu.insure_status=1 and iu.`status`=1
WHERE
a.org_code = #{orgCode}
AND
a.job_status in (0,1,2)
<if test="isInsure!=null and isInsure != ''">
AND a.is_insure=#{isInsure}
</if>
ORDER BY
emp_num DESC
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment