Commit e1863761 by ilal Committed by chenzg

提交

parent eae68ae4
package cn.timer.api.bean.htzz; package cn.timer.api.bean.htzz;
import java.util.Date; import java.util.Date;
import javax.persistence.*; import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
...@@ -9,6 +15,7 @@ import com.baomidou.mybatisplus.annotation.TableField; ...@@ -9,6 +15,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import cn.timer.api.dto.htzz.NotifyPersonDto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -60,18 +67,12 @@ public class HtzzAdminZzda extends Model<HtzzAdminZzda> { ...@@ -60,18 +67,12 @@ public class HtzzAdminZzda extends Model<HtzzAdminZzda> {
@ApiModelProperty(value = "有效期到期日 ", example = "有效期到期日") @ApiModelProperty(value = "有效期到期日 ", example = "有效期到期日")
private Date yxdqr; private Date yxdqr;
// @ApiModelProperty(value = "提醒组id ", example = "提醒组")
// private Integer txzid;
@ApiModelProperty(value = "提醒开关", example = "0 关 1开") @ApiModelProperty(value = "提醒开关", example = "0 关 1开")
private Integer txkgType; private Integer txkgType;
@ApiModelProperty(value = "证件附件 ", example = "证件附件") @ApiModelProperty(value = "证件附件 ", example = "证件附件")
private String zjfj; private String zjfj;
// @ApiModelProperty(value = "通知人 ", example = "通知人")
// private String tzr;
@ApiModelProperty(value = "录入人--用户id", example = "101") @ApiModelProperty(value = "录入人--用户id", example = "101")
private Integer lrrid; private Integer lrrid;
...@@ -85,9 +86,19 @@ public class HtzzAdminZzda extends Model<HtzzAdminZzda> { ...@@ -85,9 +86,19 @@ public class HtzzAdminZzda extends Model<HtzzAdminZzda> {
@ApiModelProperty(value = "是否删除", example = "0-否 1-是") @ApiModelProperty(value = "是否删除", example = "0-否 1-是")
private Integer isDelete; private Integer isDelete;
@ApiModelProperty(value = "消息模板id", example = "1")
private Integer templateId;
@ApiModelProperty(value = "0:未发;1:已发", example = "0")
private Integer sendingStatus;
@Transient
@TableField(exist = false)
private List<NotifyPersonDto> ids;
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private Integer[] ids; private List<HtzzAssoZztx> Zztx;
......
...@@ -45,7 +45,7 @@ public class HtzzAssoHtgx extends Model<HtzzAssoHtgx> { ...@@ -45,7 +45,7 @@ public class HtzzAssoHtgx extends Model<HtzzAssoHtgx> {
@ApiModelProperty(value = "通知人手机号", example = "101") @ApiModelProperty(value = "通知人手机号", example = "101")
private String phone; private String phone;
@ApiModelProperty(value = "合同id", example = "101") @ApiModelProperty(value = "证照档案表id", example = "101")
private Integer htid; private Integer htid;
@ApiModelProperty(value = "公司id", example = "101") @ApiModelProperty(value = "公司id", example = "101")
......
...@@ -39,12 +39,6 @@ public class HtzzAssoZztx extends Model<HtzzAssoZztx> { ...@@ -39,12 +39,6 @@ public class HtzzAssoZztx extends Model<HtzzAssoZztx> {
@ApiModelProperty(value = "名称 ", example = "名称") @ApiModelProperty(value = "名称 ", example = "名称")
private String name; private String name;
// @ApiModelProperty(value = "提醒方式 ", example = "提醒方式")
// private String txfs;
// @ApiModelProperty(value = "优先级 ", example = "优先级")
// private String yxj;
@ApiModelProperty(value = "重复方式 ", example = "0-不重复 1-每天 2-每3天 3-每周") @ApiModelProperty(value = "重复方式 ", example = "0-不重复 1-每天 2-每3天 3-每周")
private Integer cffs; private Integer cffs;
...@@ -62,6 +56,9 @@ public class HtzzAssoZztx extends Model<HtzzAssoZztx> { ...@@ -62,6 +56,9 @@ public class HtzzAssoZztx extends Model<HtzzAssoZztx> {
@ApiModelProperty(value = "录入人员 ", example = "录入人员") @ApiModelProperty(value = "录入人员 ", example = "录入人员")
private Integer lrrid; private Integer lrrid;
@ApiModelProperty(value = "证照档案表id ", example = "1")
private Integer zzdaId;
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "录入时间 ", example = "录入时间") @ApiModelProperty(value = "录入时间 ", example = "录入时间")
......
...@@ -22,17 +22,22 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; ...@@ -22,17 +22,22 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.cron.CronUtil; import cn.hutool.cron.CronUtil;
import cn.hutool.cron.task.Task; import cn.hutool.cron.task.Task;
import cn.timer.api.bean.htzz.HtzzAdminZzda; import cn.timer.api.bean.htzz.HtzzAdminZzda;
import cn.timer.api.bean.htzz.HtzzAssoHtgx; import cn.timer.api.bean.htzz.HtzzAssoHtgx;
import cn.timer.api.bean.htzz.HtzzAssoZztx;
import cn.timer.api.bean.qyzx.businessService.QyzxRemainingQuantity; import cn.timer.api.bean.qyzx.businessService.QyzxRemainingQuantity;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.dao.htzz.HtzzAdminZzdaMapper; import cn.timer.api.dao.htzz.HtzzAdminZzdaMapper;
import cn.timer.api.dto.htzz.HtzzQueryDto; import cn.timer.api.dto.htzz.HtzzQueryDto;
import cn.timer.api.dto.htzz.NotifyPersonDto;
import cn.timer.api.dto.htzz.ReminderObjectDto;
import cn.timer.api.dto.kqmk.KqglAssoOvertimeRulesDto;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil; import cn.timer.api.utils.ResultUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -47,22 +52,9 @@ public class HtzzController { ...@@ -47,22 +52,9 @@ public class HtzzController {
@Autowired @Autowired
private HtzzAdminZzdaMapper htzzAdminZzdaMapper; private HtzzAdminZzdaMapper htzzAdminZzdaMapper;
// /**
// * 新增/修改提醒组
// */
// @PostMapping(value = "/addTxz")
// @ApiOperation(value = "新增提醒组", httpMethod = "POST", notes = "接口发布说明")
// public Result<HtzzAssoZztx> addTxz(@CurrentUser UserBean userBean,
// @RequestBody HtzzAssoZztx zztx) {
// zztx.setLrrid(userBean.getEmpNum());
// zztx.setLrsjTime(new Date());
// zztx.setOrgCode(userBean.getOrgCode());
// zztx.insertOrUpdate();
// return ResultUtil.data(zztx, "新增/修改成功");
// }
/** /**
* 新增合同证件 * 新增证件
* *
* @param userBean * @param userBean
* @param htzzAdminZzda 证照档案实体 * @param htzzAdminZzda 证照档案实体
...@@ -94,24 +86,27 @@ public class HtzzController { ...@@ -94,24 +86,27 @@ public class HtzzController {
zzda.setLrrid(userBean.getEmpNum()); zzda.setLrrid(userBean.getEmpNum());
zzda.setLrsjTime(new Date()); zzda.setLrsjTime(new Date());
zzda.setOrgCode(orgCode); zzda.setOrgCode(orgCode);
zzda.setSendingStatus(0);//0:未发;1:已发
zzda.setTemplateId(zzda.getTemplateId());//消息模板id
zzda.insert(); zzda.insert();
/** /**
* 新增通知关系表,每人一个 * 新增通知关系表,每人一个
*/ */
YgglMainEmp emp = null; YgglMainEmp emp = null;
Integer[] ids = zzda.getIds(); List<NotifyPersonDto> ids = zzda.getIds();//通知人 用户id+手机号码
List<HtzzAssoHtgx> htgxs = new ArrayList<HtzzAssoHtgx>(ids.length); List<HtzzAssoHtgx> htgxs = new ArrayList<HtzzAssoHtgx>(ids.size());
for (Integer id : ids) { for (NotifyPersonDto pre : ids) {
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>(); QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>();
queryWrapper.select("name", "phone", "emp_num").eq("emp_num", id).eq("org_code", orgCode); queryWrapper.select("name", "phone", "emp_num").eq("emp_num", pre.getUserids()).eq("org_code", orgCode);
emp = YgglMainEmp.builder().build().selectOne(queryWrapper); emp = YgglMainEmp.builder().build().selectOne(queryWrapper);
HtzzAssoHtgx htgx = HtzzAssoHtgx.builder().build(); HtzzAssoHtgx htgx = HtzzAssoHtgx.builder().build();
htgx.setHtid(zzda.getId()); htgx.setHtid(zzda.getId());
htgx.setTzrid(emp.getEmpNum()); htgx.setTzrid(emp.getEmpNum());
htgx.setName(emp.getName()); htgx.setName(emp.getName());
htgx.setPhone(emp.getPhone()); htgx.setPhone(pre.getPhone());
htgx.setOrgCode(orgCode); htgx.setOrgCode(orgCode);
htgx.insert(); htgx.insert();
htgxs.add(htgx); htgxs.add(htgx);
...@@ -119,24 +114,33 @@ public class HtzzController { ...@@ -119,24 +114,33 @@ public class HtzzController {
return ResultUtil.datas(zzda, htgxs, "新增证件成功!"); return ResultUtil.datas(zzda, htgxs, "新增证件成功!");
} }
// /** @GetMapping("/modifytx/id")
// * 查询公司所有证件 @ApiOperation(value = "修改提醒数据", httpMethod = "GET", notes = "接口发布说明")
// * public Result<Object> modifytx(@CurrentUser UserBean userBean, @PathVariable Integer id) {
// * @param userBean
// * @return ReminderObjectDto obj = ReminderObjectDto.builder().build();
// */
// @GetMapping("/queryzj") List<HtzzAdminZzda> zzda = HtzzAdminZzda.builder().id(id).build().selectAll();
// @ApiOperation(value = "查询所有合同证件", httpMethod = "GET", notes = "接口发布说明") obj.setZzda(zzda);//
// public Result<List<HtzzAdminZzda>> queryzj(@CurrentUser UserBean userBean) {
// Integer orgCode = userBean.getOrgCode(); List<NotifyPersonDto> tzids = new ArrayList<NotifyPersonDto>();
// if (orgCode != null) { List<HtzzAssoHtgx> httxs = HtzzAssoHtgx.builder().build().selectList(new QueryWrapper<HtzzAssoHtgx>().lambda().eq(HtzzAssoHtgx::getHtid, id));
// List<HtzzAdminZzda> htzzAdminZzda = HtzzAdminZzda.builder().orgCode(orgCode).isDelete(0) for(HtzzAssoHtgx gx : httxs) {
// .build().selectAll();
// return ResultUtil.data(htzzAdminZzda, "查询证件成功!"); NotifyPersonDto predto = NotifyPersonDto.builder().build();
// }
// return ResultUtil.error("查询失败了!请检查是否登录"); BeanUtil.copyProperties(gx, predto);
// } tzids.add(predto);
}
obj.setIds(tzids);//
List<HtzzAssoZztx> zztx = HtzzAssoZztx.builder().build().selectList(new QueryWrapper<HtzzAssoZztx>().lambda().eq(HtzzAssoZztx::getZzdaId, id));
obj.setZztx(zztx);//
return ResultUtil.data(obj, "新增成功");
}
/** /**
* 按条件搜索(关键字、到期时间) * 按条件搜索(关键字、到期时间)
...@@ -200,8 +204,11 @@ public class HtzzController { ...@@ -200,8 +204,11 @@ public class HtzzController {
@ApiOperation(value = "根据id删除合同", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "根据id删除合同", httpMethod = "DELETE", notes = "接口发布说明")
public Result<Object> delHt(@CurrentUser UserBean userBean, @RequestParam Integer htid) { public Result<Object> delHt(@CurrentUser UserBean userBean, @RequestParam Integer htid) {
// 删除提醒关系 // 删除提醒关系
HtzzAssoHtgx.builder().build() HtzzAssoHtgx.builder().build().delete(new QueryWrapper<HtzzAssoHtgx>().eq("org_code", userBean.getOrgCode()).eq("htid", htid));
.delete(new QueryWrapper<HtzzAssoHtgx>().eq("org_code", userBean.getOrgCode()).eq("htid", htid));
//删除证照提醒表配置
HtzzAssoZztx.builder().build().delete(new QueryWrapper<HtzzAssoZztx>().lambda().eq(HtzzAssoZztx::getZzdaId, htid));
// 设置证照删除状态 // 设置证照删除状态
return ResultUtil.data(HtzzAdminZzda.builder().id(htid).isDelete(1).build().updateById()); return ResultUtil.data(HtzzAdminZzda.builder().id(htid).isDelete(1).build().updateById());
} }
......
...@@ -102,7 +102,7 @@ public class AttendanceTaskTiming{ ...@@ -102,7 +102,7 @@ public class AttendanceTaskTiming{
// @Scheduled(cron = "0 */5 * * * ?") // @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0 6 17 * * ?") // @Scheduled(cron = "0 6 17 * * ?")
// @Scheduled(cron = "0 0 8,12,16,20 * * ?")//每天上午8、12点,下午16点,20点 执行 @Scheduled(cron = "0 0 8,12,16,20 * * ?")//每天上午8、12点,下午16点,20点 执行
public void AttendanceTask() throws ParseException { public void AttendanceTask() throws ParseException {
boolean implement = true; boolean implement = true;
......
...@@ -94,7 +94,7 @@ public class LastMonthtimingExport { ...@@ -94,7 +94,7 @@ public class LastMonthtimingExport {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
// @Scheduled(cron = "0 48 16 * * ?") // @Scheduled(cron = "0 48 16 * * ?")
// @Scheduled(cron = "0 0 4,20 * * ?")//每天上午4点,下午20点 执行 @Scheduled(cron = "0 0 4,20 * * ?")//每天上午4点,下午20点 执行
public void LastMonthtimingAttendanceTask() throws ParseException { public void LastMonthtimingAttendanceTask() throws ParseException {
//获取前月的最后一天 //获取前月的最后一天
......
package cn.timer.api.dto.htzz;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class NotifyPersonDto {
@ApiModelProperty(value="用户id",example="101")
private String userids;
@ApiModelProperty(value="电话",example="")
private String phone;
}
package cn.timer.api.dto.htzz;
import java.util.List;
import cn.timer.api.bean.htzz.HtzzAdminZzda;
import cn.timer.api.bean.htzz.HtzzAssoZztx;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ReminderObjectDto {
private List<HtzzAdminZzda> zzda;
private List<NotifyPersonDto> ids;
private List<HtzzAssoZztx> zztx;
}
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<result column="zjmc" property="zjmc" /> <result column="zjmc" property="zjmc" />
<result column="is_delete" property="isDelete" /> <result column="is_delete" property="isDelete" />
<result column="template_id" property="templateId" /> <result column="template_id" property="templateId" />
<result column="sending_status" property="sendingStatus" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -38,27 +39,10 @@ ...@@ -38,27 +39,10 @@
zjfj, zjfj,
zjmc, zjmc,
is_delete, is_delete,
template_id template_id,
</sql> sending_status
<sql id="Base_Column_List_Alias">
id HtzzAdminZzda_id,
czrdh HtzzAdminZzda_czrdh,
czry HtzzAdminZzda_czry,
fzjg HtzzAdminZzda_fzjg,
fzrq HtzzAdminZzda_fzrq,
lrrid HtzzAdminZzda_lrrid,
lrsj_time HtzzAdminZzda_lrsj_time,
org_code HtzzAdminZzda_org_code,
txkg_type HtzzAdminZzda_txkg_type,
yxdqr HtzzAdminZzda_yxdqr,
yxksr HtzzAdminZzda_yxksr,
zjbh HtzzAdminZzda_zjbh,
zjfj HtzzAdminZzda_zjfj,
zjmc HtzzAdminZzda_zjmc,
is_delete HtzzAdminZzda_is_delete,
template_id HtzzAdminZzda_template_id
</sql> </sql>
<!-- <!--
......
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