浏览代码

接收单位

abai 1 月之前
父节点
当前提交
93f5bb9938

+ 5 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/BjLonm.java

@@ -60,6 +60,11 @@ public class BjLonm extends BaseEntity {
     private String deliveryUnit;
 
     /**
+     * 接收单位
+     */
+    private String receivingUnit;
+
+    /**
      * 数据创建人
      */
     private String addName;

+ 18 - 12
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/bo/BjLonmBo.java

@@ -67,6 +67,12 @@ public class BjLonmBo extends BaseEntity {
     private String deliveryUnit;
 
     /**
+     * 接收单位
+     */
+    @Schema(description = "接收单位")
+    private String receivingUnit;
+
+    /**
      * 数据创建人
      */
     @Schema(description = "数据创建人")
@@ -89,18 +95,18 @@ public class BjLonmBo extends BaseEntity {
 //     */
 //    @Schema(description = "接收单位")
 //    private List<String> lonmMiddle;
-
-    /**
-     * 接收单位
-     */
-    @Schema(description = "接收单位")
-    private String lonmMiddle;
-
-    /**
-     * 接收单位搜索使用
-     */
-    @Schema(description = "接收单位搜索使用")
-    private String lonmMiddleStr;
+//
+//    /**
+//     * 接收单位
+//     */
+//    @Schema(description = "接收单位")
+//    private String lonmMiddle;
+//
+//    /**
+//     * 接收单位搜索使用
+//     */
+//    @Schema(description = "接收单位搜索使用")
+//    private String lonmMiddleStr;
 
     /**
      * 创建时间搜索使用

+ 10 - 12
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/service/impl/BjLonmServiceImpl.java

@@ -45,7 +45,7 @@ public class BjLonmServiceImpl implements IBjLonmService {
     /**
      * 分页查询通报事项清单列表
      *
-     * @param bo        查询条件
+     * @param bo 查询条件
      * @return 通报事项清单分页列表
      */
     @Override
@@ -64,7 +64,7 @@ public class BjLonmServiceImpl implements IBjLonmService {
      *
      * @param bo 查询条件
      * @return 通报事项清单列表
-//     */
+     */
     @Override
     public List<BjLonmVo> queryList(BjLonmBo bo) {
 //        LambdaQueryWrapper<BjLonm> lqw = buildQueryWrapper(bo);
@@ -88,11 +88,11 @@ public class BjLonmServiceImpl implements IBjLonmService {
         }
         validEntityBeforeSave(add);
         boolean flag = baseMapper.insert(add) > 0;
-        if (flag) {
+//        if (flag) {
 //            bo.setNotifiedMattersId(add.getNotifiedMattersId());
-            baseMapper.batchInsertBjLonmMiddle(notifiedMattersId,
-                    Collections.singletonList(bo.getLonmMiddle()));
-        }
+//            baseMapper.batchInsertBjLonmMiddle(notifiedMattersId,
+//                    Collections.singletonList(bo.getLonmMiddle()));
+//        }
         return flag;
     }
 
@@ -110,9 +110,7 @@ public class BjLonmServiceImpl implements IBjLonmService {
         boolean f = baseMapper.updateById(update) > 0;
         if (f) {
             baseMapper.deleteBjLonmMiddle(Collections.singletonList(bo.getNotifiedMattersId()));
-
-            baseMapper.batchInsertBjLonmMiddle(bo.getNotifiedMattersId(), Collections.singletonList(bo.getLonmMiddle()));
-
+//            baseMapper.batchInsertBjLonmMiddle(bo.getNotifiedMattersId(), Collections.singletonList(bo.getLonmMiddle()));
         }
         return f;
     }
@@ -138,7 +136,7 @@ public class BjLonmServiceImpl implements IBjLonmService {
             //TODO 做一些业务上的校验,判断是否需要校验
         }
         boolean f = baseMapper.deleteBatchIds(ids) > 0;
-        if (f){
+        if (f) {
             baseMapper.deleteBjLonmMiddle(ids.stream().toList());
         }
         return f;
@@ -153,7 +151,7 @@ public class BjLonmServiceImpl implements IBjLonmService {
     public int changeInventoryStatus(String id, String status) {
         BjLonm bjLonm = baseMapper.selectById(id);
         int i;
-        if (bjLonm != null){
+        if (bjLonm != null) {
 
 //            List<RemoteDictDataVo> bjNlReleasedStatus = remoteDictService.selectDictDataByType("bj_nl_released_status");
 //
@@ -166,7 +164,7 @@ public class BjLonmServiceImpl implements IBjLonmService {
             bjLonm1.setReleaseStatus(status);
             i = baseMapper.updateById(bjLonm1);
 
-        }else{
+        } else {
             throw new RuntimeException("获取数据异常,请重试!");
         }
         return i;

+ 12 - 4
ruoyi-modules/ruoyi-business/src/main/resources/mapper/business/BjLonmMapper.xml

@@ -33,6 +33,7 @@
                bl.notification_standards,
                bl.notification_basis,
                bl.delivery_unit,
+               bl.receiving_unit,
                bl.add_name,
                bl.add_date,
                bl.release_status,
@@ -75,9 +76,12 @@
         <if test="bo.deliveryUnit != null and bo.deliveryUnit != ''">
             and bl.delivery_unit = #{bo.deliveryUnit}
         </if>
-        <if test="bo.lonmMiddleStr != null and bo.lonmMiddleStr != ''">
-            and blm.names like concat('%',#{bo.lonmMiddleStr},'%')
+        <if test="bo.receivingUnit != null and bo.receivingUnit != ''">
+            and bl.receiving_unit like concat('%',#{bo.receivingUnit},'%')
         </if>
+        <!--<if test="bo.lonmMiddleStr != null and bo.lonmMiddleStr != ''">
+            and blm.names like concat('%',#{bo.lonmMiddleStr},'%')
+        </if>-->
         <if test="bo.releaseStatus != null and bo.releaseStatus != ''">
             and bl.release_status = #{bo.releaseStatus}
         </if>
@@ -100,6 +104,7 @@
             bl.notification_standards,
             bl.notification_basis,
             bl.delivery_unit,
+            bl.receiving_unit,
             bl.add_name,
             bl.add_date,
             bl.release_status,
@@ -144,9 +149,12 @@
         <if test="deliveryUnit != null and deliveryUnit != ''">
             and bl.delivery_unit = #{deliveryUnit}
         </if>
-        <if test="lonmMiddleStr != null and lonmMiddleStr != ''">
-            and blm.deptName like concat('%',#{lonmMiddleStr},'%')
+        <if test="bo.receivingUnit != null and bo.receivingUnit != ''">
+            and bl.receiving_unit like concat('%',#{bo.receivingUnit},'%')
         </if>
+<!--        <if test="lonmMiddleStr != null and lonmMiddleStr != ''">-->
+<!--            and blm.deptName like concat('%',#{lonmMiddleStr},'%')-->
+<!--        </if>-->
     </select>