Commit 9b50c96d by ilal

提交

parent 373cd990
...@@ -96,9 +96,13 @@ public class HtzzAdminZzda extends Model<HtzzAdminZzda> { ...@@ -96,9 +96,13 @@ public class HtzzAdminZzda extends Model<HtzzAdminZzda> {
@TableField(exist = false) @TableField(exist = false)
private List<NotifyPersonDto> ids; private List<NotifyPersonDto> ids;
// @Transient
// @TableField(exist = false)
// private List<HtzzAssoZztx> Zztx;
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private List<HtzzAssoZztx> Zztx; private HtzzAssoZztx zztx;
......
...@@ -95,22 +95,22 @@ public class HtzzController { ...@@ -95,22 +95,22 @@ public class HtzzController {
/** /**
* 新增通知关系表,每人一个 * 新增通知关系表,每人一个
*/ */
YgglMainEmp emp = null; // YgglMainEmp emp = null;
List<NotifyPersonDto> ids = zzda.getIds();//通知人 用户id+手机号码 List<NotifyPersonDto> ids = zzda.getIds();//通知人 用户id+手机号码
List<HtzzAssoHtgx> htgxs = new ArrayList<HtzzAssoHtgx>(ids.size()); List<HtzzAssoHtgx> htgxs = new ArrayList<HtzzAssoHtgx>(ids.size());
for (NotifyPersonDto pre : ids) { for (NotifyPersonDto pre : ids) {
HtzzAssoHtgx.builder().build().delete(new QueryWrapper<HtzzAssoHtgx>().lambda().eq(HtzzAssoHtgx::getOrgCode, orgCode).eq(HtzzAssoHtgx::getTzrid, pre.getUserids()) HtzzAssoHtgx.builder().build().delete(new QueryWrapper<HtzzAssoHtgx>().lambda().eq(HtzzAssoHtgx::getOrgCode, orgCode).eq(HtzzAssoHtgx::getTzrid, pre.getEmpNum())
.eq(HtzzAssoHtgx::getPhone, pre.getPhone())); .eq(HtzzAssoHtgx::getPhone, pre.getPhone()));
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>(); // QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>();
queryWrapper.select("name", "phone", "emp_num").eq("emp_num", pre.getUserids()).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(pre.getEmpNum());
htgx.setName(emp.getName()); htgx.setName(pre.getEmpName());
htgx.setPhone(pre.getPhone()); htgx.setPhone(pre.getPhone());
htgx.setOrgCode(orgCode); htgx.setOrgCode(orgCode);
htgx.insert(); htgx.insert();
...@@ -124,11 +124,7 @@ public class HtzzController { ...@@ -124,11 +124,7 @@ public class HtzzController {
@ApiOperation(value = "修改提醒数据", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "修改提醒数据", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> modifytx(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Object> modifytx(@CurrentUser UserBean userBean, @PathVariable Integer id) {
ReminderObjectDto obj = ReminderObjectDto.builder().build();
List<HtzzAdminZzda> zzda = HtzzAdminZzda.builder().id(id).build().selectAll();
obj.setZzda(zzda);//
List<NotifyPersonDto> tzids = new ArrayList<NotifyPersonDto>(); List<NotifyPersonDto> tzids = new ArrayList<NotifyPersonDto>();
List<HtzzAssoHtgx> httxs = HtzzAssoHtgx.builder().build().selectList(new QueryWrapper<HtzzAssoHtgx>().lambda().eq(HtzzAssoHtgx::getHtid, id)); List<HtzzAssoHtgx> httxs = HtzzAssoHtgx.builder().build().selectList(new QueryWrapper<HtzzAssoHtgx>().lambda().eq(HtzzAssoHtgx::getHtid, id));
for(HtzzAssoHtgx gx : httxs) { for(HtzzAssoHtgx gx : httxs) {
...@@ -138,12 +134,13 @@ public class HtzzController { ...@@ -138,12 +134,13 @@ public class HtzzController {
BeanUtil.copyProperties(gx, predto); BeanUtil.copyProperties(gx, predto);
tzids.add(predto); tzids.add(predto);
} }
obj.setIds(tzids);//
List<HtzzAssoZztx> zztx = HtzzAssoZztx.builder().build().selectList(new QueryWrapper<HtzzAssoZztx>().lambda().eq(HtzzAssoZztx::getZzdaId, id)); HtzzAdminZzda zzda = HtzzAdminZzda.builder().id(id).build().selectById();
obj.setZztx(zztx);// HtzzAssoZztx zztx = HtzzAssoZztx.builder().build().selectOne(new QueryWrapper<HtzzAssoZztx>().lambda().eq(HtzzAssoZztx::getZzdaId, id));
zzda.setZztx(zztx);
zzda.setIds(tzids);
return ResultUtil.data(obj, "新增成功"); return ResultUtil.data(zzda, "新增成功");
} }
......
...@@ -13,7 +13,10 @@ import lombok.NoArgsConstructor; ...@@ -13,7 +13,10 @@ import lombok.NoArgsConstructor;
public class NotifyPersonDto { public class NotifyPersonDto {
@ApiModelProperty(value="用户id",example="101") @ApiModelProperty(value="用户id",example="101")
private String userids; private String empName;
@ApiModelProperty(value="用户id",example="101")
private Integer empNum;
@ApiModelProperty(value="电话",example="") @ApiModelProperty(value="电话",example="")
private String phone; private String phone;
......
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