소스 검색

Merge remote-tracking branch 'origin/develop' into develop

Danj0rr 11 달 전
부모
커밋
9edf4bf86d

+ 2 - 2
src/main/java/com/kexun/constant/BaseConsts.java

@@ -128,12 +128,12 @@ public class BaseConsts {
     /**
      * 字段模板关闭状态
      */
-    public final static String STATUS_OFF = "1";
+    public final static String STATUS_OFF = "0";
 
     /**
      * 字段模板开启
      */
-    public final static String STATUS_ON = "0";
+    public final static String STATUS_ON = "1";
 
     /**
      * 衍生字段参数列表

+ 1 - 1
src/main/java/com/kexun/controller/ReportController.java

@@ -61,7 +61,7 @@ public class ReportController {
 
 
     /**
-     * 文件下载
+     * xml及json文件下载
      * @param filename
      * @return
      * @throws IOException

+ 7 - 0
src/main/java/com/kexun/controller/UploadController.java

@@ -50,6 +50,10 @@ public class UploadController {
     @Value("${report.file.jsonTargetPath}")
     private String jsonTargetPath;
 
+
+    /**
+     * 上传xml及JSON文件
+     */
     @PostMapping("/uploadUi")
     public Result uploadUi(@RequestParam("files") MultipartFile[] files ,@RequestParam("customerName") String customerName,
                            @RequestParam("headInfId") String headInfId) {
@@ -95,6 +99,9 @@ public class UploadController {
 
     }
 
+    /**
+     * 上传mod文件
+     */
     @PostMapping("/uploadMod")
     public Result uploadMod(@RequestParam("files") MultipartFile[] files ,@RequestParam("customerName") String customerName,
                             @RequestParam("headInfId") String headInfId) {

+ 17 - 10
src/main/java/com/kexun/service/impl/FieldTemplateServiceImpl.java

@@ -9,6 +9,7 @@ import com.kexun.entity.*;
 import com.kexun.exception.RRException;
 import com.kexun.hander.PageBean;
 import com.kexun.mapper.CooperatorMapper;
+import com.kexun.mapper.FieldDefineMapper;
 import com.kexun.mapper.FieldTemplateMapper;
 import com.kexun.model.ro.*;
 import com.kexun.model.vo.FieldVO;
@@ -36,6 +37,9 @@ public class FieldTemplateServiceImpl extends ServiceImpl<FieldTemplateMapper, F
     FieldDefineService fieldDefineService;
     @Autowired
     FieldTemplateMapper fieldTemplateMapper;
+
+    @Autowired
+    FieldDefineMapper fieldDefineMapper;
     @Autowired
     FieldTemplateRefService fieldTemplateRefService;
 
@@ -104,15 +108,18 @@ public class FieldTemplateServiceImpl extends ServiceImpl<FieldTemplateMapper, F
             List <String> fieldSelected2 = filedTemplateCreateRO.getFieldSelected2();
             List<FieldTemplateRefEntity> fieldTemplateRefList = new ArrayList<>();
 
+            List<FieldDefineEntity> fieldBaseDefineList = fieldDefineMapper.selectBatchIds(fieldSelected);
+            List<FieldDefineEntity> fieldDeriveDefineList = fieldDefineMapper.selectBatchIds(fieldSelected2);
+
             for (int i=0;i<fieldSelected.size();i++){
                 Long fid = Long.parseLong(fieldSelected.get(i));
-                FieldDefineEntity fieldDefine = fieldDefineService.findByID(fid);
+//                FieldDefineEntity fieldDefine = fieldDefineService.findByID(fid);
                 FieldTemplateRefEntity fieldTemplateRefEntity = new FieldTemplateRefEntity();
                 fieldTemplateRefEntity.setIsDeleted(false);
-                fieldTemplateRefEntity.setFieldDefineId(fieldDefine.getId());
-                fieldTemplateRefEntity.setFieldNo(fieldDefine.getFieldNo());
-                fieldTemplateRefEntity.setName(fieldDefine.getName());
-                fieldTemplateRefEntity.setType(fieldDefine.getCategory());
+                fieldTemplateRefEntity.setFieldDefineId(fieldBaseDefineList.get(i).getId());
+                fieldTemplateRefEntity.setFieldNo(fieldBaseDefineList.get(i).getFieldNo());
+                fieldTemplateRefEntity.setName(fieldBaseDefineList.get(i).getName());
+                fieldTemplateRefEntity.setType(fieldBaseDefineList.get(i).getCategory());
                 fieldTemplateRefEntity.setFieldTemplateId(id);
 //                fieldTemplateRefEntity.setType("1");
                 fieldTemplateRefEntity.setTemplateNo(fieldTemplateEntity.getTemplateNo());
@@ -120,14 +127,14 @@ public class FieldTemplateServiceImpl extends ServiceImpl<FieldTemplateMapper, F
             }
             for (int i=0;i<fieldSelected2.size();i++){
                 Long fid = Long.parseLong(fieldSelected2.get(i));
-                FieldDefineEntity fieldDefine = fieldDefineService.findByID(fid);
+//                FieldDefineEntity fieldDefine = fieldDefineService.findByID(fid);
                 FieldTemplateRefEntity fieldTemplateRefEntity = new FieldTemplateRefEntity();
                 fieldTemplateRefEntity.setIsDeleted(false);
-                fieldTemplateRefEntity.setFieldDefineId(fieldDefine.getId());
-                fieldTemplateRefEntity.setFieldNo(fieldDefine.getFieldNo());
-                fieldTemplateRefEntity.setType(fieldDefine.getCategory());
+                fieldTemplateRefEntity.setFieldDefineId(fieldDeriveDefineList.get(i).getId());
+                fieldTemplateRefEntity.setFieldNo(fieldDeriveDefineList.get(i).getFieldNo());
+                fieldTemplateRefEntity.setType(fieldDeriveDefineList.get(i).getCategory());
 
-                fieldTemplateRefEntity.setName(fieldDefine.getName());
+                fieldTemplateRefEntity.setName(fieldDeriveDefineList.get(i).getName());
                 fieldTemplateRefEntity.setFieldTemplateId(id);
 //                fieldTemplateRefEntity.setType("2");