|
@@ -4,7 +4,13 @@ import com.ankaibei.workFlow.common.core.object.TokenData;
|
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.enums.CodeEnum;
|
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.service.ApplyForCostService;
|
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.service.impl.FileUtil;
|
|
|
-import com.ankaibei.workFlow.webadmin.ankaibei.vo.*;
|
|
|
+import com.ankaibei.workFlow.webadmin.ankaibei.vo.CommunicationInfoVo;
|
|
|
+import com.ankaibei.workFlow.webadmin.ankaibei.vo.PurchaseInfoVo;
|
|
|
+import com.ankaibei.workFlow.webadmin.ankaibei.vo.RepastExpenseVo;
|
|
|
+import com.ankaibei.workFlow.webadmin.ankaibei.vo.ResMsg;
|
|
|
+import com.ankaibei.workFlow.webadmin.ankaibei.vo.RestsInfoVo;
|
|
|
+import com.ankaibei.workFlow.webadmin.ankaibei.vo.TrafficExpenseVo;
|
|
|
+import com.ankaibei.workFlow.webadmin.ankaibei.vo.TravelExpenseVo;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
|
@@ -56,7 +62,7 @@ public class ApplyForCostController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 申请通讯费
|
|
|
+ * 申请通讯费_保存
|
|
|
*
|
|
|
* @param communicationInfoVo
|
|
|
* @return ResMsg
|
|
@@ -69,19 +75,104 @@ public class ApplyForCostController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 申请采购费
|
|
|
+ * 申请通讯费_保存后提交
|
|
|
+ *
|
|
|
+ * @param communicationInfoVo
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/communicationSubmitBySave")
|
|
|
+ public ResMsg communicationSubmitBySave(@RequestBody CommunicationInfoVo communicationInfoVo) {
|
|
|
+ communicationInfoVo.setTotalMoney(communicationInfoVo.getApplicationFee());
|
|
|
+ return applyForCostService.communicationSubmitBySave(communicationInfoVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请通讯费_批量提交
|
|
|
+ *
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/communicationSubmitBatch")
|
|
|
+ public ResMsg communicationSubmit(@RequestBody List<CommunicationInfoVo> communicationInfoVos) {
|
|
|
+ if (ObjectUtils.isEmpty(communicationInfoVos)) {
|
|
|
+ return new ResMsg(CodeEnum.FAIL, "请选择要提交的数据");
|
|
|
+ }
|
|
|
+ return applyForCostService.communicationSubmitBatch(communicationInfoVos);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通讯费_修改并保存
|
|
|
+ */
|
|
|
+ @RequestMapping("/communicationUpdate")
|
|
|
+ public ResMsg communicationUpdate(@RequestBody CommunicationInfoVo communicationInfoVo) {
|
|
|
+ communicationInfoVo.setTotalMoney(communicationInfoVo.getApplicationFee());
|
|
|
+ return applyForCostService.communicationUpdate(communicationInfoVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通讯费_修改并提交
|
|
|
+ */
|
|
|
+ @RequestMapping("/communicationSubmitByUpdate")
|
|
|
+ public ResMsg communicationSubmitByUpdate(@RequestBody CommunicationInfoVo communicationInfoVo) {
|
|
|
+ communicationInfoVo.setTotalMoney(communicationInfoVo.getApplicationFee());
|
|
|
+ return applyForCostService.communicationSubmitByUpdate(communicationInfoVo);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请采购费__保存
|
|
|
*
|
|
|
* @param purchaseInfoVo
|
|
|
* @return ResMsg
|
|
|
*/
|
|
|
- @RequestMapping("/addpurchase")
|
|
|
- public ResMsg addpurchase(@RequestBody PurchaseInfoVo purchaseInfoVo) {
|
|
|
+ @RequestMapping("/addPurchase")
|
|
|
+ public ResMsg addPurchase(@RequestBody PurchaseInfoVo purchaseInfoVo) {
|
|
|
purchaseInfoVo.setCreateUser(TokenData.takeFromRequest().getUserId());
|
|
|
- return applyForCostService.addpurchase(purchaseInfoVo);
|
|
|
+ return applyForCostService.addPurchase(purchaseInfoVo);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
- * 申请其他费用
|
|
|
+ * 申请采购费__保存后提交
|
|
|
+ *
|
|
|
+ * @param purchaseInfoVo
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/purchaseSubmitBySave")
|
|
|
+ public ResMsg purchaseSubmitBySave(@RequestBody PurchaseInfoVo purchaseInfoVo) {
|
|
|
+ return applyForCostService.purchaseSubmitBySave(purchaseInfoVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请采购费_批量提交
|
|
|
+ *
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/purchaseSubmitBatch")
|
|
|
+ public ResMsg purchaseSubmitBatch(@RequestBody List<PurchaseInfoVo> purchaseInfoVos) {
|
|
|
+ if (ObjectUtils.isEmpty(purchaseInfoVos)) {
|
|
|
+ return new ResMsg(CodeEnum.FAIL, "请选择要提交的数据");
|
|
|
+ }
|
|
|
+ return applyForCostService.purchaseSubmitBatch(purchaseInfoVos);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 采购费_修改并保存
|
|
|
+ */
|
|
|
+ @RequestMapping("/purchaseUpdate")
|
|
|
+ public ResMsg purchaseUpdate(@RequestBody PurchaseInfoVo purchaseInfoVo) {
|
|
|
+ return applyForCostService.purchaseUpdate(purchaseInfoVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 采购费_修改并提交
|
|
|
+ */
|
|
|
+ @RequestMapping("/purchaseSubmitByUpdate")
|
|
|
+ public ResMsg purchaseSubmitByUpdate(@RequestBody PurchaseInfoVo purchaseInfoVo) {
|
|
|
+ return applyForCostService.purchaseSubmitByUpdate(purchaseInfoVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请其他费用--保存
|
|
|
*
|
|
|
* @param restsInfoVo
|
|
|
* @return ResMsg
|
|
@@ -93,31 +184,163 @@ public class ApplyForCostController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 申请交通费用
|
|
|
+ * 申请其他费用--保存并提交 *
|
|
|
+ *
|
|
|
+ * @param restsInfoVo
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/restSubmitBySave")
|
|
|
+ public ResMsg restSubmitBySave(@RequestBody RestsInfoVo restsInfoVo) {
|
|
|
+ return applyForCostService.restSubmitBySave(restsInfoVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请其他费用--批量提交
|
|
|
+ *
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/restSubmitBatch")
|
|
|
+ public ResMsg restSubmitBatch(@RequestBody List<RestsInfoVo> restsInfoVos) {
|
|
|
+ if (ObjectUtils.isEmpty(restsInfoVos)) {
|
|
|
+ return new ResMsg(CodeEnum.FAIL, "请选择要提交的数据");
|
|
|
+ }
|
|
|
+ return applyForCostService.restSubmitBatch(restsInfoVos);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 其他费用--修改并保存
|
|
|
+ *
|
|
|
+ * @param restsInfoVo
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/restUpdate")
|
|
|
+ public ResMsg restUpdate(@RequestBody RestsInfoVo restsInfoVo) {
|
|
|
+ return applyForCostService.restUpdate(restsInfoVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 其他费用--修改并提交
|
|
|
+ *
|
|
|
+ * @param restsInfoVo
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/restUpdate")
|
|
|
+ public ResMsg restSubmitByUpdate(@RequestBody RestsInfoVo restsInfoVo) {
|
|
|
+ return applyForCostService.restSubmitByUpdate(restsInfoVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请交通费用--保存
|
|
|
*
|
|
|
* @param trafficExpenseVo
|
|
|
* @return ResMsg
|
|
|
*/
|
|
|
@RequestMapping("/trafficExpenseApply")
|
|
|
- public ResMsg trafficExpenseApply(@RequestBody TrafficExpenseVo trafficExpenseVo, HttpServletRequest request) {
|
|
|
+ public ResMsg trafficExpenseApply(@RequestBody TrafficExpenseVo trafficExpenseVo) {
|
|
|
trafficExpenseVo.setApplicant(TokenData.takeFromRequest().getUserId());
|
|
|
- return applyForCostService.trafficExpenseApply(trafficExpenseVo);
|
|
|
+ return applyForCostService.addTraffic(trafficExpenseVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请交通费用--保存并提交
|
|
|
+ *
|
|
|
+ * @param trafficExpenseVo
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/trafficSubmitBySave")
|
|
|
+ public ResMsg trafficSubmitBySave(@RequestBody TrafficExpenseVo trafficExpenseVo) {
|
|
|
+ return applyForCostService.trafficSubmitBySave(trafficExpenseVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请交通费用--批量提交
|
|
|
+ *
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/trafficSubmitBatch")
|
|
|
+ public ResMsg trafficSubmitBatch(@RequestBody List<TrafficExpenseVo> trafficExpenseVos) {
|
|
|
+ if (ObjectUtils.isEmpty(trafficExpenseVos)) {
|
|
|
+ return new ResMsg(CodeEnum.FAIL, "请选择要提交的数据");
|
|
|
+ }
|
|
|
+ return applyForCostService.trafficSubmitBatch(trafficExpenseVos);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请交通费用--修改并保存
|
|
|
+ *
|
|
|
+ * @param trafficExpenseVo
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/trafficUpdate")
|
|
|
+ public ResMsg trafficUpdate(@RequestBody TrafficExpenseVo trafficExpenseVo) {
|
|
|
+ return applyForCostService.trafficUpdate(trafficExpenseVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请交通费用--修改并提交
|
|
|
+ *
|
|
|
+ * @param trafficExpenseVo
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/trafficSubmitByUpdate")
|
|
|
+ public ResMsg trafficSubmitByUpdate(@RequestBody TrafficExpenseVo trafficExpenseVo) {
|
|
|
+ return applyForCostService.trafficSubmitByUpdate(trafficExpenseVo);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 申请餐饮费用
|
|
|
+ * 申请餐饮费用--保存
|
|
|
*
|
|
|
* @param RepastExpenseVo
|
|
|
* @return ResMsg
|
|
|
*/
|
|
|
@RequestMapping("/repastExpenseApply")
|
|
|
- public ResMsg repastExpenseApply(@RequestBody RepastExpenseVo RepastExpenseVo, HttpServletRequest request) {
|
|
|
+ public ResMsg repastExpenseApply(@RequestBody RepastExpenseVo RepastExpenseVo) {
|
|
|
RepastExpenseVo.setApplicant(TokenData.takeFromRequest().getUserId());
|
|
|
return applyForCostService.repastExpenseApply(RepastExpenseVo);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 申请差旅费用
|
|
|
+ * 申请餐饮费用--保存并提交
|
|
|
+ *
|
|
|
+ * @param RepastExpenseVo
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/repastSubmitBySave")
|
|
|
+ public ResMsg repastSubmitBySave(@RequestBody RepastExpenseVo RepastExpenseVo) {
|
|
|
+ return applyForCostService.repastSubmitBySave(RepastExpenseVo);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请餐饮费用--批量提交
|
|
|
+ *
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/repastSubmitBatch")
|
|
|
+ public ResMsg repastSubmitBatch(@RequestBody List<RepastExpenseVo> repastExpenseVos) {
|
|
|
+ if (ObjectUtils.isEmpty(repastExpenseVos)) {
|
|
|
+ return new ResMsg(CodeEnum.FAIL, "请选择要提交的数据");
|
|
|
+ }
|
|
|
+ return applyForCostService.repastSubmitBatch(repastExpenseVos);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请餐费--修改并保存
|
|
|
+ */
|
|
|
+ @RequestMapping("/repastUpdate")
|
|
|
+ public ResMsg repastUpdate(@RequestBody RepastExpenseVo RepastExpenseVo) {
|
|
|
+ return applyForCostService.repastUpdate(RepastExpenseVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping("/repastSubmitByUpdate")
|
|
|
+ public ResMsg repastSubmitByUpdate(@RequestBody RepastExpenseVo RepastExpenseVo) {
|
|
|
+ return applyForCostService.repastSubmitByUpdate(RepastExpenseVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请差旅费用--保存
|
|
|
*
|
|
|
* @param travelExpenseVo
|
|
|
* @return ResMsg
|
|
@@ -128,4 +351,46 @@ public class ApplyForCostController {
|
|
|
return applyForCostService.travelExpenseApply(travelExpenseVo);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请差旅费用--保存并提交
|
|
|
+ *
|
|
|
+ * @param travelExpenseVo
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/travelSubmitBySave")
|
|
|
+ public ResMsg travelSubmitBySave(@RequestBody TravelExpenseVo travelExpenseVo) {
|
|
|
+ return applyForCostService.travelSubmitBySave(travelExpenseVo);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请差旅费用--批量提交
|
|
|
+ *
|
|
|
+ * @return ResMsg
|
|
|
+ */
|
|
|
+ @RequestMapping("/travelSubmitBatch")
|
|
|
+ public ResMsg travelSubmitBatch(@RequestBody List<TravelExpenseVo> travelExpenseVos) {
|
|
|
+ if (ObjectUtils.isEmpty(travelExpenseVos)) {
|
|
|
+ return new ResMsg(CodeEnum.FAIL, "请选择要提交的数据");
|
|
|
+ }
|
|
|
+ return applyForCostService.travelSubmitBatch(travelExpenseVos);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 申请差旅费用--修改并保存
|
|
|
+ */
|
|
|
+ @RequestMapping("/travelUpdate")
|
|
|
+ public ResMsg travelUpdate(@RequestBody TravelExpenseVo travelExpenseVo) {
|
|
|
+ return applyForCostService.travelUpdate(travelExpenseVo);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @RequestMapping("/travelSubmitByUpdate")
|
|
|
+ public ResMsg travelSubmitByUpdate(@RequestBody TravelExpenseVo travelExpenseVo) {
|
|
|
+ return applyForCostService.travelSubmitByUpdate(travelExpenseVo);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|