|
@@ -34,6 +34,7 @@ import org.jeecg.common.exception.JeecgBootException;
|
|
|
import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
import org.jeecg.modules.documents.letterDeposit.entity.SyLetterDepositItem;
|
|
|
import org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetailsItem;
|
|
|
+import org.jeecg.modules.documents.shippingDetails.entity.VO.RespUpdateVO;
|
|
|
import org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo;
|
|
|
import org.jeecg.modules.documents.shippingDetails.service.ISyShippingDetailsItemService;
|
|
|
import org.jeecg.modules.openApi.entity.DxpDataPlan;
|
|
@@ -63,6 +64,7 @@ import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
|
|
import org.jeecgframework.poi.excel.view.JeecgTemplateExcelView;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.util.ResourceUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
@@ -94,7 +96,9 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
|
|
|
@Autowired
|
|
|
private IDxpDataPlanService iDxpDataPlanService;
|
|
|
|
|
|
-
|
|
|
+ // srm调用校验码
|
|
|
+ @Value("${srm.access-token}")
|
|
|
+ private String srmAccessToken;
|
|
|
|
|
|
/**
|
|
|
* 分页列表查询
|
|
@@ -2519,4 +2523,37 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
|
|
|
return Result.ok(packing);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * SRM推送添加
|
|
|
+ *
|
|
|
+ * @param syPreAssembledPackingList
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AutoLog(value = "预装箱单主表-SRM推送添加")
|
|
|
+ @ApiOperation(value="预装箱单主表-SRM推送添加", notes="预装箱单主表-SRM推送添加")
|
|
|
+ @PostMapping(value = "/srmAdd")
|
|
|
+ public RespUpdateVO srmAdd(@RequestBody SyPreAssembledPackingList syPreAssembledPackingList) {
|
|
|
+ RespUpdateVO respUpdateVO = new RespUpdateVO();
|
|
|
+ respUpdateVO.setSuccess(false);
|
|
|
+ if (!srmAccessToken.equals(syPreAssembledPackingList.getAccessToken())){
|
|
|
+ respUpdateVO.setMessage("认证失败,请联系管理员");
|
|
|
+ return respUpdateVO;
|
|
|
+ }
|
|
|
+ try{
|
|
|
+ if(oConvertUtils.isEmpty(syPreAssembledPackingList.getItemNumber())){
|
|
|
+ respUpdateVO.setMessage("请先填好信息再提交");
|
|
|
+ return respUpdateVO;
|
|
|
+ }
|
|
|
+ syPreAssembledPackingList=syPreAssembledPackingListService.saveMain2(syPreAssembledPackingList);
|
|
|
+ respUpdateVO.setMessage(syPreAssembledPackingList.getDocumentNo());
|
|
|
+ respUpdateVO.setSuccess(true);
|
|
|
+ }catch (Exception ex){
|
|
|
+ ex.printStackTrace();
|
|
|
+ log.error("添加失败:" + ex.getMessage());
|
|
|
+ respUpdateVO.setMessage(ex.getMessage());
|
|
|
+ return respUpdateVO;
|
|
|
+ }
|
|
|
+ return respUpdateVO;
|
|
|
+ }
|
|
|
+
|
|
|
}
|