Pārlūkot izejas kodu

通告管理修改,物资管理修改

wangqiang 2 gadi atpakaļ
vecāks
revīzija
e979361149

+ 4 - 2
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/materialManagement/collect/service/CollectService.java

@@ -137,7 +137,9 @@ public class CollectService {
                 for (CollectDetailed detailInfo : dto.getDetailInfos()) {
 
                     CollectDetailed materialDetailed = detailedMapper.selectById(detailInfo.getId());
-
+                    if (StringUtils.isEmpty(detailInfo.getCollectNumber())){
+                        detailInfo.setCollectNumber("0");
+                    }
                     if ( null == materialDetailed) {
                         // 生成id
                         String detailId = UUID.randomUUID().toString().replace("-", "");
@@ -289,7 +291,7 @@ public class CollectService {
             queryWrapper.like("b.goods_name", dto.getGoodsName());
         }
         if (StringUtils.isNotEmpty(dto.getHandledBy())) {
-            queryWrapper.eq("a.handled_by", dto.getHandledBy());
+            queryWrapper.eq("su.name", dto.getHandledBy());
         }
         if (StringUtils.isNotEmpty(dto.getHandledByOffice())) {
             //先根据id查出是否是父节点,是父节点则查出所有的子节点信息

+ 1 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/materialManagement/purchase/service/MaterialService.java

@@ -82,7 +82,7 @@ public class MaterialService {
             //根据经办人id查出经办人名称
 //            String name = basicMapper.getHandledName(dto.getHandledBy());
 //            dto.setHandledBy(name);
-            queryWrapper.eq("a.handled_by", dto.getHandledBy());
+            queryWrapper.eq("su.name", dto.getHandledBy());
         }
         //合同金额
         //3、合同金额(区间)

+ 6 - 0
jeeplus-plugins/jeeplus-notify/src/main/java/com/jeeplus/notify/controller/NotifyController.java

@@ -103,6 +103,12 @@ public class NotifyController {
         return ResponseEntity.ok ( "删除通知成功" );
     }
 
+    @DeleteMapping("close")
+    public ResponseEntity <String> close(String id) {
+        notifyService.closeById (id);
+        return ResponseEntity.ok ( "关闭通知成功" );
+    }
+
     /**
      * 评论
      */

+ 5 - 0
jeeplus-plugins/jeeplus-notify/src/main/java/com/jeeplus/notify/mapper/NotifyMapper.java

@@ -49,4 +49,9 @@ public interface NotifyMapper extends BaseMapper <Notify> {
 
     void updateContentById(@Param ( "content" ) String content, @Param ( "id" ) String id);
 
+    /**
+     * 关闭通知
+     * @param id
+     */
+    void closeById(String id);
 }

+ 3 - 0
jeeplus-plugins/jeeplus-notify/src/main/java/com/jeeplus/notify/mapper/xml/NotifyMapper.xml

@@ -217,5 +217,8 @@
     <update id="updateContentById">
         update plugin_notify set content = #{content} where id = #{id}
     </update>
+    <update id="closeById">
+        update plugin_notify set is_close = "1" where id = #{id}
+    </update>
 
 </mapper>

+ 11 - 0
jeeplus-plugins/jeeplus-notify/src/main/java/com/jeeplus/notify/service/NotifyService.java

@@ -96,6 +96,9 @@ public class NotifyService extends ServiceImpl <NotifyMapper, Notify> {
      */
     public IPage <NotifyDTO> findPage(Page <NotifyDTO> page, String currentUserId, boolean isSelf, String readFlag, QueryWrapper queryWrapper) {
         queryWrapper.eq ( "a.del_flag", 0 ); // 排除已经删除
+        queryWrapper.eq ( "a.is_close", 0 ); // 排除已经关闭的通告
+        //员工展示员工的
+        //部门主任展示部门所以的
         return baseMapper.findList ( page, currentUserId, isSelf, readFlag, queryWrapper );
     }
 
@@ -278,4 +281,12 @@ public class NotifyService extends ServiceImpl <NotifyMapper, Notify> {
         commentsMapper.deleteById(id);
         return "操作完成";
     }
+
+    /**
+     * 关闭通知
+     * @param id
+     */
+    public void closeById(String id) {
+        notifyMapper.closeById(id);
+    }
 }