增加代码检测,和映射
This commit is contained in:
+73
@@ -0,0 +1,73 @@
|
||||
package com.bms.web.controller.data;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.bms.common.annotation.Log;
|
||||
import com.bms.common.core.controller.BaseController;
|
||||
import com.bms.common.core.domain.AjaxResult;
|
||||
import com.bms.common.core.page.TableDataInfo;
|
||||
import com.bms.common.enums.BusinessType;
|
||||
import com.bms.system.domain.BmsProductCodeMapping;
|
||||
import com.bms.system.service.IBmsProductCodeMappingService;
|
||||
|
||||
/**
|
||||
* 代码映射:上游产品代码 -> BMS产品代码
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/data/productCodeMap")
|
||||
public class BmsProductCodeMappingController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBmsProductCodeMappingService mappingService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('data:productCodeMap:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BmsProductCodeMapping query)
|
||||
{
|
||||
startPage();
|
||||
List<BmsProductCodeMapping> list = mappingService.selectList(query);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('data:productCodeMap:query')")
|
||||
@GetMapping("/{mapId}")
|
||||
public AjaxResult getInfo(@PathVariable Long mapId)
|
||||
{
|
||||
return success(mappingService.selectById(mapId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('data:productCodeMap:add')")
|
||||
@Log(title = "product code mapping", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BmsProductCodeMapping row)
|
||||
{
|
||||
row.setCreateBy(getUsername());
|
||||
return toAjax(mappingService.insert(row));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('data:productCodeMap:edit')")
|
||||
@Log(title = "product code mapping", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BmsProductCodeMapping row)
|
||||
{
|
||||
row.setUpdateBy(getUsername());
|
||||
return toAjax(mappingService.update(row));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('data:productCodeMap:remove')")
|
||||
@Log(title = "product code mapping", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{mapIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] mapIds)
|
||||
{
|
||||
return toAjax(mappingService.deleteByIds(mapIds));
|
||||
}
|
||||
}
|
||||
+17
@@ -26,7 +26,9 @@ import com.bms.common.utils.StringUtils;
|
||||
import com.bms.price.domain.PrcBillingTaskRetryTask;
|
||||
import com.bms.price.domain.vo.TabOrderMonitorQuery;
|
||||
import com.bms.price.domain.vo.TabOrderMonitorVo;
|
||||
import com.bms.price.domain.vo.TabOrderProductCheckResult;
|
||||
import com.bms.price.oracle.TabOrderMonitorService;
|
||||
import com.bms.price.oracle.TabOrderProductCheckService;
|
||||
import com.bms.price.search.BillSearchPage;
|
||||
import com.bms.price.search.EsLogType;
|
||||
import com.bms.price.search.IBillSearchStore;
|
||||
@@ -43,6 +45,9 @@ public class TabOrderMonitorController extends BaseController
|
||||
@Autowired
|
||||
private TabOrderMonitorService tabOrderMonitorService;
|
||||
|
||||
@Autowired
|
||||
private TabOrderProductCheckService tabOrderProductCheckService;
|
||||
|
||||
@Autowired
|
||||
private TabOrderSyncAsyncRunner tabOrderSyncAsyncRunner;
|
||||
|
||||
@@ -74,6 +79,18 @@ public class TabOrderMonitorController extends BaseController
|
||||
return rsp;
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:orderSource:list')")
|
||||
@PostMapping("/checkProducts")
|
||||
public AjaxResult checkProducts(@RequestBody TabOrderMonitorQuery query)
|
||||
{
|
||||
if (!hasRequiredFilters(query))
|
||||
{
|
||||
return error("customerCodes and pickup time required");
|
||||
}
|
||||
TabOrderProductCheckResult data = tabOrderProductCheckService.check(query);
|
||||
return success(data);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:orderSource:sync')")
|
||||
@Log(title = "order source sync filter", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/syncByFilter")
|
||||
|
||||
Reference in New Issue
Block a user