Browse Source

订单列表修改

anderx 1 year ago
parent
commit
fc76e8ad7f

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

@@ -990,7 +990,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   <select id="selectOrderNewListByPage" resultType="com.goafanti.order.bo.TOrderNewBo">
   	select a.order_no as orderNo,a.create_time as createTime, date_format(a.sign_time,'%Y-%m-%d' ) as signDate,a.delete_sign deleteSign,
   	a.contract_no as contractNo, b.nickname as userName ,a.process_status as processStatus,a.total_amount as totalAmount,a.tag,
-  	a.contract_picture_url contractPictureUrl,
+  	a.contract_picture_url contractPictureUrl,toprc.max_status as maxStatus,
   	a.order_status as orderStatus, a.liquidation_status as liquidationStatus,a.approval,c.salesman_name as salesmanName,c.project_type projectType,
   	dep.name as depName,c.finance_name as financeName,c.invoice_amount invoiceAmount,a.settlement_amount settlementAmount,
     a.sales_type salesType, a.channel_id channelId ,a.other,a.examine_name examineName,c.stop_project stopProject,toa.type,toa.type_explain typeExplain
@@ -1029,6 +1029,8 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
       </foreach>
       group by order_no) toa2 on a.order_no=toa2.order_no
     </if>
+    left join t_order_public_release_count toprc on a.order_no=toprc.order_no
+
     where a.delete_sign in(0,2)
    <include refid="selectOrderNewSql"/>
   	order by
@@ -1051,7 +1053,9 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   </select>
 
   <sql id="selectOrderNewSql">
-
+    <if test="maxStatus !=null">
+      and toprc.max_status = #{maxStatus}
+    </if>
     <if test="specially ==7">
       and a.process_status > 5
       and a.salesman_id = #{aid,jdbcType=VARCHAR}

+ 9 - 0
src/main/java/com/goafanti/order/bo/InputOrderNewListBo.java

@@ -25,9 +25,18 @@ public class InputOrderNewListBo {
     private Integer projectType;
     private Integer processStatus;
     private Integer tag;
+    private Integer maxStatus;
     private  Integer pageNo;
     private Integer pageSize;
 
+    public Integer getMaxStatus() {
+        return maxStatus;
+    }
+
+    public void setMaxStatus(Integer maxStatus) {
+        this.maxStatus = maxStatus;
+    }
+
     public String getType() {
         return type;
     }

+ 1 - 0
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -1304,6 +1304,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				params.put("type", split);
 			}
 		}
+		if(in.getMaxStatus()!=null)params.put("maxStatus", in.getMaxStatus());
 		params.put("outsource", in.getOutsource());
 		return null;
 	}

+ 9 - 7
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -1246,17 +1246,14 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		str.append("合同编号[").append(order.getContractNo()).append("]最大公出限制审核");
 		if(status==1){
 			in.setMaxProcess(process);
-			if (examine==0||examine==2){
+			if (examine==0){
 				addOrderPublicReleaseLog(orderNo,status,1,remarks);
-				//如果是0
-				if (examine==0){
-					addOrderPublicReleaseLog(orderNo,status,2,"相同审核人自动跳过。");
-					pushCompleteMaxDuration(orderNo);
-				}
+				addOrderPublicReleaseLog(orderNo,status,2,"相同审核人自动跳过。");
+				pushCompleteMaxDuration(orderNo);
 				str.append("已通过。");
 				addNoticeAndEmail(order.getSalesmanId(),NoticeStatus.PUBLIC_MAX_DURATION_YES.getCode(), str.toString());
 			}else if (examine==1){
-				addOrderPublicReleaseLog(orderNo,status,2,remarks);
+				addOrderPublicReleaseLog(orderNo,status,1,remarks);
 				if (examine==1){
 					List<Admin> admins = adminMapper.selectAdminByRoleType(AFTConstants.FINANCE_ADMIN);
 					str.append("需要审核,请尽快审核。");
@@ -1265,6 +1262,11 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 					});
 					pushCompleteMaxDuration(orderNo);
 				}
+			}else if (examine==2){
+				addOrderPublicReleaseLog(orderNo,status,2,remarks);
+				pushCompleteMaxDuration(orderNo);
+				str.append("已通过。");
+				addNoticeAndEmail(order.getSalesmanId(),NoticeStatus.PUBLIC_MAX_DURATION_YES.getCode(), str.toString());
 			}
 		}else if(status==2){
 			in.setMaxProcess(3);