|
@@ -3039,29 +3039,36 @@ public R<Boolean> updateContractNodeParameter(@RequestParam Long pKeyId, @Reques
|
|
WbsTreeContract nodee = wbsTreeContractClient.getContractNodeByPrimaryKeyId(pKeyId+"");
|
|
WbsTreeContract nodee = wbsTreeContractClient.getContractNodeByPrimaryKeyId(pKeyId+"");
|
|
String sql="Select * from m_wbs_tree_contract where id="+nodee.getParentId()+" and contract_id="+nodee.getContractId()+" and wbs_id="+nodee.getWbsId()+" and is_deleted=0";
|
|
String sql="Select * from m_wbs_tree_contract where id="+nodee.getParentId()+" and contract_id="+nodee.getContractId()+" and wbs_id="+nodee.getWbsId()+" and is_deleted=0";
|
|
WbsTreeContract parentNode=jdbcTemplate.queryForObject(sql,new BeanPropertyRowMapper<>(WbsTreeContract.class));
|
|
WbsTreeContract parentNode=jdbcTemplate.queryForObject(sql,new BeanPropertyRowMapper<>(WbsTreeContract.class));
|
|
- if (parentNode != null) {
|
|
|
|
- Integer targetType;//当前节点
|
|
|
|
- Integer sourceType;//当前节点的父节点
|
|
|
|
- if (parentNode.getNodeType() != 1) {
|
|
|
|
- sourceType = parentNode.getNodeType() + 1;
|
|
|
|
- } else {
|
|
|
|
- sourceType = parentNode.getNodeType();
|
|
|
|
- }
|
|
|
|
- if (parentNode.getNodeType() == 18) {
|
|
|
|
- sourceType = 2;
|
|
|
|
- }
|
|
|
|
- if (nodeType != 1) {
|
|
|
|
- targetType = nodeType + 1;
|
|
|
|
- } else {
|
|
|
|
- targetType = nodeType;
|
|
|
|
- }
|
|
|
|
- if (nodeType == 18) {
|
|
|
|
- targetType = 2;
|
|
|
|
- }
|
|
|
|
- if (sourceType >= targetType) {
|
|
|
|
- throw new ServiceException("当前节点类型不能大于或等于父级节点类型");
|
|
|
|
|
|
+ Integer templateType = jdbcTemplate.queryForObject(
|
|
|
|
+ "select COALESCE(template_type, 0) from m_contract_info where id="+nodee.getContractId()+" and is_deleted=0",
|
|
|
|
+ Integer.class
|
|
|
|
+ );
|
|
|
|
+ if(templateType!=null&&templateType==2){
|
|
|
|
+ if (parentNode != null) {
|
|
|
|
+ Integer targetType;//当前节点
|
|
|
|
+ Integer sourceType;//当前节点的父节点
|
|
|
|
+ if (parentNode.getNodeType() != 1) {
|
|
|
|
+ sourceType = parentNode.getNodeType() + 1;
|
|
|
|
+ } else {
|
|
|
|
+ sourceType = parentNode.getNodeType();
|
|
|
|
+ }
|
|
|
|
+ if (parentNode.getNodeType() == 18) {
|
|
|
|
+ sourceType = 2;
|
|
|
|
+ }
|
|
|
|
+ if (nodeType != 1) {
|
|
|
|
+ targetType = nodeType + 1;
|
|
|
|
+ } else {
|
|
|
|
+ targetType = nodeType;
|
|
|
|
+ }
|
|
|
|
+ if (nodeType == 18) {
|
|
|
|
+ targetType = 2;
|
|
|
|
+ }
|
|
|
|
+ if (sourceType >= targetType) {
|
|
|
|
+ throw new ServiceException("当前节点类型不能大于或等于父级节点类型");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
WbsTreeContract queries = this.wbsTreeContractClient.getContractWbsTreeByPrimaryKeyId(pKeyId);
|
|
WbsTreeContract queries = this.wbsTreeContractClient.getContractWbsTreeByPrimaryKeyId(pKeyId);
|
|
if (ObjectUtil.isNotEmpty(className) || ObjectUtil.isNotEmpty(unitName)) {
|
|
if (ObjectUtil.isNotEmpty(className) || ObjectUtil.isNotEmpty(unitName)) {
|
|
//查询当前节点的是否是子节点,以及当前节点父节点是否包含单元评定
|
|
//查询当前节点的是否是子节点,以及当前节点父节点是否包含单元评定
|