|
@@ -4554,7 +4554,7 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
List<WbsTreeContract> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(WbsTreeContract.class));
|
|
|
|
|
|
InputStream templateStream = new FileInputStream(new File(templatePath));
|
|
|
- org.apache.poi.ss.usermodel.Workbook workbook = WorkbookFactory.create(templateStream);
|
|
|
+ Workbook workbook = WorkbookFactory.create(templateStream);
|
|
|
Sheet templateSheet = workbook.getSheetAt(0);
|
|
|
|
|
|
// 移除默认的Sheet1
|
|
@@ -4778,6 +4778,33 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
List<WbsTreeContract> list= wbsTreeContractMapper.getWbsTreeContractsByPKeyIds(dto.getLeftPkeyIds());
|
|
|
WbsTreeContract moveFatherNode = this.getById(list.get(0).getPId());
|
|
|
WbsTreeContract fatherContract = this.getById(dto.getRightPkeyId());
|
|
|
+ Integer leftNodeType = 0;
|
|
|
+ Integer rightNodeType =0;
|
|
|
+ if(list.get(0).getNodeType()!=null){
|
|
|
+ if(list.get(0).getNodeType()==1){
|
|
|
+ leftNodeType=1;
|
|
|
+ } else if (list.get(0).getNodeType()==18) {
|
|
|
+ leftNodeType=2;
|
|
|
+ }else {
|
|
|
+ leftNodeType=list.get(0).getNodeType()+1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(fatherContract.getNodeType()!=null){
|
|
|
+ if(fatherContract.getNodeType()==1){
|
|
|
+ rightNodeType=1;
|
|
|
+ } else if (fatherContract.getNodeType()==18) {
|
|
|
+ rightNodeType=2;
|
|
|
+ }else {
|
|
|
+ rightNodeType=fatherContract.getNodeType()+1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(leftNodeType==rightNodeType){
|
|
|
+ throw new ServiceException("请勿同级节点相互移动");
|
|
|
+ }
|
|
|
+ if(leftNodeType<rightNodeType){
|
|
|
+ throw new ServiceException("请勿向比自己层级低的节点移动");
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
String sql="SELECT * from m_formula_data_block WHERE sw_id = "+moveFatherNode.getId()+" and contract_id ="+moveFatherNode.getContractId()+" and type =0";
|
|
|
List<FormulaDataBlock> formulaDataBlocks1 = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(FormulaDataBlock.class));
|
|
@@ -5520,7 +5547,7 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
}
|
|
|
|
|
|
//保存Workbook到本地文件(本地测试放开)
|
|
|
- private void saveWorkbookToFile(org.apache.poi.ss.usermodel.Workbook workbook, String filePath) {
|
|
|
+ private void saveWorkbookToFile(Workbook workbook, String filePath) {
|
|
|
try {
|
|
|
File file = new File(filePath);
|
|
|
File parentDir = file.getParentFile();
|