rev:优化
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
package org.nl.wms.external_system.erp.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.entity.PageQuery;
|
||||
import org.nl.wms.dispatch_manage.task.service.ISchBaseTaskService;
|
||||
import org.nl.wms.dispatch_manage.task.service.dao.SchBaseTask;
|
||||
import org.nl.wms.dispatch_manage.task.service.dto.SchBaseTaskQuery;
|
||||
import org.nl.wms.system_manage.service.quartz.task.SyncErpBillsScheduleService;
|
||||
import org.nl.wms.system_manage.service.quartz.task.TaskScheduleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任务表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-05-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/sycnErp")
|
||||
public class SyncErpController {
|
||||
|
||||
@Autowired
|
||||
private SyncErpBillsScheduleService syncErpBillsScheduleService;
|
||||
|
||||
@PostMapping("manualSync")
|
||||
@Log("同步ERP")
|
||||
public ResponseEntity<Object> manualSync(@RequestBody JSONObject param) {
|
||||
//TODO:调用同步
|
||||
String formType = param.getString("form_type");
|
||||
String formCode = param.getString("form_code");
|
||||
String startTime = null;
|
||||
String endTime = null;
|
||||
JSONArray datepick = param.getJSONArray("datepick");
|
||||
if (datepick!=null && datepick.size()>0){
|
||||
startTime = datepick.getString(0); //时间格式2024-12-12 12:00:00没选则为空
|
||||
endTime = datepick.getString(0);
|
||||
}
|
||||
syncErpBillsScheduleService.manualSync(formType,formCode,startTime,endTime);
|
||||
return new ResponseEntity<>(TableDataInfo.buildJson("同步成功共计100条"), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user