ソースを参照

流程标题验证修改,查询字段空值处理修改,增加角色修改,桌面版“我的流程”撤销修改

ouyj 1 週間 前
コミット
7ec698e984

+ 6 - 2
shares/js/yw/bpm/customflow/customStartFlow.js

@@ -4,11 +4,15 @@ function checkForm() {
 	 * msg : "流程标题不能为空!", msgBox : "v_ins_name_box" }, { type : "len", min : 1,
 	 * max : 50, msg : "流程标题长度不能超过50个字!", msgBox : "v_ins_name_box" } ] });
 	 */
-	if($.trim($("#insNameText").val()) == ''){
+	// 同步标题输入框的值到隐藏字段,确保数据一致性
+	if($("#insNameText").is(":visible")) {
+		$("#insName").val($("#insNameText").val());
+	}
+	if($.trim($("#insName").val()) == ''){
 		addError("流程标题不能为空!");
 		return false;
 	}
-	if($.trim($("#insNameText").val()).length > 100){
+	if($.trim($("#insName").val()).length > 100){
 		addError("流程标题不能超过100个字!");
 		return false;
 	}

+ 6 - 2
shares/js/yw/bpm/instance/startFlow.js

@@ -4,11 +4,15 @@ function checkForm() {
 	 * msg : "流程标题不能为空!", msgBox : "v_ins_name_box" }, { type : "len", min : 1,
 	 * max : 50, msg : "流程标题长度不能超过50个字!", msgBox : "v_ins_name_box" } ] });
 	 */
-	if($.trim($("#insNameText").val()) == ''){
+	// 同步标题输入框的值到隐藏字段,确保数据一致性
+	if($("#insNameText").is(":visible")) {
+		$("#insName").val($("#insNameText").val());
+	}
+	if($.trim($("#insName").val()) == ''){
 		addError("流程标题不能为空!");
 		return false;
 	}
-	if($.trim($("#insNameText").val()).length > 100){
+	if($.trim($("#insName").val()).length > 100){
 		addError("流程标题不能超过100个字!");
 		return false;
 	}

+ 6 - 2
shares/js/yw/master1_bpm/customflow/customStartFlow.js

@@ -4,11 +4,15 @@ function checkForm() {
 	 * msg : "流程标题不能为空!", msgBox : "v_ins_name_box" }, { type : "len", min : 1,
 	 * max : 50, msg : "流程标题长度不能超过50个字!", msgBox : "v_ins_name_box" } ] });
 	 */
-	if($.trim($("#insNameText").val()) == ''){
+	// 同步标题输入框的值到隐藏字段,确保数据一致性
+	if($("#insNameText").is(":visible")) {
+		$("#insName").val($("#insNameText").val());
+	}
+	if($.trim($("#insName").val()) == ''){
 		addError("流程标题不能为空!");
 		return false;
 	}
-	if($.trim($("#insNameText").val()).length > 100){
+	if($.trim($("#insName").val()).length > 100){
 		addError("流程标题不能超过100个字!");
 		return false;
 	}

+ 6 - 2
shares/js/yw/master1_bpm/instance/startFlow.js

@@ -4,11 +4,15 @@ function checkForm() {
 	 * msg : "流程标题不能为空!", msgBox : "v_ins_name_box" }, { type : "len", min : 1,
 	 * max : 50, msg : "流程标题长度不能超过50个字!", msgBox : "v_ins_name_box" } ] });
 	 */
