Merge branch 'master' of http://112.4.208.194:3000/FeiDaBaoKai/wms_serve_xugongteji
This commit is contained in:
commit
f9ca2384c8
|
|
@ -4,8 +4,10 @@ import java.util.List;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.app.domain.AppGoods;
|
||||
import com.ruoyi.app.domain.AppLocation;
|
||||
import com.ruoyi.app.service.IAppGoodsService;
|
||||
import com.ruoyi.web.controller.section.EnhanceDataList;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
|
@ -22,6 +24,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Controller
|
||||
|
|
@ -59,13 +62,30 @@ public class AppGoodsController extends BaseController {
|
|||
util.exportExcel(response, list, "【请填写功能名称】数据");
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "物料导入", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:goods:import')")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
|
||||
ExcelUtil<AppGoods> util = new ExcelUtil<AppGoods>(AppGoods.class);
|
||||
List<AppGoods> appGoodsList = util.importExcel(file.getInputStream());
|
||||
String message = appGoodsService.importGoods(appGoodsList, updateSupport);
|
||||
return success(message);
|
||||
}
|
||||
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil<AppGoods> util = new ExcelUtil<AppGoods>(AppGoods.class);
|
||||
util.importTemplateExcel(response, "物料数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:goods:query')")
|
||||
@GetMapping(value = "/{goodsId}")
|
||||
public AjaxResult getInfo(@PathVariable("goodsId") String goodsId) {
|
||||
return success(appGoodsService.selectAppGoodsByGoodsId(goodsId));
|
||||
return success(appGoodsService.selectAppGoodsById(goodsId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -75,6 +95,10 @@ public class AppGoodsController extends BaseController {
|
|||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppGoods appGoods) {
|
||||
AppGoods oldAppGoods = appGoodsService.selectAppGoodsByGoodsId(appGoods.getGoodsId());
|
||||
if (ObjectUtils.isNotEmpty(oldAppGoods)) {
|
||||
return error("物料编码已存在");
|
||||
}
|
||||
return toAjax(appGoodsService.insertAppGoods(appGoods));
|
||||
}
|
||||
|
||||
|
|
@ -85,6 +109,10 @@ public class AppGoodsController extends BaseController {
|
|||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppGoods appGoods) {
|
||||
AppGoods oldAppGoods = appGoodsService.selectAppGoodsByGoodsId(appGoods.getGoodsId());
|
||||
if (ObjectUtils.isNotEmpty(oldAppGoods) && !oldAppGoods.getId().equals(appGoods.getId())) {
|
||||
return error("物料编码已存在");
|
||||
}
|
||||
return toAjax(appGoodsService.updateAppGoods(appGoods));
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +123,7 @@ public class AppGoodsController extends BaseController {
|
|||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{goodsIds}")
|
||||
public AjaxResult remove(@PathVariable String[] goodsIds) {
|
||||
return toAjax(appGoodsService.deleteAppGoodsByGoodsIds(goodsIds));
|
||||
return toAjax(appGoodsService.deleteAppGoodsByIds(goodsIds));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
|||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
|
|||
|
|
@ -4,14 +4,15 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.app.domain.AppLedConfig;
|
||||
import com.ruoyi.app.domain.AppLocation;
|
||||
import com.ruoyi.app.domain.AppVehicle;
|
||||
import com.ruoyi.app.service.IAppLocationService;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.web.controller.section.EnhanceDataList;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
|
@ -28,6 +29,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Controller
|
||||
|
|
@ -66,13 +68,29 @@ public class AppLocationController extends BaseController {
|
|||
util.exportExcel(response, list, "【请填写功能名称】数据");
|
||||
}
|
||||
|
||||
@Log(title = "库位导入", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:location:import')")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
|
||||
ExcelUtil<AppLocation> util = new ExcelUtil<AppLocation>(AppLocation.class);
|
||||
List<AppLocation> locationList = util.importExcel(file.getInputStream());
|
||||
String message = appLocationService.importLocation(locationList, updateSupport);
|
||||
return success(message);
|
||||
}
|
||||
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil<AppLocation> util = new ExcelUtil<AppLocation>(AppLocation.class);
|
||||
util.importTemplateExcel(response, "库位数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:location:query')")
|
||||
@GetMapping(value = "/{locationId}")
|
||||
public AjaxResult getInfo(@PathVariable("locationId") String locationId) {
|
||||
return success(appLocationService.selectAppLocationByLocationId(locationId));
|
||||
return success(appLocationService.selectAppLocationById(locationId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -82,6 +100,10 @@ public class AppLocationController extends BaseController {
|
|||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppLocation appLocation) {
|
||||
AppLocation oldAppLocation = appLocationService.selectAppLocationByLocationId(appLocation.getLocationId());
|
||||
if (ObjectUtils.isNotEmpty(oldAppLocation)) {
|
||||
return error("库位编码已存在");
|
||||
}
|
||||
return toAjax(appLocationService.insertAppLocation(appLocation));
|
||||
}
|
||||
|
||||
|
|
@ -92,6 +114,10 @@ public class AppLocationController extends BaseController {
|
|||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppLocation appLocation) {
|
||||
AppLocation oldAppLocation = appLocationService.selectAppLocationByLocationId(appLocation.getLocationId());
|
||||
if (ObjectUtils.isNotEmpty(oldAppLocation) && !oldAppLocation.getId().equals(appLocation.getId())) {
|
||||
return error("库位编码已存在");
|
||||
}
|
||||
return toAjax(appLocationService.updateAppLocation(appLocation));
|
||||
}
|
||||
|
||||
|
|
@ -102,14 +128,13 @@ public class AppLocationController extends BaseController {
|
|||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{locationIds}")
|
||||
public AjaxResult remove(@PathVariable String[] locationIds) {
|
||||
return toAjax(appLocationService.deleteAppLocationByLocationIds(locationIds));
|
||||
return toAjax(appLocationService.deleteAppLocationByIds(locationIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*/
|
||||
@ApiOperation("生成库位")
|
||||
// @PreAuthorize("@ss.hasPermi('system:location:query')")
|
||||
@GetMapping(value = "/genLocations/{areaId}")
|
||||
@Anonymous
|
||||
public AjaxResult genLocations(@PathVariable("areaId") Integer areaId) {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.ruoyi.app.domain.AppProvider;
|
|||
import com.ruoyi.app.domain.AppStand;
|
||||
import com.ruoyi.app.service.IAppStandService;
|
||||
import com.ruoyi.web.controller.section.EnhanceDataList;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
|
@ -76,6 +77,10 @@ public class AppStandController extends BaseController {
|
|||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppStand appStand) {
|
||||
AppStand oldAppStand = appStandService.selectAppStandByStandCode(appStand.getStandCode());
|
||||
if (ObjectUtils.isNotEmpty(oldAppStand)) {
|
||||
return error("站点编码已存在");
|
||||
}
|
||||
return toAjax(appStandService.insertAppStand(appStand));
|
||||
}
|
||||
|
||||
|
|
@ -86,6 +91,10 @@ public class AppStandController extends BaseController {
|
|||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppStand appStand) {
|
||||
AppStand oldAppStand = appStandService.selectAppStandByStandCode(appStand.getStandCode());
|
||||
if (ObjectUtils.isNotEmpty(oldAppStand) && !oldAppStand.getStandId().equals(appStand.getStandId())) {
|
||||
return error("站点编码已存在");
|
||||
}
|
||||
return toAjax(appStandService.updateAppStand(appStand));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.ruoyi.web.controller.app;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
|
@ -75,8 +77,11 @@ public class AppStorageController extends BaseController
|
|||
@PreAuthorize("@ss.hasPermi('app:storage:add')")
|
||||
@Log(title = "仓库", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppStorage appStorage)
|
||||
{
|
||||
public AjaxResult add(@RequestBody AppStorage appStorage) {
|
||||
AppStorage oldAppStorage = appStorageService.selectAppStorageByStorageId(appStorage.getStorageId());
|
||||
if (ObjectUtils.isNotEmpty(oldAppStorage)) {
|
||||
return error("仓库编码已存在");
|
||||
}
|
||||
return toAjax(appStorageService.insertAppStorage(appStorage));
|
||||
}
|
||||
|
||||
|
|
@ -86,8 +91,11 @@ public class AppStorageController extends BaseController
|
|||
@PreAuthorize("@ss.hasPermi('app:storage:edit')")
|
||||
@Log(title = "仓库", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppStorage appStorage)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody AppStorage appStorage) {
|
||||
AppStorage oldAppStorage = appStorageService.selectAppStorageByStorageId(appStorage.getStorageId());
|
||||
if (ObjectUtils.isNotEmpty(oldAppStorage) && !oldAppStorage.getId().equals(appStorage.getId())) {
|
||||
return error("仓库编码已存在");
|
||||
}
|
||||
return toAjax(appStorageService.updateAppStorage(appStorage));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.ruoyi.app.domain.DTO.AppAvailVehicle;
|
|||
import com.ruoyi.app.service.IAppVehicleService;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.web.controller.section.EnhanceDataList;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
|
@ -62,7 +63,7 @@ public class AppVehicleController extends BaseController {
|
|||
util.exportExcel(response, list, "【请填写功能名称】数据");
|
||||
}
|
||||
|
||||
@Log(title = "容器管理", businessType = BusinessType.IMPORT)
|
||||
@Log(title = "容器导入", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:vehicle:import')")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
|
||||
|
|
@ -75,7 +76,7 @@ public class AppVehicleController extends BaseController {
|
|||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil<AppVehicle> util = new ExcelUtil<AppVehicle>(AppVehicle.class);
|
||||
util.importTemplateExcel(response, "用户数据");
|
||||
util.importTemplateExcel(response, "容器数据");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -94,6 +95,10 @@ public class AppVehicleController extends BaseController {
|
|||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppVehicle appVehicle) {
|
||||
AppVehicle oldAppVehicle = appVehicleService.selectAppVehicleByVehicleCode(appVehicle.getVehicleCode());
|
||||
if (ObjectUtils.isNotEmpty(oldAppVehicle)) {
|
||||
return error("容器编码已存在");
|
||||
}
|
||||
return toAjax(appVehicleService.insertAppVehicle(appVehicle));
|
||||
}
|
||||
|
||||
|
|
@ -104,6 +109,10 @@ public class AppVehicleController extends BaseController {
|
|||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppVehicle appVehicle) {
|
||||
AppVehicle oldAppVehicle = appVehicleService.selectAppVehicleByVehicleCode(appVehicle.getVehicleCode());
|
||||
if (ObjectUtils.isNotEmpty(oldAppVehicle) && !oldAppVehicle.getVehicleId().equals(appVehicle.getVehicleId())) {
|
||||
return error("容器编码已存在");
|
||||
}
|
||||
return toAjax(appVehicleService.updateAppVehicle(appVehicle));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,16 @@ public class AppConstants {
|
|||
* 库位状态 0:正常 1:占用
|
||||
*/
|
||||
public static final Integer LOCATION_STATUS_DISABLE = 1;
|
||||
|
||||
/**
|
||||
* 物料状态 0 启用 1 禁用
|
||||
*/
|
||||
public static final Long GOODS_STATUS_ENABLE = 0L;
|
||||
/**
|
||||
* 物料状态 0 启用 1 禁用
|
||||
*/
|
||||
public static final Long GOODS_STATUS_DISABLE = 1L;
|
||||
|
||||
/**
|
||||
* 出库状态 0 未完成 1 部分出库 2 全部出库
|
||||
*/
|
||||
|
|
@ -27,8 +37,6 @@ public class AppConstants {
|
|||
public static final Integer TASK_TYPE_OUT = 2;
|
||||
public static final Integer TASK_TYPE_IN = 1;
|
||||
public static final Integer TASK_TYPE_TRANSFER = 3;
|
||||
public static final Long GOODS_STATUS_ENABLE = 0L;
|
||||
public static final Long GOODS_STATUS_DISABLE = 1L;
|
||||
|
||||
//
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public class AppGoods extends BaseEntity {
|
|||
/**
|
||||
* 物料状态 0 启用 1 禁用
|
||||
*/
|
||||
@Excel(name = "状态")
|
||||
@Excel(name = "状态", readConverterExp = "0=启用,1=禁用")
|
||||
private Long goodsStatus;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,7 +15,13 @@ public class AppLocation extends BaseEntity
|
|||
{
|
||||
private static final Long serialVersionUID = 1L;
|
||||
|
||||
/** 排 */
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 排
|
||||
*/
|
||||
@Excel(name = "货架排")
|
||||
private Integer wRow;
|
||||
|
||||
|
|
@ -70,8 +76,15 @@ public class AppLocation extends BaseEntity
|
|||
/** 是否在工作中 */
|
||||
private Integer isWorking;
|
||||
|
||||
public void setLocationId(String locationId)
|
||||
{
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setLocationId(String locationId) {
|
||||
this.locationId = locationId;
|
||||
}
|
||||
|
||||
|
|
@ -133,8 +146,11 @@ public class AppLocation extends BaseEntity
|
|||
{
|
||||
return equipmentId;
|
||||
}
|
||||
public void setwRow(Integer wRow)
|
||||
{
|
||||
|
||||
public void setwRow(Integer wRow) {
|
||||
this.wRow = wRow;
|
||||
}
|
||||
public void setWRow(Integer wRow) {
|
||||
this.wRow = wRow;
|
||||
}
|
||||
|
||||
|
|
@ -142,17 +158,23 @@ public class AppLocation extends BaseEntity
|
|||
{
|
||||
return wRow;
|
||||
}
|
||||
public void setwCol(Integer wCol)
|
||||
{
|
||||
this.wCol = wCol;
|
||||
}
|
||||
|
||||
public Integer getwCol()
|
||||
{
|
||||
return wCol;
|
||||
}
|
||||
public void setwLayer(Integer wLayer)
|
||||
{
|
||||
|
||||
public void setwCol(Integer wCol) {
|
||||
this.wCol = wCol;
|
||||
}
|
||||
public void setWCol(Integer wCol) {
|
||||
this.wCol = wCol;
|
||||
}
|
||||
|
||||
public void setwLayer(Integer wLayer) {
|
||||
this.wLayer = wLayer;
|
||||
}
|
||||
public void setWLayer(Integer wLayer) {
|
||||
this.wLayer = wLayer;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class AppProvider extends BaseEntity
|
|||
private String providerAddress;
|
||||
|
||||
/** 供应商状态 0 启用 1 停用*/
|
||||
@Excel(name = "状态")
|
||||
@Excel(name = "状态", readConverterExp = "0=启用,1=禁用")
|
||||
private Long providerStatus;
|
||||
|
||||
/** 类型 1 供应商 2 客户 */
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class AppStand extends BaseEntity
|
|||
private String remark;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
@Excel(name = "状态", readConverterExp = "0=启用,1=禁用")
|
||||
private Long standStatus;
|
||||
|
||||
/** 是否锁定 */
|
||||
|
|
|
|||
|
|
@ -50,16 +50,22 @@ public class AppStorage extends BaseEntity
|
|||
// @Excel(name = "仓库联系人方式")
|
||||
private String storageConcatsMobile;
|
||||
|
||||
/** 是否为立体库1:立体库 0:平库 */
|
||||
@Excel(name = "立体库")
|
||||
/**
|
||||
* 是否为立体库1:立体库 0:平库
|
||||
*/
|
||||
@Excel(name = "立体库", readConverterExp = "0=平库,1=立体库")
|
||||
private String autoStatus;
|
||||
|
||||
/** 是否是AGV库 0:否 1:是 */
|
||||
@Excel(name = "AGV库")
|
||||
/**
|
||||
* 是否是AGV库 0:否 1:是
|
||||
*/
|
||||
@Excel(name = "AGV库", readConverterExp = "0=否,1=是")
|
||||
private String isAgv;
|
||||
|
||||
/** 是否可用 */
|
||||
@Excel(name = "是否可用")
|
||||
/**
|
||||
* 是否可用
|
||||
*/
|
||||
@Excel(name = "是否启用", readConverterExp = "0=启用,1=禁用")
|
||||
private String status;
|
||||
|
||||
/** 仓储类型 1AGV 2堆垛机 3穿梭4 人工库 5 其他 */
|
||||
|
|
|
|||
|
|
@ -29,8 +29,10 @@ public class AppVehicle extends BaseEntity
|
|||
@Excel(name = "容器类型")
|
||||
private String vehicleType;
|
||||
|
||||
/** 容器状态 0 空闲 1 占用 */
|
||||
@Excel(name = "容器状态")
|
||||
/**
|
||||
* 容器状态 0 空闲 1 占用
|
||||
*/
|
||||
@Excel(name = "容器状态", readConverterExp = "0=空闲,1=占用")
|
||||
private Long vehicleStatus;
|
||||
|
||||
/** 备注 */
|
||||
|
|
|
|||
|
|
@ -18,7 +18,15 @@ public interface AppGoodsMapper
|
|||
* @param goodsId 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public AppGoods selectAppGoodsByGoodsId(String goodsId);
|
||||
public AppGoods selectAppGoodsById(String goodsId);
|
||||
|
||||
/**
|
||||
* 根据物料编码查询物料
|
||||
*
|
||||
* @param goodsId
|
||||
* @return
|
||||
*/
|
||||
AppGoods selectAppGoodsByGoodsId(String goodsId);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
|
|
@ -50,7 +58,7 @@ public interface AppGoodsMapper
|
|||
* @param goodsId 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppGoodsByGoodsId(String goodsId);
|
||||
public int deleteAppGoodsById(String goodsId);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
|
|
@ -58,7 +66,7 @@ public interface AppGoodsMapper
|
|||
* @param goodsIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppGoodsByGoodsIds(String[] goodsIds);
|
||||
public int deleteAppGoodsByIds(String[] goodsIds);
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -67,5 +75,6 @@ public interface AppGoodsMapper
|
|||
* @param goodsIds
|
||||
* @return
|
||||
*/
|
||||
List<AppGoods> selectAppGoodsListByGoodsIds(String[] goodsIds);
|
||||
List<AppGoods> selectAppGoodsListByIds(String[] goodsIds);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public interface AppLocationMapper
|
|||
* @param locationId 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
AppLocation selectAppLocationByLocationId(String locationId);
|
||||
AppLocation selectAppLocationById(String locationId);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
|
|
@ -58,7 +58,7 @@ public interface AppLocationMapper
|
|||
* @param locationId 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteAppLocationByLocationId(String locationId);
|
||||
int deleteAppLocationById(String locationId);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
|
|
@ -66,7 +66,7 @@ public interface AppLocationMapper
|
|||
* @param locationIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteAppLocationByLocationIds(String[] locationIds);
|
||||
int deleteAppLocationByIds(String[] locationIds);
|
||||
|
||||
Map<String, Integer> countAvailableStock();
|
||||
|
||||
|
|
@ -75,7 +75,15 @@ public interface AppLocationMapper
|
|||
* @param locationIds
|
||||
* @return
|
||||
*/
|
||||
List<AppLocation> selectAppLocationListByLocationIds(String[] locationIds);
|
||||
List<AppLocation> selectAppLocationListByIds(String[] locationIds);
|
||||
|
||||
List<AppLocation> selectFreeLoc();
|
||||
|
||||
/**
|
||||
* 根据货位编码查询货位
|
||||
* @param locationId
|
||||
* @return
|
||||
*/
|
||||
AppLocation selectAppLocationByLocationId(String locationId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,4 +59,12 @@ public interface AppStandMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteAppStandByStandIds(String[] standIds);
|
||||
|
||||
/**
|
||||
* 根据编码获取站点
|
||||
*
|
||||
* @param standCode
|
||||
* @return
|
||||
*/
|
||||
AppStand selectAppStandByStandCode(String standCode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,4 +58,12 @@ public interface AppStorageMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteAppStorageByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据仓库id查询仓库
|
||||
*
|
||||
* @param storageId
|
||||
* @return
|
||||
*/
|
||||
AppStorage selectAppStorageByStorageId(String storageId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,13 @@ public interface IAppGoodsService
|
|||
* @param goodsId 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public AppGoods selectAppGoodsById(String goodsId);
|
||||
/**
|
||||
* 根据物料编码查询物料
|
||||
*
|
||||
* @param goodsId 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public AppGoods selectAppGoodsByGoodsId(String goodsId);
|
||||
|
||||
/**
|
||||
|
|
@ -50,7 +57,7 @@ public interface IAppGoodsService
|
|||
* @param goodsIds 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppGoodsByGoodsIds(String[] goodsIds);
|
||||
public int deleteAppGoodsByIds(String[] goodsIds);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
|
|
@ -58,11 +65,20 @@ public interface IAppGoodsService
|
|||
* @param goodsId 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppGoodsByGoodsId(String goodsId);
|
||||
public int deleteAppGoodsById(String goodsId);
|
||||
|
||||
/**
|
||||
* 批量修改物料启用禁用状态
|
||||
* @param goodsIds
|
||||
*/
|
||||
void changeGoodsIsEnableStatus(String[] goodsIds);
|
||||
|
||||
/**
|
||||
* 物料导入
|
||||
*
|
||||
* @param appGoodsList
|
||||
* @param updateSupport
|
||||
* @return
|
||||
*/
|
||||
String importGoods(List<AppGoods> appGoodsList, boolean updateSupport);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public interface IAppLocationService {
|
|||
* @param locationId 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
AppLocation selectAppLocationByLocationId(String locationId);
|
||||
AppLocation selectAppLocationById(String locationId);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
|
|
@ -58,7 +58,7 @@ public interface IAppLocationService {
|
|||
* @param locationIds 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteAppLocationByLocationIds(String[] locationIds);
|
||||
int deleteAppLocationByIds(String[] locationIds);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
|
|
@ -66,7 +66,7 @@ public interface IAppLocationService {
|
|||
* @param locationId 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteAppLocationByLocationId(String locationId);
|
||||
int deleteAppLocationById(String locationId);
|
||||
|
||||
/**
|
||||
* 请求库位
|
||||
|
|
@ -89,4 +89,20 @@ public interface IAppLocationService {
|
|||
void changeIsEnableStatus(String[] locationIds);
|
||||
|
||||
List<AppLocation> selectFreeLoc();
|
||||
|
||||
/**
|
||||
* 根据库位编码查询库位
|
||||
*
|
||||
* @param locId
|
||||
* @return
|
||||
*/
|
||||
AppLocation selectAppLocationByLocationId(String locId);
|
||||
|
||||
/**
|
||||
* 库位导入
|
||||
* @param locationList
|
||||
* @param updateSupport
|
||||
* @return
|
||||
*/
|
||||
String importLocation(List<AppLocation> locationList, boolean updateSupport);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,14 @@ public interface IAppStandService
|
|||
*/
|
||||
public AppStand selectAppStandByStandId(String standId);
|
||||
|
||||
/**
|
||||
* 根据编码获取站点
|
||||
*
|
||||
* @param standCode
|
||||
* @return
|
||||
*/
|
||||
AppStand selectAppStandByStandCode(String standCode);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -58,4 +58,12 @@ public interface IAppStorageService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteAppStorageById(Long id);
|
||||
|
||||
/**
|
||||
* 根据仓库编码查询仓库
|
||||
*
|
||||
* @param storageId
|
||||
* @return
|
||||
*/
|
||||
AppStorage selectAppStorageByStorageId(String storageId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,14 @@ public interface IAppVehicleService {
|
|||
*/
|
||||
public AppVehicle selectAppVehicleByVehicleId(String vehicleId);
|
||||
|
||||
/**
|
||||
* 根据容器编码查询容器
|
||||
*
|
||||
* @param vehicleCode
|
||||
* @return
|
||||
*/
|
||||
AppVehicle selectAppVehicleByVehicleCode(String vehicleCode);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -4,9 +4,14 @@ import java.util.List;
|
|||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.app.domain.AppGoods;
|
||||
import com.ruoyi.app.domain.AppLocation;
|
||||
import com.ruoyi.app.mapper.AppGoodsMapper;
|
||||
import com.ruoyi.app.service.IAppGoodsService;
|
||||
import com.ruoyi.common.constant.AppConstants;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -17,8 +22,8 @@ import org.springframework.stereotype.Service;
|
|||
* @date 2025-01-15
|
||||
*/
|
||||
@Service
|
||||
public class AppGoodsServiceImpl implements IAppGoodsService
|
||||
{
|
||||
public class AppGoodsServiceImpl implements IAppGoodsService {
|
||||
private static final Logger log = LoggerFactory.getLogger(AppGoodsServiceImpl.class);
|
||||
@Autowired
|
||||
private AppGoodsMapper appGoodsMapper;
|
||||
|
||||
|
|
@ -29,11 +34,15 @@ public class AppGoodsServiceImpl implements IAppGoodsService
|
|||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public AppGoods selectAppGoodsByGoodsId(String goodsId)
|
||||
public AppGoods selectAppGoodsById(String goodsId)
|
||||
{
|
||||
return appGoodsMapper.selectAppGoodsByGoodsId(goodsId);
|
||||
return appGoodsMapper.selectAppGoodsById(goodsId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppGoods selectAppGoodsByGoodsId(String goodsId) {
|
||||
return appGoodsMapper.selectAppGoodsByGoodsId(goodsId);
|
||||
}
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
|
|
@ -77,9 +86,9 @@ public class AppGoodsServiceImpl implements IAppGoodsService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppGoodsByGoodsIds(String[] goodsIds)
|
||||
public int deleteAppGoodsByIds(String[] goodsIds)
|
||||
{
|
||||
return appGoodsMapper.deleteAppGoodsByGoodsIds(goodsIds);
|
||||
return appGoodsMapper.deleteAppGoodsByIds(goodsIds);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -89,14 +98,14 @@ public class AppGoodsServiceImpl implements IAppGoodsService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppGoodsByGoodsId(String goodsId)
|
||||
public int deleteAppGoodsById(String goodsId)
|
||||
{
|
||||
return appGoodsMapper.deleteAppGoodsByGoodsId(goodsId);
|
||||
return appGoodsMapper.deleteAppGoodsById(goodsId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeGoodsIsEnableStatus(String[] goodsIds) {
|
||||
List<AppGoods> appGoodsList = appGoodsMapper.selectAppGoodsListByGoodsIds(goodsIds);
|
||||
List<AppGoods> appGoodsList = appGoodsMapper.selectAppGoodsListByIds(goodsIds);
|
||||
if (CollectionUtil.isNotEmpty(appGoodsList)) {
|
||||
appGoodsList.forEach(appGoods -> {
|
||||
Long oldIsEnabled = appGoods.getGoodsStatus();
|
||||
|
|
@ -109,4 +118,45 @@ public class AppGoodsServiceImpl implements IAppGoodsService
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String importGoods(List<AppGoods> appGoodsList, boolean isUpdateSupport) {
|
||||
if (CollectionUtil.isEmpty(appGoodsList)) {
|
||||
throw new ServiceException("导入库位数据不能为空!");
|
||||
}
|
||||
int successNum = 0;
|
||||
int failureNum = 0;
|
||||
StringBuilder successMsg = new StringBuilder();
|
||||
StringBuilder failureMsg = new StringBuilder();
|
||||
for (AppGoods appGoods : appGoodsList) {
|
||||
try {
|
||||
// 验证是否存在这个物料编码
|
||||
AppGoods u = appGoodsMapper.selectAppGoodsByGoodsId(appGoods.getGoodsId());
|
||||
if (StringUtils.isNull(u)) {
|
||||
appGoodsMapper.insertAppGoods(appGoods);
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、物料 " + appGoods.getGoodsId() + " 导入成功");
|
||||
} else if (isUpdateSupport) {
|
||||
appGoodsMapper.updateAppGoods(appGoods);
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、物料 " + appGoods.getGoodsId() + " 更新成功");
|
||||
} else {
|
||||
failureNum++;
|
||||
failureMsg.append("<br/>" + failureNum + "、物料 " + appGoods.getGoodsId() + " 已存在");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
failureNum++;
|
||||
String msg = "<br/>" + failureNum + "、物料 " + appGoods.getGoodsId() + " 导入失败:";
|
||||
failureMsg.append(msg + e.getMessage());
|
||||
log.error(msg, e);
|
||||
}
|
||||
}
|
||||
if (failureNum > 0) {
|
||||
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||
throw new ServiceException(failureMsg.toString());
|
||||
} else {
|
||||
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
||||
}
|
||||
return successMsg.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@ import com.ruoyi.app.domain.AppLocation;
|
|||
import com.ruoyi.app.mapper.AppLocationMapper;
|
||||
import com.ruoyi.app.service.IAppLocationService;
|
||||
import com.ruoyi.common.constant.AppConstants;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -24,6 +28,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
*/
|
||||
@Service
|
||||
public class AppLocationServiceImpl implements IAppLocationService {
|
||||
private static final Logger log = LoggerFactory.getLogger(AppLocationServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private AppLocationMapper appLocationMapper;
|
||||
|
||||
|
|
@ -34,8 +40,8 @@ public class AppLocationServiceImpl implements IAppLocationService {
|
|||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public AppLocation selectAppLocationByLocationId(String locationId) {
|
||||
return appLocationMapper.selectAppLocationByLocationId(locationId);
|
||||
public AppLocation selectAppLocationById(String locationId) {
|
||||
return appLocationMapper.selectAppLocationById(locationId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -92,8 +98,8 @@ public class AppLocationServiceImpl implements IAppLocationService {
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppLocationByLocationIds(String[] locationIds) {
|
||||
return appLocationMapper.deleteAppLocationByLocationIds(locationIds);
|
||||
public int deleteAppLocationByIds(String[] locationIds) {
|
||||
return appLocationMapper.deleteAppLocationByIds(locationIds);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -103,8 +109,8 @@ public class AppLocationServiceImpl implements IAppLocationService {
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppLocationByLocationId(String locationId) {
|
||||
return appLocationMapper.deleteAppLocationByLocationId(locationId);
|
||||
public int deleteAppLocationById(String locationId) {
|
||||
return appLocationMapper.deleteAppLocationById(locationId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -227,7 +233,7 @@ public class AppLocationServiceImpl implements IAppLocationService {
|
|||
|
||||
@Override
|
||||
public void changeIsEnableStatus(String[] locationIds) {
|
||||
List<AppLocation> appLocationList = appLocationMapper.selectAppLocationListByLocationIds(locationIds);
|
||||
List<AppLocation> appLocationList = appLocationMapper.selectAppLocationListByIds(locationIds);
|
||||
if (CollectionUtil.isNotEmpty(appLocationList)) {
|
||||
appLocationList.forEach(appLocation -> {
|
||||
Integer oldIsEnabled = appLocation.getIsEnable();
|
||||
|
|
@ -245,4 +251,50 @@ public class AppLocationServiceImpl implements IAppLocationService {
|
|||
public List<AppLocation> selectFreeLoc() {
|
||||
return appLocationMapper.selectFreeLoc();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppLocation selectAppLocationByLocationId(String locationId) {
|
||||
return appLocationMapper.selectAppLocationByLocationId(locationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String importLocation(List<AppLocation> locationList, boolean isUpdateSupport) {
|
||||
if (CollectionUtil.isEmpty(locationList)) {
|
||||
throw new ServiceException("导入库位数据不能为空!");
|
||||
}
|
||||
int successNum = 0;
|
||||
int failureNum = 0;
|
||||
StringBuilder successMsg = new StringBuilder();
|
||||
StringBuilder failureMsg = new StringBuilder();
|
||||
for (AppLocation appLocation : locationList) {
|
||||
try {
|
||||
// 验证是否存在这个容器编码
|
||||
AppLocation u = appLocationMapper.selectAppLocationByLocationId(appLocation.getLocationId());
|
||||
if (StringUtils.isNull(u)) {
|
||||
appLocationMapper.insertAppLocation(appLocation);
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、库位 " + appLocation.getLocationId() + " 导入成功");
|
||||
} else if (isUpdateSupport) {
|
||||
appLocationMapper.updateAppLocation(appLocation);
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、库位 " + appLocation.getLocationId() + " 更新成功");
|
||||
} else {
|
||||
failureNum++;
|
||||
failureMsg.append("<br/>" + failureNum + "、库位 " + appLocation.getLocationId() + " 已存在");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
failureNum++;
|
||||
String msg = "<br/>" + failureNum + "、库位 " + appLocation.getLocationId() + " 导入失败:";
|
||||
failureMsg.append(msg + e.getMessage());
|
||||
log.error(msg, e);
|
||||
}
|
||||
}
|
||||
if (failureNum > 0) {
|
||||
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||
throw new ServiceException(failureMsg.toString());
|
||||
} else {
|
||||
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
||||
}
|
||||
return successMsg.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ public class AppStandServiceImpl implements IAppStandService
|
|||
return appStandMapper.selectAppStandByStandId(standId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppStand selectAppStandByStandCode(String standCode) {
|
||||
return appStandMapper.selectAppStandByStandCode(standCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -32,6 +32,12 @@ public class AppStorageServiceImpl implements IAppStorageService
|
|||
return appStorageMapper.selectAppStorageById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AppStorage selectAppStorageByStorageId(String storageId) {
|
||||
return appStorageMapper.selectAppStorageByStorageId(storageId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询仓库列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -41,6 +41,11 @@ public class AppVehicleServiceImpl implements IAppVehicleService {
|
|||
return appVehicleMapper.selectAppVehicleByVehicleId(vehicleId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AppVehicle selectAppVehicleByVehicleCode(String vehicleCode) {
|
||||
return appVehicleMapper.selectAppVehicleByVehicleCode(vehicleCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
|
|
@ -136,11 +141,11 @@ public class AppVehicleServiceImpl implements IAppVehicleService {
|
|||
if (StringUtils.isNull(u)) {
|
||||
appVehicleMapper.insertAppVehicle(appVehicle);
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、账号 " + appVehicle.getVehicleCode() + " 导入成功");
|
||||
successMsg.append("<br/>" + successNum + "、容器 " + appVehicle.getVehicleCode() + " 导入成功");
|
||||
} else if (isUpdateSupport) {
|
||||
appVehicleMapper.updateAppVehicle(appVehicle);
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、账号 " + appVehicle.getVehicleCode() + " 更新成功");
|
||||
successMsg.append("<br/>" + successNum + "、容器 " + appVehicle.getVehicleCode() + " 更新成功");
|
||||
} else {
|
||||
failureNum++;
|
||||
failureMsg.append("<br/>" + failureNum + "、容器 " + appVehicle.getVehicleCode() + " 已存在");
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<select id="selectAppGoodsList" parameterType="AppGoods" resultMap="AppGoodsResult">
|
||||
<include refid="selectAppGoodsVo"/>
|
||||
<where>
|
||||
<if test="goodsId != null and goodsId != ''"> and goodsId like concat('%', #{goodsId}, '%')</if>
|
||||
<if test="goodsId != null and goodsId != ''"> and goods_id like concat('%', #{goodsId}, '%')</if>
|
||||
<if test="goodsName != null and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
|
||||
<if test="goodsUnit != null and goodsUnit != ''"> and goods_unit = #{goodsUnit}</if>
|
||||
<if test="goodsType != null and goodsType != ''"> and goods_type = #{goodsType}</if>
|
||||
|
|
@ -35,11 +35,16 @@
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAppGoodsByGoodsId" parameterType="String" resultMap="AppGoodsResult">
|
||||
<select id="selectAppGoodsById" parameterType="String" resultMap="AppGoodsResult">
|
||||
<include refid="selectAppGoodsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectAppGoodsByGoodsId" parameterType="String" resultMap="AppGoodsResult">
|
||||
<include refid="selectAppGoodsVo"/>
|
||||
where goods_id = #{goodsId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAppGoods" parameterType="AppGoods">
|
||||
insert into app_goods
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -84,18 +89,18 @@
|
|||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAppGoodsByGoodsId" parameterType="String">
|
||||
<delete id="deleteAppGoodsById" parameterType="String">
|
||||
delete from app_goods where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAppGoodsByGoodsIds" parameterType="String">
|
||||
<delete id="deleteAppGoodsByIds" parameterType="String">
|
||||
delete from app_goods where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectAppGoodsListByGoodsIds" parameterType="String" resultMap="AppGoodsResult">
|
||||
<select id="selectAppGoodsListByIds" parameterType="String" resultMap="AppGoodsResult">
|
||||
<include refid="selectAppGoodsVo"/>
|
||||
where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
<mapper namespace="com.ruoyi.app.mapper.AppLocationMapper">
|
||||
|
||||
<resultMap type="AppLocation" id="AppLocationResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="locationId" column="location_id"/>
|
||||
<result property="locationType" column="location_type"/>
|
||||
<result property="locationStatus" column="location_status"/>
|
||||
|
|
@ -24,7 +25,8 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectAppLocationVo">
|
||||
select location_id,
|
||||
select id,
|
||||
location_id,
|
||||
location_type,
|
||||
location_status,
|
||||
outer_id,
|
||||
|
|
@ -46,6 +48,7 @@
|
|||
<select id="selectAppLocationList" parameterType="AppLocation" resultMap="AppLocationResult">
|
||||
<include refid="selectAppLocationVo"/>
|
||||
<where>
|
||||
<if test="locationId != null ">and location_id = #{locationId}</if>
|
||||
<if test="locationType != null ">and location_type = #{locationType}</if>
|
||||
<if test="locationStatus != null ">and location_status = #{locationStatus}</if>
|
||||
<if test="outerId != null and outerId != ''">and outer_id = #{outerId}</if>
|
||||
|
|
@ -63,6 +66,10 @@
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAppLocationById" parameterType="String" resultMap="AppLocationResult">
|
||||
<include refid="selectAppLocationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectAppLocationByLocationId" parameterType="String" resultMap="AppLocationResult">
|
||||
<include refid="selectAppLocationVo"/>
|
||||
where location_id = #{locationId}
|
||||
|
|
@ -86,6 +93,7 @@
|
|||
<insert id="insertAppLocation" parameterType="AppLocation">
|
||||
insert into app_location
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="locationId != null">location_id,</if>
|
||||
<if test="locationType != null">location_type,</if>
|
||||
<if test="locationStatus != null">location_status,</if>
|
||||
|
|
@ -104,6 +112,7 @@
|
|||
<if test="isEnable != null">is_enable,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="locationId != null">#{locationId},</if>
|
||||
<if test="locationType != null">#{locationType},</if>
|
||||
<if test="locationStatus != null">#{locationStatus},</if>
|
||||
|
|
@ -128,6 +137,7 @@
|
|||
insert into app_location
|
||||
(
|
||||
<trim prefixOverrides="," suffixOverrides=",">
|
||||
<if test="location.id != null">id,</if>
|
||||
<if test="location.locationId != null">location_id,</if>
|
||||
<if test="location.locationType != null">location_type,</if>
|
||||
<if test="location.locationStatus != null">location_status,</if>
|
||||
|
|
@ -149,6 +159,7 @@
|
|||
values
|
||||
(
|
||||
<trim prefixOverrides="," suffixOverrides=",">
|
||||
<if test="location.id != null">#{location.id},</if>
|
||||
<if test="location.locationId != null">#{location.locationId},</if>
|
||||
<if test="location.locationType != null">#{location.locationType},</if>
|
||||
<if test="location.locationStatus != null">#{location.locationStatus},</if>
|
||||
|
|
@ -173,6 +184,7 @@
|
|||
<update id="updateAppLocation" parameterType="AppLocation">
|
||||
update app_location
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="locationId != null">location_id = #{locationId},</if>
|
||||
<if test="locationType != null">location_type = #{locationType},</if>
|
||||
<if test="locationStatus != null">location_status = #{locationStatus},</if>
|
||||
<if test="outerId != null">outer_id = #{outerId},</if>
|
||||
|
|
@ -189,27 +201,27 @@
|
|||
<if test="isWorking != null">is_working = #{isWorking},</if>
|
||||
<if test="isEnable != null">is_enable = #{isEnable},</if>
|
||||
</trim>
|
||||
where location_id = #{locationId}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAppLocationByLocationId" parameterType="String">
|
||||
<delete id="deleteAppLocationById" parameterType="String">
|
||||
delete
|
||||
from app_location
|
||||
where location_id = #{locationId}
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAppLocationByLocationIds" parameterType="String">
|
||||
delete from app_location where location_id in
|
||||
<foreach item="locationId" collection="array" open="(" separator="," close=")">
|
||||
#{locationId}
|
||||
<delete id="deleteAppLocationByIds" parameterType="Long">
|
||||
delete from app_location where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectAppLocationListByLocationIds" parameterType="String" resultMap="AppLocationResult">
|
||||
<select id="selectAppLocationListByIds" parameterType="String" resultMap="AppLocationResult">
|
||||
<include refid="selectAppLocationVo"/>
|
||||
where location_id in
|
||||
<foreach item="locationId" collection="array" open="(" separator="," close=")">
|
||||
#{locationId}
|
||||
where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -37,6 +37,10 @@
|
|||
<include refid="selectAppStandVo"/>
|
||||
where stand_id = #{standId}
|
||||
</select>
|
||||
<select id="selectAppStandByStandCode" parameterType="String" resultMap="AppStandResult">
|
||||
<include refid="selectAppStandVo"/>
|
||||
where stand_code = #{standCode}
|
||||
</select>
|
||||
|
||||
<insert id="insertAppStand" parameterType="AppStand">
|
||||
insert into app_stand
|
||||
|
|
|
|||
|
|
@ -51,6 +51,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectAppStorageByStorageId" parameterType="String" resultMap="AppStorageResult">
|
||||
<include refid="selectAppStorageVo"/>
|
||||
where storage_id = #{storageId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAppStorage" parameterType="AppStorage" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into app_storage
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user