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