-	if($.trim($("#insNameText").val()) == ''){
+	// 同步标题输入框的值到隐藏字段,确保数据一致性
+	if($("#insNameText").is(":visible")) {
+		$("#insName").val($("#insNameText").val());
+	}
+	if($.trim($("#insName").val()) == ''){
 		addError("流程标题不能为空!");
 		return false;
 	}
-	if($.trim($("#insNameText").val()).length > 100){
+	if($.trim($("#insName").val()).length > 100){
 		addError("流程标题不能超过100个字!");
 		return false;
 	}

+ 13 - 11
src/main/core/com/yw/core/framework/jdbc/SpringJdbcPagerImpl.java

@@ -6,12 +6,7 @@ import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.lang.reflect.Field;
 import java.math.BigDecimal;
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import java.sql.Timestamp;
+import java.sql.*;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -419,8 +414,10 @@ public class SpringJdbcPagerImpl {
 						String formatDate = DateUtil.dateToString(tempDate, format);
 						BeanUtils.setProperty(o, name, formatDate);
 					} else {
-						if (rs.getDate(columnName) != null)
-							BeanUtils.setProperty(o, name, rs.getDate(columnName));
+						Date dateValue = rs.getDate(columnName);
+						if (dateValue != null) {
+							BeanUtils.setProperty(o, name, dateValue);
+						}
 					}
 					break;
 				case java.sql.Types.TIMESTAMP:
@@ -440,8 +437,10 @@ public class SpringJdbcPagerImpl {
 						String formatDate = DateUtil.dateToString(timeDate, format);
 						BeanUtils.setProperty(o, name, formatDate);
 					} else {
-						if (rs.getDate(columnName) != null)
-							BeanUtils.setProperty(o, name, rs.getTimestamp(columnName));
+						Timestamp timestampValue = rs.getTimestamp(columnName);
+						if (timestampValue != null) {
+							BeanUtils.setProperty(o, name, timestampValue);
+						}
 					}
 					break;
 				case java.sql.Types.TINYINT:// 整形
@@ -456,7 +455,10 @@ public class SpringJdbcPagerImpl {
 				    }
 				    break;
 				default:
-					BeanUtils.setProperty(o, name, rs.getString(columnName));
+					String stringValue = rs.getString(columnName);
+					if (stringValue != null) {
+						BeanUtils.setProperty(o, name, stringValue);
+					}
 				}
 			}
 		} catch (Exception e) {

+ 10 - 1
src/main/core/com/yw/eu/base/role/action/SubmitRole.java

@@ -57,7 +57,16 @@ public class SubmitRole extends PermitDataAction {
 		String description = request.getParameter("description");
 		role.setDescription(description);
 		String pos = request.getParameter("pos");
-		role.setPos(new Integer(pos).intValue());
+		// 处理pos参数为空的情况,设置默认值为0
+		int posValue = 0;
+		if (!StringUtil.isEmpty(pos)) {
+			try {
+				posValue = Integer.parseInt(pos);
+			} catch (NumberFormatException e) {
+				posValue = 0;
+			}
+		}
+		role.setPos(posValue);
 		if (id == null)
 			id = "";
 		if (id.equals("")) {

+ 12 - 10
src/main/webapp/yw/master1_bpm/instance/listFlowForMine.jsp

@@ -119,16 +119,18 @@ function searchByKword(s){
 					 html+= '</div>';
 					 //html+= '<div class="div_btn"><input type="button" onclick=\'item("");\' class="btn_c" value="撤&nbsp;消" /></div>';
 					 if (arr.modelId.isCancel.value == 1){
-							if (arr.modelId.allowCancels > 0 && arr.state.value != 0) {
-								if(arr.modelId.control.value == "1"){
-	                    			url = 'MTFlowAction.do';
-	                    		}else if(arr.modelId.control.value == "0"){
-	                    			url = arr.modelId.controlUrl;
-	                    		}
-					 			html+= '<div class="div_btn"><input type="button" onclick=\'cancelFlow('
-									+ arr.insId
-									+ ',"'+url+'");\' class="btn_c" value="撤&nbsp;消" /></div>';
-							}
+						 if(arr.modelId.endCancel.value == 1 || (arr.modelId.endCancel.value ==0 && arr.state.value != 2)){
+							 if (arr.modelId.allowCancels > 0 && arr.state.value != 0) {
+								 if(arr.modelId.control.value == "1"){
+									 url = 'MTFlowAction.do';
+								 }else if(arr.modelId.control.value == "0"){
+									 url = arr.modelId.controlUrl;
+								 }
+								 html+= '<div class="div_btn"><input type="button" onclick=\'cancelFlow('
+										 + arr.insId
+										 + ',"'+url+'");\' class="btn_c" value="撤&nbsp;消" /></div>';
+							 }
+						 }
 					}
 					 if(arr.state.value != 2 && arr.state.value != 0 && arr.backct != 1 && arr.auditct < 2){
 						 html+= '<div class="div_btn"><input type="button" onclick=\'backTins('