Browse Source

update

Signed-off-by: anderx <312518615@qq.com>
anderx 5 years ago
parent
commit
8f2908f528

+ 144 - 144
src/main/java/com/goafanti/common/constant/ErrorConstants.java

@@ -1,145 +1,145 @@
-package com.goafanti.common.constant;
-
-public class ErrorConstants {
-
-	public static final String	NON_LOGIN							= "NON_LOGIN";
-	
-	public static final String	NO_CERTIFY							= "NO_CERTIFY";
-
-	public static final String	VCODE_ERROR							= "VCODE_ERROR";
-
-	public static final String	NO_AUTH_ERROR						= "NO_AUTH_ERROR";
-	/** 0参数错误 */
-	public static final String	PARAM_ERROR							= "PARAM_ERROR";
-	/** 0必须为数字*/
-	public static final String	PARAM_INTEGER_ERROR					= "PARAM_INTEGER_ERROR";
-	/** 0必须在指定*/
-	public static final String	PARAM_EMPTY_ERROR					= "PARAM_EMPTY_ERROR";
-	/** 0已存在*/
-	public static final String	PARAM_BEING_ERROR					= "PARAM_BEING_ERROR";
-	
-	public static final String	PARAM_SIZE_ERROR					= "PARAM_SIZE_ERROR";
-
-	public static final String	PARAM_PATTERN_ERROR					= "PARAM_PATTERN_ERROR";
-
-	public static final String	EMAIL_SIZE_ERROR					= "EMAIL_SIZE_ERROR";
-
-	public static final String	EMAIL_PATTERN_ERROR					= "EMAIL_PATTERN_ERROR";
-
-	public static final String	DUNPLICATE_KAY_ERROR				= "DUNPLICATE_KAY_ERROR";
-
-	public static final String	DATA_EMPTY_ERROR					= "DATA_EMPTY_ERROR";
-
-	public static final String	PWD_NOT_MATCH_ERROR					= "PWD_NOT_MATCH_ERROR";
-
-	public static final String	PWD_SAME_ERROR						= "PWD_SAME_ERROR";
-
-	public static final String	USER_ALREADY_EXIST					= "USER_ALREADY_EXIST";
-
-	public static final String	MOBILE_PATTERN_ERROR				= "MOBILE_PATTERN_ERROR";
-
-	public static final String	MOBILE_SIZE_ERROR					= "MOBILE_SIZE_ERROR";
-
-	public static final String	MOBILE_SAME_ERROR					= "MOBILE_SAME_ERROR";
-
-	public static final String	MOBILE_EMPTY_ERROR					= "MOBILE_EMPTY_ERROR";
-
-	public static final String	IDNUMBER_SIZE_ERROR					= "IDNUMBER_SIZE_ERROR";
-
-	public static final String	IDNUMBER_PATTERN_ERROR				= "IDNUMBER_PATTERN_ERROR";
-
-	public static final String	MCODE_ERROR							= "MCODE_ERROR";
-
-	public static final String	MCODE_OVERTIME_ERROR				= "MCODE_OVERTIME_ERROR";
-
-	public static final String	NON_REGISTER						= "NON_REGISTER";
-
-	public static final String	RESET_CODE_ERROR					= "RESET_CODE_ERROR";
-
-	public static final String	RESET_CODE_OVERTIME					= "RESET_CODE_OVERTIME";
-
-	public static final String	FILE_NON_EXISTENT					= "FILE_NON_EXISTENT";
-
-	public static final String	INSUFFICIENT_AUTHORITY_ERROR		= "INSUFFICIENT_AUTHORITY_ERROR";
-
-	public static final String	NON_CERTIFIED						= "NON_CERTIFIED";
-
-	public static final String	DUPLICATE_DATA_ERROR				= "DUPLICATE_DATA_ERROR";
-
-	public static final String	FILE_PATTERN_ERROR					= "FILE_PATTERN_ERROR";
-
-	public static final String	RECORD_CALLBACK						= "RECORD_CALLBACK";
-
-	public static final String	RECORD_SETTLEMENT					= "RECORD_SETTLEMENT";
-
-	public static final String	STATUS_ERROR						= "STATUS_ERROR";
-
-	public static final String	CONTRACT_PATENT_CREATED				= "CONTRACT_PATENT_CREATED";
-
-	public static final String	CONTRACT_COPYRIGHT_CREATED			= "CONTRACT_COPYRIGHT_CREATED";
-
-	public static final String	CONTRACT_TECHPROJECT_CREATED		= "CONTRACT_TECHPROJECT_CREATED";
-
-	public static final String	CONTRACT_COGNIZANCE_CREATED			= "CONTRACT_COGNIZANCE_CREATED";
-
-	public static final String	RECORD_REJECT						= "RECORD_REJECT";
-
-	public static final String	EVALUATE_ID							= "EVALUATE_ID";
-
-	public static final String	EVALUATE_STEP						= "EVALUATE_STEP";
-
-	public static final String	EVALUATE_PARAM						= "EVALUATE_PARAM";
-
-	public static final String	CONTRACT_YEAR_SECTION				= "CONTRACT_YEAR_SECTION";
-
-	public static final String	VCODE_EMPTY_ERROR					= "VCODE_EMPTY_ERROR";
-
-	public static final String	MCODE_FREQUENCY_ERROR				= "MCODE_FREQUENCY_ERROR";
-
-	public static final String	MCODE_EMPTY_ERROR					= "MCODE_EMPTY_ERROR";
-
-	public static final String	IDENTITY_PAY_OVER_TIME				= "IDENTITY_PAY_OVER_TIME";
-
-	public static final String	OVER_MAX_WRONG_COUNT				= "OVER_MAX_WRONG_COUNT";
-
-	public static final String	WRONG_MONEY							= "WRONG_MONEY";
-
-	public static final String	M_CODE_ERROR						= "M_CODE_ERROR";
-	
-	public static final String MARKET_BOOTH_MAX						= "MARKET_BOOTH_MAX";	
-	
-	public static final String CUSTOMER_ALREADY_EXIST				= "CUSTOMER_ALREADY_EXIST";
-	
-	public static final String CUSTOMER_ALREADY_LOCKED				= "CUSTOMER_ALREADY_LOCKED";
-	
-	public static final String CUSTOMER_ALREADY_RECEIVE				= "CUSTOMER_ALREADY_RECEIVE";
-	public static final String CUSTOM_EREXCESS						= "CUSTOM_EREXCESS";		
-	public static final String CUSTOMER_TRANSFER_FAIL				= "CUSTOMER_ALREADY_RECEIVE";
-	
-	public static final String BUSINESS_ALREADY_LOCKED				= "BUSINESS_ALREADY_LOCKED";
-	
-	public static final String BUSINESS_ALREADY_EXIST				= "BUSINESS_ALREADY_EXIST";
-	
-	public static final String AT_LEAST_A_BUSINESS					= "AT_LEAST_A_BUSINESS";
-	
-	public static final String	SON_ALREADY_EXIST					= "SON_ALREADY_EXIST";
-	
-	public static final String USER_NICKNAME_EXIST					= "USER_NICKNAME_EXIST";
-	
-	public static final String NOT_ACCORD_WITH_NEXT					= "NOT_ACCORD_WITH_NEXT";
-	
-	public static final String ORDER_CAN_NOT_MODIFY					= "ORDER_CAN_NOT_MODIFY";
-	
-	/** 该订单已经被冻结*/
-	public static final String ORDER_ALREADY_FREEZE                 = "ORDER_ALREADY_FREEZE";
-	/** 该订单已经被锁定*/
-	public static final String ORDER_ALREADY_REVOKE					= "ORDER_ALREADY_REVOKE";
-	
-	public static final String ORDER_NOT_EXIST						= "ORDER_NOT_EXIST";
-	
-	public static final String PAY_BEYOND_SIGN						= "PAY_BEYOND_SIGN";
-	
-	public static final String REFUND_BEYOND_SIGN					= "REFUND_BEYOND_SIGN";
-	
-	public static final String BILL_ALREADY_EXPIRE					= "BILL_ALREADY_EXPIRE";
+package com.goafanti.common.constant;
+
+public class ErrorConstants {
+
+	public static final String	NON_LOGIN							= "NON_LOGIN";
+	
+	public static final String	NO_CERTIFY							= "NO_CERTIFY";
+
+	public static final String	VCODE_ERROR							= "VCODE_ERROR";
+	
+	public static final String	NO_AUTH_ERROR						= "NO_AUTH_ERROR";
+	/** 0参数错误 */
+	public static final String	PARAM_ERROR							= "PARAM_ERROR";
+	/** 0必须为数字*/
+	public static final String	PARAM_INTEGER_ERROR					= "PARAM_INTEGER_ERROR";
+	/** 0必须在指定*/
+	public static final String	PARAM_EMPTY_ERROR					= "PARAM_EMPTY_ERROR";
+	/** 0已存在*/
+	public static final String	PARAM_BEING_ERROR					= "PARAM_BEING_ERROR";
+	
+	public static final String	PARAM_SIZE_ERROR					= "PARAM_SIZE_ERROR";
+
+	public static final String	PARAM_PATTERN_ERROR					= "PARAM_PATTERN_ERROR";
+
+	public static final String	EMAIL_SIZE_ERROR					= "EMAIL_SIZE_ERROR";
+
+	public static final String	EMAIL_PATTERN_ERROR					= "EMAIL_PATTERN_ERROR";
+
+	public static final String	DUNPLICATE_KAY_ERROR				= "DUNPLICATE_KAY_ERROR";
+
+	public static final String	DATA_EMPTY_ERROR					= "DATA_EMPTY_ERROR";
+
+	public static final String	PWD_NOT_MATCH_ERROR					= "PWD_NOT_MATCH_ERROR";
+
+	public static final String	PWD_SAME_ERROR						= "PWD_SAME_ERROR";
+
+	public static final String	USER_ALREADY_EXIST					= "USER_ALREADY_EXIST";
+
+	public static final String	MOBILE_PATTERN_ERROR				= "MOBILE_PATTERN_ERROR";
+
+	public static final String	MOBILE_SIZE_ERROR					= "MOBILE_SIZE_ERROR";
+
+	public static final String	MOBILE_SAME_ERROR					= "MOBILE_SAME_ERROR";
+
+	public static final String	MOBILE_EMPTY_ERROR					= "MOBILE_EMPTY_ERROR";
+
+	public static final String	IDNUMBER_SIZE_ERROR					= "IDNUMBER_SIZE_ERROR";
+
+	public static final String	IDNUMBER_PATTERN_ERROR				= "IDNUMBER_PATTERN_ERROR";
+
+	public static final String	MCODE_ERROR							= "MCODE_ERROR";
+
+	public static final String	MCODE_OVERTIME_ERROR				= "MCODE_OVERTIME_ERROR";
+
+	public static final String	NON_REGISTER						= "NON_REGISTER";
+
+	public static final String	RESET_CODE_ERROR					= "RESET_CODE_ERROR";
+
+	public static final String	RESET_CODE_OVERTIME					= "RESET_CODE_OVERTIME";
+
+	public static final String	FILE_NON_EXISTENT					= "FILE_NON_EXISTENT";
+
+	public static final String	INSUFFICIENT_AUTHORITY_ERROR		= "INSUFFICIENT_AUTHORITY_ERROR";
+
+	public static final String	NON_CERTIFIED						= "NON_CERTIFIED";
+
+	public static final String	DUPLICATE_DATA_ERROR				= "DUPLICATE_DATA_ERROR";
+
+	public static final String	FILE_PATTERN_ERROR					= "FILE_PATTERN_ERROR";
+
+	public static final String	RECORD_CALLBACK						= "RECORD_CALLBACK";
+
+	public static final String	RECORD_SETTLEMENT					= "RECORD_SETTLEMENT";
+
+	public static final String	STATUS_ERROR						= "STATUS_ERROR";
+
+	public static final String	CONTRACT_PATENT_CREATED				= "CONTRACT_PATENT_CREATED";
+
+	public static final String	CONTRACT_COPYRIGHT_CREATED			= "CONTRACT_COPYRIGHT_CREATED";
+
+	public static final String	CONTRACT_TECHPROJECT_CREATED		= "CONTRACT_TECHPROJECT_CREATED";
+
+	public static final String	CONTRACT_COGNIZANCE_CREATED			= "CONTRACT_COGNIZANCE_CREATED";
+
+	public static final String	RECORD_REJECT						= "RECORD_REJECT";
+
+	public static final String	EVALUATE_ID							= "EVALUATE_ID";
+
+	public static final String	EVALUATE_STEP						= "EVALUATE_STEP";
+
+	public static final String	EVALUATE_PARAM						= "EVALUATE_PARAM";
+
+	public static final String	CONTRACT_YEAR_SECTION				= "CONTRACT_YEAR_SECTION";
+
+	public static final String	VCODE_EMPTY_ERROR					= "VCODE_EMPTY_ERROR";
+
+	public static final String	MCODE_FREQUENCY_ERROR				= "MCODE_FREQUENCY_ERROR";
+
+	public static final String	MCODE_EMPTY_ERROR					= "MCODE_EMPTY_ERROR";
+
+	public static final String	IDENTITY_PAY_OVER_TIME				= "IDENTITY_PAY_OVER_TIME";
+
+	public static final String	OVER_MAX_WRONG_COUNT				= "OVER_MAX_WRONG_COUNT";
+
+	public static final String	WRONG_MONEY							= "WRONG_MONEY";
+
+	public static final String	M_CODE_ERROR						= "M_CODE_ERROR";
+	
+	public static final String MARKET_BOOTH_MAX						= "MARKET_BOOTH_MAX";	
+	
+	public static final String CUSTOMER_ALREADY_EXIST				= "CUSTOMER_ALREADY_EXIST";
+	
+	public static final String CUSTOMER_ALREADY_LOCKED				= "CUSTOMER_ALREADY_LOCKED";
+	
+	public static final String CUSTOMER_ALREADY_RECEIVE				= "CUSTOMER_ALREADY_RECEIVE";
+	public static final String CUSTOM_EREXCESS						= "CUSTOM_EREXCESS";		
+	public static final String CUSTOMER_TRANSFER_FAIL				= "CUSTOMER_ALREADY_RECEIVE";
+	
+	public static final String BUSINESS_ALREADY_LOCKED				= "BUSINESS_ALREADY_LOCKED";
+	
+	public static final String BUSINESS_ALREADY_EXIST				= "BUSINESS_ALREADY_EXIST";
+	
+	public static final String AT_LEAST_A_BUSINESS					= "AT_LEAST_A_BUSINESS";
+	
+	public static final String	SON_ALREADY_EXIST					= "SON_ALREADY_EXIST";
+	
+	public static final String USER_NICKNAME_EXIST					= "USER_NICKNAME_EXIST";
+	
+	public static final String NOT_ACCORD_WITH_NEXT					= "NOT_ACCORD_WITH_NEXT";
+	
+	public static final String ORDER_CAN_NOT_MODIFY					= "ORDER_CAN_NOT_MODIFY";
+	
+	/** 该订单已经被冻结*/
+	public static final String ORDER_ALREADY_FREEZE                 = "ORDER_ALREADY_FREEZE";
+	/** 该订单已经被锁定*/
+	public static final String ORDER_ALREADY_REVOKE					= "ORDER_ALREADY_REVOKE";
+	
+	public static final String ORDER_NOT_EXIST						= "ORDER_NOT_EXIST";
+	
+	public static final String PAY_BEYOND_SIGN						= "PAY_BEYOND_SIGN";
+	
+	public static final String REFUND_BEYOND_SIGN					= "REFUND_BEYOND_SIGN";
+	
+	public static final String BILL_ALREADY_EXPIRE					= "BILL_ALREADY_EXPIRE";
 }

File diff suppressed because it is too large
+ 628 - 628
src/main/java/com/goafanti/common/mapper/TOrderOutsourceMapper.xml


+ 332 - 328
src/main/java/com/goafanti/organization/controller/ThirdPartyCompanyApiController.java

@@ -1,328 +1,332 @@
-package com.goafanti.organization.controller;
-
-
-import javax.annotation.Resource;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseApiController;
-import com.goafanti.common.model.TOrderPayment;
-import com.goafanti.common.model.ThirdPartyCompany;
-import com.goafanti.common.utils.StringUtils;
-import com.goafanti.organization.bo.InputNodeList;
-import com.goafanti.organization.bo.InputPaymentList;
-import com.goafanti.organization.bo.InputPaymentNode;
-import com.goafanti.organization.bo.InuptFinancialPayment;
-import com.goafanti.organization.service.ThirdPartyCompanyService;
-
-
-
-@RestController
-@RequestMapping("/api/admin/company")
-public class ThirdPartyCompanyApiController extends BaseApiController{
-	@Resource
-	private ThirdPartyCompanyService thirdPartyCompanyService;
-	
-	/**
-	 * 新增第三方机构
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/addCompany" , method = RequestMethod.POST)
-	public Result addCompany(ThirdPartyCompany t) {
-		Result res =new Result();
-		if (StringUtils.isBlank(t.getCompanyName())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"名称","名称"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.addCompany(t));
-		return res;
-	}
-	
-	/**
-	 * 修改第三方机构
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/updateCompany" , method = RequestMethod.POST)
-	public Result updateCompany(ThirdPartyCompany t) {
-		Result res =new Result();
-		if (null==t.getId()) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
-			return res;
-		}
-		if (StringUtils.isBlank(t.getCompanyName())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"名称","名称"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.updateCompany(t));
-		return res;
-	}
-	
-	/**
-	 * 删除第三方机构
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/deleteCompany" , method = RequestMethod.POST)
-	public Result deleteCompany(Integer id) {
-		Result res =new Result();
-		if (null==id) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.deleteCompany(id));
-		return res;
-	}
-	/**
-	 * 第三方机构列表
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/selectCompany" , method = RequestMethod.GET)
-	public Result selectCompany(Integer tid) {
-		Result res =new Result();
-		if (null==tid) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.selectCompany(tid));
-		return res;
-	}
-	
-	
-	/**
-	 * 模糊查询机构列表
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/selectVague" , method = RequestMethod.GET)
-	public Result selectVague(String  name) {
-		Result res =new Result();
-		if (StringUtils.isBlank(name)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"名称","名称"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.selectVague(name));
-		return res;
-	}
-	
-	/**
-	 * 新增付款节点
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/addPaymentNode" , method = RequestMethod.POST)
-	public Result addPaymentNode(InputPaymentNode p) {
-		Result res =new Result();
-		if (null==p.getTid()) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"项目编号","项目编号"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.addPaymentNode(p));
-		return res;
-	}
-	
-	/**
-	 * 删除付款节点
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/deletePaymentNode" , method = RequestMethod.POST)
-	public Result deletePaymentNode(Integer id) {
-		Result res =new Result();
-		if (null==id) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.deletePaymentNode(id));
-		return res;
-	}
-	/**
-	 * 修改付款节点
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/updatePaymentNode" , method = RequestMethod.POST)
-	public Result updatePaymentNode(InputPaymentNode p) {
-		Result res =new Result();
-		if (null==p.getId()) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
-			return res;
-		}
-		if (null==p.getTid()) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"项目编号","项目编号"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.updatePaymentNode(p));
-		return res;
-	}
-	
-	/**
-	 * 付款节点列表
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/selectPaymentNode" , method = RequestMethod.GET)
-	public Result selectPaymentNode(Integer tid) {
-		Result res =new Result();
-		if (null==tid) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.selectPaymentNode(tid));
-		return res;
-	}
-	
-	/**
-	 * 新增付款
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/addOrderPayment" , method = RequestMethod.POST)
-	public Result addOrderPayment(TOrderPayment p) {
-		Result res =new Result();
-		if (null==p.getTid()) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
-			return res;
-		}
-		if (thirdPartyCompanyService.checkPayment(p)) {
-			res.getError().add(buildError("金额超出限制,请核对可输入余额。","金额超出限制,请核对可输入余额。"));
-			return res;
-		}
-		
-		if (p.getPaymentType()==1&&thirdPartyCompanyService.checkprojectDun(p)) {
-			res.getError().add(buildError("项目节点未达到可付款状态。","项目节点未达到可付款状态。"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.addOrderPayment(p));
-		return res;
-	}
-	/**
-	 * 修改付款
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/updateOrderPayment" , method = RequestMethod.POST)
-	public Result updateOrderPayment(TOrderPayment p) {
-		Result res =new Result();
-		if (null==p.getTid()) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.updateOrderPayment(p));
-		return res;
-	}
-	
-	/**
-	 * 付款详情
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/OrderPaymentDetails" , method = RequestMethod.GET)
-	public Result OrderPaymentDetails(Integer id) {
-		Result res =new Result();
-		if (null==id) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.OrderPaymentDetails(id));
-		return res;
-	}
-	
-	/**
-	 * 付款列表
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/selectOrderPayment" , method = RequestMethod.GET)
-	public Result selectOrderPayment(Integer id) {
-		Result res =new Result();
-		if (null==id) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.selectOrderPayment(id));
-		return res;
-	}
-	
-	/**
-	 * 付款日志
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/selectPaymentLog" , method = RequestMethod.GET)
-	public Result selectPaymentLog(Integer id) {
-		Result res =new Result();
-		if (null==id) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.selectPaymentLog(id));
-		return res;
-	}
-	/**
-	 * 新增财务付款
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/addfinancialPayment" , method = RequestMethod.POST)
-	public Result addfinancialPayment(InuptFinancialPayment f) {
-		Result res =new Result();
-		if (null==f.getPartyAmount()) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"金额","金额"));
-			return res;
-		}
-		if (null==f.getPaymentTimes()) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"付款时间","付款时间"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.addfinancialPayment(f));
-		return res;
-	}
-	/**
-	 * 财务付款列表
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/selectfinancialPayment" , method = RequestMethod.GET)
-	public Result selectfinancialPayment(Integer id) {
-		Result res =new Result();
-		if (null==id) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
-			return res;
-		}
-		res.data(thirdPartyCompanyService.selectfinancialPayment(id));
-		return res;
-	}
-	
-	/**
-	 * 财务付款列表
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/selectPaymentList" , method = RequestMethod.GET)
-	public Result selectPaymentList(InputPaymentList  i) {
-		Result res =new Result();
-		res.data(thirdPartyCompanyService.selectPaymentList(i));
-		return res;
-	}
-	
-	/**
-	 * 节点应收款列表
-	 * @param t
-	 * @return
-	 */
-	@RequestMapping(value = "/selectNodeList" , method = RequestMethod.GET)
-	public Result selectNodeList(InputNodeList  i) {
-		Result res =new Result();
-		res.data(thirdPartyCompanyService.selectPaymentList(i));
-		return res;
-	}
-	
-	
-}
+package com.goafanti.organization.controller;
+
+
+import javax.annotation.Resource;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.model.TOrderPayment;
+import com.goafanti.common.model.ThirdPartyCompany;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.organization.bo.InputNodeList;
+import com.goafanti.organization.bo.InputPaymentList;
+import com.goafanti.organization.bo.InputPaymentNode;
+import com.goafanti.organization.bo.InuptFinancialPayment;
+import com.goafanti.organization.service.ThirdPartyCompanyService;
+
+
+
+@RestController
+@RequestMapping("/api/admin/company")
+public class ThirdPartyCompanyApiController extends BaseApiController{
+	@Resource
+	private ThirdPartyCompanyService thirdPartyCompanyService;
+	
+	/**
+	 * 新增第三方机构
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/addCompany" , method = RequestMethod.POST)
+	public Result addCompany(ThirdPartyCompany t) {
+		Result res =new Result();
+		if (StringUtils.isBlank(t.getCompanyName())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"名称","名称"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.addCompany(t));
+		return res;
+	}
+	
+	/**
+	 * 修改第三方机构
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/updateCompany" , method = RequestMethod.POST)
+	public Result updateCompany(ThirdPartyCompany t) {
+		Result res =new Result();
+		if (null==t.getId()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		if (StringUtils.isBlank(t.getCompanyName())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"名称","名称"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.updateCompany(t));
+		return res;
+	}
+	
+	/**
+	 * 删除第三方机构
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/deleteCompany" , method = RequestMethod.POST)
+	public Result deleteCompany(Integer id) {
+		Result res =new Result();
+		if (null==id) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.deleteCompany(id));
+		return res;
+	}
+	/**
+	 * 第三方机构列表
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/selectCompany" , method = RequestMethod.GET)
+	public Result selectCompany(Integer tid) {
+		Result res =new Result();
+		if (null==tid) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.selectCompany(tid));
+		return res;
+	}
+	
+	
+	/**
+	 * 模糊查询机构列表
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/selectVague" , method = RequestMethod.GET)
+	public Result selectVague(String  name) {
+		Result res =new Result();
+		if (StringUtils.isBlank(name)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"名称","名称"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.selectVague(name));
+		return res;
+	}
+	
+	/**
+	 * 新增付款节点
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/addPaymentNode" , method = RequestMethod.POST)
+	public Result addPaymentNode(InputPaymentNode p) {
+		Result res =new Result();
+		if (null==p.getTid()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"项目编号","项目编号"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.addPaymentNode(p));
+		return res;
+	}
+	
+	/**
+	 * 删除付款节点
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/deletePaymentNode" , method = RequestMethod.POST)
+	public Result deletePaymentNode(Integer id) {
+		Result res =new Result();
+		if (null==id) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.deletePaymentNode(id));
+		return res;
+	}
+	/**
+	 * 修改付款节点
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/updatePaymentNode" , method = RequestMethod.POST)
+	public Result updatePaymentNode(InputPaymentNode p) {
+		Result res =new Result();
+		if (null==p.getId()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		if (null==p.getTid()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"项目编号","项目编号"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.updatePaymentNode(p));
+		return res;
+	}
+	
+	/**
+	 * 付款节点列表
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/selectPaymentNode" , method = RequestMethod.GET)
+	public Result selectPaymentNode(Integer tid) {
+		Result res =new Result();
+		if (null==tid) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.selectPaymentNode(tid));
+		return res;
+	}
+	
+	/**
+	 * 新增付款
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/addOrderPayment" , method = RequestMethod.POST)
+	public Result addOrderPayment(TOrderPayment p) {
+		Result res =new Result();
+		if (null==p.getTid()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		if (null==p.getPaymentType()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"类型","类型"));
+			return res;
+		}
+		if (thirdPartyCompanyService.checkPayment(p)) {
+			res.getError().add(buildError("金额超出限制,请核对可输入余额。","金额超出限制,请核对可输入余额。"));
+			return res;
+		}
+		
+		if (p.getPaymentType()==1&&thirdPartyCompanyService.checkprojectDun(p)) {
+			res.getError().add(buildError("项目节点未达到可付款状态。","项目节点未达到可付款状态。"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.addOrderPayment(p));
+		return res;
+	}
+	/**
+	 * 修改付款
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/updateOrderPayment" , method = RequestMethod.POST)
+	public Result updateOrderPayment(TOrderPayment p) {
+		Result res =new Result();
+		if (null==p.getTid()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.updateOrderPayment(p));
+		return res;
+	}
+	
+	/**
+	 * 付款详情
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/OrderPaymentDetails" , method = RequestMethod.GET)
+	public Result OrderPaymentDetails(Integer id) {
+		Result res =new Result();
+		if (null==id) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.OrderPaymentDetails(id));
+		return res;
+	}
+	
+	/**
+	 * 付款列表
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/selectOrderPayment" , method = RequestMethod.GET)
+	public Result selectOrderPayment(Integer id) {
+		Result res =new Result();
+		if (null==id) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.selectOrderPayment(id));
+		return res;
+	}
+	
+	/**
+	 * 付款日志
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/selectPaymentLog" , method = RequestMethod.GET)
+	public Result selectPaymentLog(Integer id) {
+		Result res =new Result();
+		if (null==id) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.selectPaymentLog(id));
+		return res;
+	}
+	/**
+	 * 新增财务付款
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/addfinancialPayment" , method = RequestMethod.POST)
+	public Result addfinancialPayment(InuptFinancialPayment f) {
+		Result res =new Result();
+		if (null==f.getPartyAmount()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"金额","金额"));
+			return res;
+		}
+		if (null==f.getPaymentTimes()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"付款时间","付款时间"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.addfinancialPayment(f));
+		return res;
+	}
+	/**
+	 * 财务付款列表
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/selectfinancialPayment" , method = RequestMethod.GET)
+	public Result selectfinancialPayment(Integer id) {
+		Result res =new Result();
+		if (null==id) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
+			return res;
+		}
+		res.data(thirdPartyCompanyService.selectfinancialPayment(id));
+		return res;
+	}
+	
+	/**
+	 * 财务付款列表
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/selectPaymentList" , method = RequestMethod.GET)
+	public Result selectPaymentList(InputPaymentList  i) {
+		Result res =new Result();
+		res.data(thirdPartyCompanyService.selectPaymentList(i));
+		return res;
+	}
+	
+	/**
+	 * 节点应收款列表
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/selectNodeList" , method = RequestMethod.GET)
+	public Result selectNodeList(InputNodeList  i) {
+		Result res =new Result();
+		res.data(thirdPartyCompanyService.selectPaymentList(i));
+		return res;
+	}
+	
+	
+}