|
@@ -442,6 +442,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public HttpRespMsg goodsMaintainChecking() {
|
|
public HttpRespMsg goodsMaintainChecking() {
|
|
|
|
+ HttpRespMsg msg = new HttpRespMsg();
|
|
log.info("处理维护资产的定时任务启动了");
|
|
log.info("处理维护资产的定时任务启动了");
|
|
// List<Goods> goodsLists = goodsMapper.selectList(new QueryWrapper<>());
|
|
// List<Goods> goodsLists = goodsMapper.selectList(new QueryWrapper<>());
|
|
List<GoodsVO> goodsLists = goodsMapper.getListBycondition(null, null, null);
|
|
List<GoodsVO> goodsLists = goodsMapper.getListBycondition(null, null, null);
|
|
@@ -453,17 +454,26 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
no.setIsMaintain(1);
|
|
no.setIsMaintain(1);
|
|
//此处利用update配合修改条件和条件构造器来实现批量修改数据
|
|
//此处利用update配合修改条件和条件构造器来实现批量修改数据
|
|
goodsNoMapper.update(no, new QueryWrapper<GoodsNo>().eq("goods_id", good.getId()));
|
|
goodsNoMapper.update(no, new QueryWrapper<GoodsNo>().eq("goods_id", good.getId()));
|
|
- List<User> users = userMapper.selectOperateUsersListByCondition();
|
|
|
|
//条件通知消息
|
|
//条件通知消息
|
|
NewsNotice newsNotice = new NewsNotice();
|
|
NewsNotice newsNotice = new NewsNotice();
|
|
|
|
+ newsNotice.setNoticeType(0);
|
|
|
|
+ newsNotice.setRefId(good.getId());
|
|
|
|
+ newsNotice.setRafName(good.getName());
|
|
String content = Constant.GOODS_MATAIN_CONTENT;
|
|
String content = Constant.GOODS_MATAIN_CONTENT;
|
|
content = content.replace("name",good.getName()).replace("num",good.getGoodsNos().size()+good.getUnit());
|
|
content = content.replace("name",good.getName()).replace("num",good.getGoodsNos().size()+good.getUnit());
|
|
newsNotice.setContent(content);
|
|
newsNotice.setContent(content);
|
|
newsNoticeMapper.insert(newsNotice);
|
|
newsNoticeMapper.insert(newsNotice);
|
|
|
|
+ List<User> users = userMapper.selectOperateUsersListByCondition();
|
|
|
|
+ //通知所有操作员
|
|
|
|
+ for (User user : users) {
|
|
|
|
+ NewsNoticeUser noticeUser = new NewsNoticeUser();
|
|
|
|
+ noticeUser.setNewsId(newsNotice.getId());
|
|
|
|
+ noticeUser.setUserId(user.getId());
|
|
|
|
+ newsNoticeUserMapper.insert(noticeUser);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
- return null;
|
|
|
|
|
|
+ return msg;
|
|
}
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
public static void main(String[] args) {
|