Просмотр исходного кода

Merge branch 'test' of jishutao/kede-server into master

anderx 1 год назад
Родитель
Сommit
38e64b0f38

+ 1 - 1
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -1138,7 +1138,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
       </if>
     </if>
     <if test="specially == 4">
-      and a.process_status in (3,5,6,7,99)
+      and a.process_status in(3,6,7,8,99)
       and a.order_status  in(1,2,3,4,6)
     </if>
     <if test="deps!=null">

+ 14 - 8
src/main/java/com/goafanti/order/controller/AdminOrderReceivablesApiController.java

@@ -216,15 +216,21 @@ public class AdminOrderReceivablesApiController extends CertifyApiController {
 			if (e.getType()!=null){
 				String[] split = e.getType().split(",");
 				StringBuilder str=new StringBuilder();
-				for (String s : split) {
-					if (s.equals("0")){
-						str.append(ApprovalTypeEnums.getDesc(s))
-								.append("(").append(e.getTypeExplain()).append(")")
-								.append(",");
-					}else {
-						String desc = ApprovalTypeEnums.getDesc(Integer.parseInt(s));
-						str.append(desc).append(",");
+				int index = 1;
+				for (int i = 1; i < 9; i++) {
+					for (String s : split) {
+						if (index ==Integer.parseInt(s)){
+							if (ApprovalTypeEnums.QT.getCode().equals(Integer.parseInt(s))){
+								str.append(ApprovalTypeEnums.getDesc(s))
+										.append("(").append(e.getTypeExplain()).append(")")
+										.append(",");
+							}else {
+								str.append(ApprovalTypeEnums.getDesc(s)).append(",");
+							}
+						}
 					}
+					index++;
+					if (index==8)index=0;
 				}
 				e.setType(str.substring(0,str.length()-1));
 			}

+ 10 - 6
src/main/java/com/goafanti/order/controller/OrderProjectApiController.java

@@ -379,19 +379,23 @@ public class OrderProjectApiController extends CertifyApiController {
 				if(e.getType()!=null) {
 					String[] split = e.getType().split(",");
 					StringBuilder stringBuilder = new StringBuilder();
-					Arrays.stream(split).forEach(
-							s->{
-								if (ApprovalTypeEnums.QT.getCode().equals(Integer.valueOf(s))){
+					int index = 1;
+					for (int i = 1; i < 9; i++) {
+						for (String s : split) {
+							if (index ==Integer.parseInt(s)){
+								if (ApprovalTypeEnums.QT.getCode().equals(Integer.parseInt(s))){
 									stringBuilder.append(ApprovalTypeEnums.getDesc(s))
 											.append("(").append(e.getTypeExplain()).append(")")
 											.append(",");
 								}else {
 									stringBuilder.append(ApprovalTypeEnums.getDesc(s)).append(",");
 								}
-
 							}
-					);
-					e.setType(stringBuilder.substring(0,stringBuilder.length()-1));
+						}
+						index++;
+						if (index==8)index=0;
+					}
+					if(stringBuilder.length()>0)e.setType(stringBuilder.substring(0,stringBuilder.length()-1));
 				}
 			}
 

+ 14 - 8
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -1374,15 +1374,21 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			if (out.getType()!=null){
 				String[] split = out.getType().split(",");
 				StringBuilder str=new StringBuilder();
-				for (String s : split) {
-					if (s.equals("0")){
-						str.append(ApprovalTypeEnums.getDesc(s))
-								.append("(").append(out.getTypeExplain()).append(")")
-								.append(",");
-					}else {
-						String desc = ApprovalTypeEnums.getDesc(Integer.parseInt(s));
-						str.append(desc).append(",");
+				int index = 1;
+				for (int i = 1; i < 9; i++) {
+					for (String s : split) {
+						if (index ==Integer.parseInt(s)){
+							if (ApprovalTypeEnums.QT.getCode().equals(Integer.parseInt(s))){
+								str.append(ApprovalTypeEnums.getDesc(s))
+										.append("(").append(out.getTypeExplain()).append(")")
+										.append(",");
+							}else {
+								str.append(ApprovalTypeEnums.getDesc(s)).append(",");
+							}
+						}
 					}
+					index++;
+					if (index==8)index=0;
 				}
 				out.setType(str.substring(0,str.length()-1));
 			}

+ 3 - 1
src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java

@@ -268,7 +268,9 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
 
 		if(StringUtils.isBlank(useDep.getOperationGuaranteeId())&&StringUtils.isNotBlank(in.getOperationGuaranteeId())){
 			List<String> strings = torderNewMapper.selectByDepAndProcess(useDep.getId(), ProcessStatus.YYBZSH.getCode());
-			torderNewMapper.updateOrderDepFinanceExamineName(strings, ProcessStatus.YYBZSH.getCode());
+			if(!strings.isEmpty()){
+				torderNewMapper.updateOrderDepFinanceExamineName(strings, ProcessStatus.YYBZSH.getCode());
+			}
 		}
 		//财务与复审切换的时候要切换所有未审核的财务
 		boolean updateFinance=false;