|
|
@@ -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;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|