|
@@ -2,9 +2,10 @@ package com.platform.rest.controller.yongyou;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.platform.common.bean.AbstractPageResultBean;
|
|
|
+import com.platform.common.util.HttpUtil;
|
|
|
import com.platform.common.util.JsonUtils;
|
|
|
import com.platform.common.util.R;
|
|
|
-import com.platform.dao.dto.spareAdd.Inventory;
|
|
|
+import com.platform.common.util.StringUtils;
|
|
|
import com.platform.dao.dto.spareAdd.InventoryTest;
|
|
|
import com.platform.dao.dto.sqarepartmanage.SparePartInfoDTO;
|
|
|
import com.platform.dao.dto.store.SpareStoreDTO;
|
|
@@ -12,11 +13,18 @@ import com.platform.dao.vo.query.sparepartmanage.SparePartInfoVO;
|
|
|
import com.platform.dao.vo.query.store.SpareStoreVO;
|
|
|
import com.platform.rest.log.annotation.SysLog;
|
|
|
import com.platform.service.yongyou.YongyouService;
|
|
|
+import com.platform.service.yongyou.PurchaseOrderModNoticeHandler;
|
|
|
+import handler.yongyou.request.FromYongYouBaseRequest;
|
|
|
+import handler.yongyou.request.PurchaseOrderStatusModNoticeRequest;
|
|
|
+import handler.yongyou.response.ToYongYouBaseResponse;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
/**
|
|
|
* @Description 备件领用登记单 控制器
|
|
|
* @Author liuyu
|
|
@@ -30,6 +38,10 @@ import org.springframework.web.bind.annotation.*;
|
|
|
public class YongyouController {
|
|
|
|
|
|
private final YongyouService yongyouService;
|
|
|
+ @Resource
|
|
|
+ private final PurchaseOrderModNoticeHandler purchaseOrderModNoticeHandler;
|
|
|
+
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 查询用友备件分页数据
|
|
@@ -44,6 +56,28 @@ public class YongyouController {
|
|
|
return new R<>(yongyouService.selectPageList(sparePartInfoDTO, pageNum, pageSize));
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/purchaseOrder/status/mod")
|
|
|
+ public void PurchaseOrderNotice(HttpServletRequest request, HttpServletResponse response){
|
|
|
+ ToYongYouBaseResponse bs = null;
|
|
|
+ FromYongYouBaseRequest req = null;
|
|
|
+ try {
|
|
|
+ String reqStr = HttpUtil.getRequestParams(request);
|
|
|
+ if (StringUtils.isNotBlank(reqStr)) {
|
|
|
+ req = JsonUtils.jsonToModel(reqStr, PurchaseOrderStatusModNoticeRequest.class);
|
|
|
+ bs = purchaseOrderModNoticeHandler.propellingHandle(req, reqStr);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ bs.setResult(false);
|
|
|
+ bs.setMsg("系统错误!");
|
|
|
+ e.printStackTrace();
|
|
|
+ log.error("临沂理赔申请接口出错:" + e.getCause().getMessage());
|
|
|
+// bs = LinYiResponseUtil.exceptionReturn(e.getMessage());
|
|
|
+ }
|
|
|
+ // 数据回传,这里的bs,默认做了加密处理
|
|
|
+ YongYouResponseUtil.wirteBack(bs, response);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 查询用友存量库存分页数据
|
|
|
*
|
|
@@ -96,7 +130,7 @@ public class YongyouController {
|
|
|
}
|
|
|
|
|
|
@SysLog("请购单删除")
|
|
|
- @GetMapping("/delete/purcahseOrder/{id}")
|
|
|
+ @DeleteMapping("/delete/purcahseOrder/{id}")
|
|
|
public R deletePurchaseOrder(@PathVariable String id) {
|
|
|
return new R<>(yongyouService.deletePurchaseOrder(id));
|
|
|
}
|