KdYdCustomerController.java 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. package com.malk.huagao.controller;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.malk.huagao.service.IKdYdCustomerService;
  4. import com.malk.huagao.service.IKdYdZpService;
  5. import com.malk.huagao.service.YdHuaGaoService;
  6. import com.malk.server.aliwork.YDConf;
  7. import com.malk.server.aliwork.YDParam;
  8. import com.malk.server.common.McR;
  9. import com.malk.service.aliwork.YDClient;
  10. import com.malk.utils.UtilMap;
  11. import org.slf4j.MDC;
  12. import org.springframework.beans.factory.annotation.Autowired;
  13. import org.springframework.web.bind.annotation.PostMapping;
  14. import org.springframework.web.bind.annotation.RequestBody;
  15. import org.springframework.web.bind.annotation.RequestMapping;
  16. import org.springframework.stereotype.Controller;
  17. import org.springframework.web.bind.annotation.RestController;
  18. import java.util.Map;
  19. /**
  20. * <p>
  21. * 前端控制器
  22. * </p>
  23. *
  24. * @author LQY
  25. * @since 2025-10-09
  26. */
  27. @RestController
  28. @RequestMapping("/hg")
  29. public class KdYdCustomerController {
  30. @Autowired
  31. private IKdYdCustomerService kdYdCustomerService;
  32. @Autowired
  33. private YdHuaGaoService ydHuaGaoService;
  34. @Autowired
  35. private IKdYdZpService kdYdZpService;
  36. @Autowired
  37. private YDClient ydClient;
  38. @PostMapping("/test30")
  39. McR test13(@RequestBody Map data) {
  40. MDC.put("MDC_KEY_PID","1003");
  41. // String ins = String.valueOf(data.get("formInstId"));
  42. //
  43. //
  44. //
  45. // ydClient.operateData(YDParam.builder()
  46. // .formInstanceId(ins)
  47. // .updateFormDataJson(JSONObject.toJSONString(UtilMap.map("numberField_mhirg0kz","156")))//xz04
  48. //// .updateFormDataJson(JSONObject.toJSONString(UtilMap.map(employ,id)))//xz04
  49. // .useLatestVersion(true)
  50. // .build(), YDConf.FORM_OPERATION.update);
  51. ydHuaGaoService.synckdYdMaterial();
  52. // ydHuaGaoService.synckdYdPayment();
  53. // ydHuaGaoService.syncKdYdReceivable();
  54. // kdYdZpService.insertkdYdZp(data);
  55. // ydHuaGaoService.synckdYdOutbound();
  56. return McR.success();
  57. }
  58. @PostMapping("/kdYdCustomer")
  59. McR insertCustomer(@RequestBody Map map) {
  60. kdYdCustomerService.insertCustomer(map);
  61. return McR.success();
  62. }
  63. }