Browse Source

新增查看列表

anderx 6 years ago
parent
commit
7b29fedf63

+ 2 - 0
src/main/java/com/goafanti/common/dao/OutsourceOrganizationMapper.java

@@ -78,4 +78,6 @@ public interface OutsourceOrganizationMapper {
 	int updateByPrimaryKey(OutsourceOrganization record);
 
 	List<OutsourceOrganizationBo> selectOutsourceOrg(@Param("orderNo")String orderNo,@Param("tid")String tid);
+
+	List<OutsourceOrganizationBo> selectOrderOutsourceOrg(String orderNo);
 }

+ 7 - 0
src/main/java/com/goafanti/common/mapper/OutsourceOrganizationMapper.xml

@@ -404,4 +404,11 @@
     and  order_no= #{orderNo}
   	</if>
   </select>
+  <select id="selectOrderOutsourceOrg" resultType="com.goafanti.order.bo.OutsourceOrganizationBo">
+  select a.order_no as orderNo,a.contract_no as contractNo,b.commodity_name as tname,b.project_status as projectStatus,
+	c.id,c.name,c.province,c.city,c.area,c.address,c.contacts,date_format(c.create_time,'%Y-%m-%d %H:%I:%S') as createTimes,
+	c.contacts_mobile as contactsMobile,c.remarks from t_order_new a 
+	left join t_order_task b on a.order_no=b.order_no left join outsource_organization c on b.id=c.tid
+	where a.delete_sign=0 and b.status=0 and c.id is not null and a.order_no= #{orderNo}
+  </select>
 </mapper>

+ 31 - 0
src/main/java/com/goafanti/order/bo/OutsourceOrganizationBo.java

@@ -4,6 +4,37 @@ import com.goafanti.common.model.OutsourceOrganization;
 
 public class OutsourceOrganizationBo extends OutsourceOrganization{
 	private String createTimes;
+	
+	private String tname;
+	
+	private String contractNo;
+	
+	private Integer projectStatus;
+	
+	
+	public String getTname() {
+		return tname;
+	}
+
+	public void setTname(String tname) {
+		this.tname = tname;
+	}
+
+	public String getContractNo() {
+		return contractNo;
+	}
+
+	public void setContractNo(String contractNo) {
+		this.contractNo = contractNo;
+	}
+
+	public Integer getProjectStatus() {
+		return projectStatus;
+	}
+
+	public void setProjectStatus(Integer projectStatus) {
+		this.projectStatus = projectStatus;
+	}
 
 	public String getCreateTimes() {
 		return createTimes;

+ 15 - 0
src/main/java/com/goafanti/order/controller/OutsourceOrgApiController.java

@@ -67,4 +67,19 @@ public class OutsourceOrgApiController extends CertifyApiController {
 		res.data(outsourceOrgService.selectOutsourceOrg(orderNo,tid));
 		return res;
 	}
+	/**
+	 * 订单外包列表
+	 * @param orderNo
+	 * @return
+	 */
+	@RequestMapping(value = "/selectOrderOutsourceOrg", method=RequestMethod.GET)
+	public Result selectOrderOutsourceOrg(String  orderNo) {
+		Result res=new Result();
+		if (orderNo==null) {
+			res.getError().add(buildError("", "必须选择订单"));
+			return res;
+		}
+		res.data(outsourceOrgService.selectOrderOutsourceOrg(orderNo));
+		return res;
+	}
 }

+ 2 - 0
src/main/java/com/goafanti/order/service/OutsourceOrgService.java

@@ -15,5 +15,7 @@ public interface OutsourceOrgService {
 
 	List<OutsourceOrganizationBo> selectOutsourceOrg(String orderNo,String tid);
 
+	List<OutsourceOrganizationBo> selectOrderOutsourceOrg(String orderNo);
+
 	
 }

+ 5 - 0
src/main/java/com/goafanti/order/service/impl/OutsourceOrgServiceImpl.java

@@ -30,5 +30,10 @@ public class OutsourceOrgServiceImpl implements OutsourceOrgService {
 		List<OutsourceOrganizationBo> l=outsourceOrganizationMapper.selectOutsourceOrg(orderNo,tid);
 		return l;
 	}
+	@Override
+	public List<OutsourceOrganizationBo> selectOrderOutsourceOrg(String orderNo) {
+		
+		return outsourceOrganizationMapper.selectOrderOutsourceOrg(orderNo);
+	}
 
 }