wang.sq@aliyun.com пре 1 недеља
родитељ
комит
2aff014a18

+ 23 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/externalApi/service/impl/MesNoticeServiceImpl.java

@@ -32,6 +32,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -124,6 +125,28 @@ public class MesNoticeServiceImpl extends SuperServiceImpl<MesNoticeMapper, MesN
         return baseMapper.pageList(page, queryWrapper);
     }
 
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public boolean addNoticeMore(List<MesNotice> models) {
+        baseMapper.insertBatchSomeColumn(models);
+        
+        List<MesNoticeLog> mesNoticeLogs = new ArrayList<>();
+        for (MesNotice model : models) {
+            MesNoticeLog build = MesNoticeLog.builder().build();
+
+            BeanUtils.copyProperties(model, build);
+            build.setNoticeId(model.getId());
+            build.setId(null);
+
+            mesNoticeLogs.add(build);
+        }
+        mesNoticeLogMapper.insertBatchSomeColumn(mesNoticeLogs);
+        
+        return true;
+    }
+
+
+    @Transactional(rollbackFor = Exception.class)
     @Override
     public boolean addNotice(MesNotice model, double plmenge) {
         BaseContextHandler.setTenant("0000");

+ 1 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/service/MesNoticeService.java

@@ -25,6 +25,7 @@ public interface MesNoticeService extends SuperService<MesNotice> {
     IPage<MesNotice> pageList(IPage page, @Param(Constants.WRAPPER) Wrapper<MesNotice> queryWrapper);
 
     //批量新增
+   boolean addNoticeMore(List<MesNotice> models);
    boolean addNotice(MesNotice model, double plmenge);
 
 

+ 5 - 2
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/externalApi/MesController.java

@@ -361,10 +361,13 @@ public class MesController extends SuperController<MesNoticeService, Long, MesNo
                 if(!baseService.checkExists(mesNotice)) {
                     dataList.add(mesNotice);
                 }else{
-                    stringBuilder.append(jsonObject.getString("auidnr")).append("");
+                    stringBuilder.append("订单号:"+jsonObject.getString("auidnr"));
                 }
             });
-            boolean b = baseService.saveBatch(dataList);
+
+            if(dataList!=null && dataList.size()>0){
+                boolean b = baseService.addNoticeMore(dataList);
+            }
             if(stringBuilder.length()>0){
                 throw new BizException(stringBuilder.toString()+"订单已存在");
             }

+ 2 - 2
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/classSchedule/entity/ScheduleUserDate.java

@@ -70,9 +70,9 @@ public class ScheduleUserDate extends Entity<Long> {
     /**
      * 班次id
      */
-    @ApiModelProperty(value = "班表id")
+    @ApiModelProperty(value = "日历关联id")
     @TableField("month_id")
-    @Excel(name = "班次id")
+    @Excel(name = "日历关联id")
     private Long monthId;
 
     /**