Bladeren bron

报销申请(报销类型增加“其他”)

[user3] 4 jaren geleden
bovenliggende
commit
24866ca238

+ 8 - 1
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementAllService.java

@@ -256,7 +256,14 @@ public class WorkReimbursementAllService extends CrudService<WorkReimbursementDa
                 }else if (null != workAccount.getType()) {
                     WorkReimbursementTypeInfo workReimbursementTypeInfo= workReimbursementTypeService.get(workAccount.getType());
                     if (null != workReimbursementTypeInfo){
-                        String pid=workReimbursementTypeInfo.getParentIds().split(",")[1];
+                        String [] pidlen=workReimbursementTypeInfo.getParentIds().split(",");
+                        String pid=null;
+                        if (pidlen.length!=1){
+                            pid=pidlen[1];
+                        }else{
+                            pid="2";
+                        }
+//                        String pid=workReimbursementTypeInfo.getParentIds().split(",")[1];
                         if("1".equals(pid) ){
                             //查询项目报告信息
                             if (StringUtils.isNotBlank(info.getWorkAccount().getProject().getId())){

+ 17 - 3
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java

@@ -155,7 +155,7 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
                     workAccount.setFinancialSubjectss(workAccount.getFinancialSubjects());
                     workAccount.setFinancialSubjects("");
                 }
-                if(null != workAccount.getProjectRadio() && workAccount.getProjectRadio() == 0){
+                if((null != workAccount.getProjectRadio() && workAccount.getProjectRadio() == 0)||(null != workAccount.getProjectRadio() && workAccount.getProjectRadio() ==2)){
                     workAccount.getProject().setProjectName(workAccount.getReimburseRemarks());
                 }
             }
@@ -272,7 +272,14 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
                 }else if (null != workAccount.getType()){
                     WorkReimbursementTypeInfo workReimbursementTypeInfo= workReimbursementTypeService.get(workAccount.getType());
                     if (null != workReimbursementTypeInfo){
-                        String pid=workReimbursementTypeInfo.getParentIds().split(",")[1];
+                        String [] pidlen=workReimbursementTypeInfo.getParentIds().split(",");
+                        String pid=null;
+                        if (pidlen.length!=1){
+                            pid=pidlen[1];
+                        }else{
+                            pid="2";
+                        }
+//                        String pid=workReimbursementTypeInfo.getParentIds().split(",")[1];
                         if("1".equals(pid) ){
                             //查询项目报告信息
                             if (StringUtils.isNotBlank(info.getWorkAccount().getProject().getId())){
@@ -1427,7 +1434,14 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
                 }else if (null != workAccount.getType()) {
                     WorkReimbursementTypeInfo workReimbursementTypeInfo= workReimbursementTypeService.get(workAccount.getType());
                     if (null != workReimbursementTypeInfo){
-                        String pid=workReimbursementTypeInfo.getParentIds().split(",")[1];
+                        String [] pidlen=workReimbursementTypeInfo.getParentIds().split(",");
+                        String pid=null;
+                        if (pidlen.length!=1){
+                            pid=pidlen[1];
+                        }else{
+                            pid="2";
+                        }
+//                        String pid=workReimbursementTypeInfo.getParentIds().split(",")[1];
                         if("1".equals(pid) ){
                             workAccount.setProjectRadio(1);
                         }else{

+ 7 - 2
src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementTypeController.java

@@ -175,8 +175,13 @@ public class WorkReimbursementTypeController extends BaseController {
     @ResponseBody
     @RequestMapping(value = "projectCharge")
     public String projectCharge(String pids,Model model) {
-        String pid=pids.split(",")[1];
-        model.addAttribute("projectCharge",pid);
+        String [] pidlen=pids.split(",");
+        String pid=null;
+        if (pidlen.length!=1){
+            pid=pidlen[1];
+        }else{
+            pid="2";
+        }
         return pid;
     }
 

+ 8 - 4
src/main/resources/mappings/modules/workreimbursement/WorkReimbursementTypeDao.xml

@@ -56,7 +56,8 @@
 				ORDER BY ${page.orderBy}
 			</when>
 			<otherwise>
-				ORDER BY a.order_num
+				ORDER BY FIELD(a.order_num,1,3,2)
+# 				ORDER BY a.order_num (1,3,2)
 			</otherwise>
 		</choose>
 	</select>
@@ -154,7 +155,8 @@
             AND del_flag ='0'
 			AND company_id = #{companyId}
         </where>
-        ORDER BY a.order_num
+		ORDER BY FIELD(a.order_num,1,3,2)
+# 		ORDER BY a.order_num
     </select>
     <select id="fingByIds" resultType="com.jeeplus.modules.workreimbursement.entity.WorkReimbursementTypeInfo">
         SELECT <include refid="workReviewStandardColumns"/>
@@ -170,7 +172,8 @@
 			AND company_id = #{companyId}
 			AND parent_ids like concat('%',#{parentIds},'%')
         </where>
-        ORDER BY a.order_num
+		ORDER BY FIELD(a.order_num,1,3,2)
+#         ORDER BY a.order_num
     </select>
 
     <select id="selectOrderNum" resultType="java.lang.String">
@@ -188,6 +191,7 @@
 		WHERE a.del_flag = #{DEL_FLAG_NORMAL} AND (a.parent_ids LIKE
 		<if test="dbName == 'mysql'">concat('%,',#{parentIds},',%')</if>
 		OR a.id = #{id})
-		ORDER BY a.order_num
+		ORDER BY FIELD(a.order_num,1,3,2)
+# 		ORDER BY a.order_num
 	</select>
 </mapper>

+ 1 - 1
src/main/webapp/webpage/modules/workreimbursement/workReimbursementAllFormAdd.jsp

@@ -497,7 +497,7 @@
                 dataType:"json",
                 data:{pids:pIds},
                 success:function (data) {
-                    var pid=pIds.split(',')[1];
+                    var pid=data;
                     var sid="#"+id+"Name"
                     if(data==1){
                         $(sid).parent().parent().parent().parent().find("td").eq(4).find("input").eq(1).val(pid);

+ 1 - 1
src/main/webapp/webpage/modules/workreimbursement/workReimbursementFormAdd.jsp

@@ -526,7 +526,7 @@
                 dataType:"json",
                 data:{pids:pIds},
                 success:function (data) {
-                    var pid=pIds.split(',')[1];
+                    var pid=data;
                     var sid="#"+id+"Name"
                     if(data==1){
                         $(sid).parent().parent().parent().parent().find("td").eq(4).find("input").eq(1).val(pid);

+ 1 - 1
src/main/webapp/webpage/modules/workreimbursement/workReimbursementModifyApply.jsp

@@ -509,7 +509,7 @@
                 dataType:"json",
                 data:{pids:pIds},
                 success:function (data) {
-                    var pid=pIds.split(',')[1];
+                    var pid=data;
                     var sid="#"+id+"Name"
                     if(data==1){
                         $(sid).parent().parent().parent().parent().find("td").eq(4).find("input").eq(1).val(pid);