库位 站台 载具功能更新

This commit is contained in:
15066119699 2025-03-05 15:25:21 +08:00
parent 37e4d13857
commit 1fc726f845
14 changed files with 182 additions and 60 deletions

View File

@ -38,8 +38,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
@Api("库位管理")
@RestController
@RequestMapping("/app/location")
public class AppLocationController extends BaseController
{
public class AppLocationController extends BaseController {
@Autowired
private IAppLocationService appLocationService;
@ -49,8 +48,7 @@ public class AppLocationController extends BaseController
@PreAuthorize("@ss.hasPermi('system:location:list')")
@GetMapping("/list")
@EnhanceDataList(entityType = AppLocation.class)
public TableDataInfo list(AppLocation appLocation)
{
public TableDataInfo list(AppLocation appLocation) {
startPage();
List<AppLocation> list = appLocationService.selectAppLocationList(appLocation);
return getDataTable(list);
@ -62,8 +60,7 @@ public class AppLocationController extends BaseController
@PreAuthorize("@ss.hasPermi('system:location:export')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, AppLocation appLocation)
{
public void export(HttpServletResponse response, AppLocation appLocation) {
List<AppLocation> list = appLocationService.selectAppLocationList(appLocation);
ExcelUtil<AppLocation> util = new ExcelUtil<AppLocation>(AppLocation.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
@ -74,8 +71,7 @@ public class AppLocationController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('system:location:query')")
@GetMapping(value = "/{locationId}")
public AjaxResult getInfo(@PathVariable("locationId") String locationId)
{
public AjaxResult getInfo(@PathVariable("locationId") String locationId) {
return success(appLocationService.selectAppLocationByLocationId(locationId));
}
@ -85,8 +81,7 @@ public class AppLocationController extends BaseController
@PreAuthorize("@ss.hasPermi('system:location:add')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody AppLocation appLocation)
{
public AjaxResult add(@RequestBody AppLocation appLocation) {
return toAjax(appLocationService.insertAppLocation(appLocation));
}
@ -96,8 +91,7 @@ public class AppLocationController extends BaseController
@PreAuthorize("@ss.hasPermi('system:location:edit')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody AppLocation appLocation)
{
public AjaxResult edit(@RequestBody AppLocation appLocation) {
return toAjax(appLocationService.updateAppLocation(appLocation));
}
@ -107,8 +101,7 @@ public class AppLocationController extends BaseController
@PreAuthorize("@ss.hasPermi('system:location:remove')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{locationIds}")
public AjaxResult remove(@PathVariable String[] locationIds)
{
public AjaxResult remove(@PathVariable String[] locationIds) {
return toAjax(appLocationService.deleteAppLocationByLocationIds(locationIds));
}
@ -119,8 +112,7 @@ public class AppLocationController extends BaseController
// @PreAuthorize("@ss.hasPermi('system:location:query')")
@GetMapping(value = "/genLocations/{areaId}")
@Anonymous
public AjaxResult genLocations(@PathVariable("areaId") Integer areaId)
{
public AjaxResult genLocations(@PathVariable("areaId") Integer areaId) {
if (areaId == null) {
return error("库区必填。");
}
@ -214,4 +206,15 @@ public class AppLocationController extends BaseController
public AjaxResult count() {
return success(appLocationService.countAvailable());
}
/**
* 禁用启用状态
*/
@PreAuthorize("@ss.hasPermi('system:location:edit')")
@Log(title = "禁用启用状态", businessType = BusinessType.UPDATE)
@PostMapping("/changeIsEnableStatus/{locationIds}")
public AjaxResult changeIsEnableStatus(@PathVariable String[] locationIds) {
appLocationService.changeIsEnableStatus(locationIds);
return success("修改状态成功");
}
}

View File

@ -99,6 +99,7 @@ public class AppPmsController extends BaseController {
if(orderOutRequests == null || orderOutRequests.isEmpty()) {
return error("请求数据为空。");
}
logger.info("Pms出库单请求{}", orderOutRequests);
int insertRow = 0;
// 判断请求数据完整性
for(PmsOrderOutRequest orderOutRequest : orderOutRequests) {
@ -125,8 +126,10 @@ public class AppPmsController extends BaseController {
appPmsOrderOut.setOrderStatus(0);
appPmsOrderOut.setCreateTime(new Date());
appPmsOrderOut.setUpdateTime(new Date());
appPmsOrderOut.setCreateBy("PMS出库接口");
insertRow += appPmsOrderOutService.insertAppPmsOrderOut(appPmsOrderOut);
}
return insertRow == orderOutRequests.size() ? success("success") : error("出库单保存失败");
}
}

View File

@ -32,8 +32,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
*/
@RestController
@RequestMapping("/app/stand")
public class AppStandController extends BaseController
{
public class AppStandController extends BaseController {
@Autowired
private IAppStandService appStandService;
@ -43,8 +42,7 @@ public class AppStandController extends BaseController
@PreAuthorize("@ss.hasPermi('system:stand:list')")
@GetMapping("/list")
@EnhanceDataList(entityType = AppStand.class)
public TableDataInfo list(AppStand appStand)
{
public TableDataInfo list(AppStand appStand) {
startPage();
List<AppStand> list = appStandService.selectAppStandList(appStand);
return getDataTable(list);
@ -56,8 +54,7 @@ public class AppStandController extends BaseController
@PreAuthorize("@ss.hasPermi('system:stand:export')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, AppStand appStand)
{
public void export(HttpServletResponse response, AppStand appStand) {
List<AppStand> list = appStandService.selectAppStandList(appStand);
ExcelUtil<AppStand> util = new ExcelUtil<AppStand>(AppStand.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
@ -68,8 +65,7 @@ public class AppStandController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('system:stand:query')")
@GetMapping(value = "/{standId}")
public AjaxResult getInfo(@PathVariable("standId") String standId)
{
public AjaxResult getInfo(@PathVariable("standId") String standId) {
return success(appStandService.selectAppStandByStandId(standId));
}
@ -79,8 +75,7 @@ public class AppStandController extends BaseController
@PreAuthorize("@ss.hasPermi('system:stand:add')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody AppStand appStand)
{
public AjaxResult add(@RequestBody AppStand appStand) {
return toAjax(appStandService.insertAppStand(appStand));
}
@ -90,8 +85,7 @@ public class AppStandController extends BaseController
@PreAuthorize("@ss.hasPermi('system:stand:edit')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody AppStand appStand)
{
public AjaxResult edit(@RequestBody AppStand appStand) {
return toAjax(appStandService.updateAppStand(appStand));
}
@ -101,8 +95,7 @@ public class AppStandController extends BaseController
@PreAuthorize("@ss.hasPermi('system:stand:remove')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{standIds}")
public AjaxResult remove(@PathVariable String[] standIds)
{
public AjaxResult remove(@PathVariable String[] standIds) {
return toAjax(appStandService.deleteAppStandByStandIds(standIds));
}
}

View File

@ -3,7 +3,6 @@ package com.ruoyi.web.controller.app;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.app.domain.AppTask;
import com.ruoyi.app.domain.AppVehicle;
import com.ruoyi.app.domain.DTO.AppAvailVehicle;
import com.ruoyi.app.service.IAppVehicleService;

View File

@ -0,0 +1,19 @@
package com.ruoyi.common.constant;
/**
* 通用常量信息
*
* @author ruoyi
*/
public class AppConstants {
/**
* 货位状态 0 启用 1 禁用
*/
public static final Integer APP_LOCATION_STATUS_ENABLE = 0;
/**
* 货位状态 0 启用 1 禁用
*/
public static final Integer APP_LOCATION_STATUS_DISABLE = 1;
}

View File

@ -35,10 +35,14 @@ public class AppLocation extends BaseEntity
@Excel(name = "备注")
private String remark;
/** 库位状态 1 空闲 2 有货 3 锁定 4 禁用*/
/** 库位状态 0 空闲 1 占用*/
@Excel(name = "库位状态")
private Integer locationStatus;
/** 库位状态 0 启用 1 禁用*/
@Excel(name = "启用状态", readConverterExp = "0=启用,1=禁用")
private Integer isEnable;
/** 库位类型 */
private Integer locationType;
@ -202,6 +206,14 @@ public class AppLocation extends BaseEntity
this.isWorking = isWorking;
}
public Integer getIsEnable() {
return isEnable;
}
public void setIsEnable(Integer isEnable) {
this.isEnable = isEnable;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -220,6 +232,7 @@ public class AppLocation extends BaseEntity
.append("vehicleId", getVehicleId())
.append("remark", getRemark())
.append("isWorking", getIsWorking())
.append("isEnable", getIsEnable())
.toString();
}
}

View File

@ -15,9 +15,12 @@ public class AppStand extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 站点编码 */
private Long standId;
/** 站点编码 */
@Excel(name = "站点编码")
private String standId;
private String standCode;
/** 站点名称 */
@Excel(name = "站点名称")
@ -46,12 +49,12 @@ public class AppStand extends BaseEntity
/** 是否锁定 */
private Long isLock;
public void setStandId(String standId)
public void setStandId(Long standId)
{
this.standId = standId;
}
public String getStandId()
public Long getStandId()
{
return standId;
}
@ -60,6 +63,14 @@ public class AppStand extends BaseEntity
this.standName = standName;
}
public String getStandCode() {
return standCode;
}
public void setStandCode(String standCode) {
this.standCode = standCode;
}
public String getStandName()
{
return standName;
@ -110,6 +121,16 @@ public class AppStand extends BaseEntity
return isLock;
}
@Override
public String getRemark() {
return remark;
}
@Override
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -18,16 +18,19 @@ public class AppVehicle extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 载具编码 */
@Excel(name = "载具编码")
private String vehicleId;
/** 容器id */
private Long vehicleId;
/** 载具类型 */
@Excel(name = "载具类型")
/** 容器编码 */
@Excel(name = "容器编码")
private String vehicleCode;
/** 容器类型 */
@Excel(name = "容器类型")
private String vehicleType;
/** 载具状态 */
@Excel(name = "载具状态")
/** 容器状态 0 空闲 1 占用 */
@Excel(name = "容器状态")
private Long vehicleStatus;
/** 备注 */
@ -37,7 +40,7 @@ public class AppVehicle extends BaseEntity
/** 库位号 */
private String locationId;
/** 是否空载具 */
/** 是否空容器 */
private Long isEmpty;
/** 是否锁定 */
@ -50,15 +53,24 @@ public class AppVehicle extends BaseEntity
/** 上次入库用户 */
private String lastInUser;
public void setVehicleId(String vehicleId)
public void setVehicleId(Long vehicleId)
{
this.vehicleId = vehicleId;
}
public String getVehicleId()
public Long getVehicleId()
{
return vehicleId;
}
public String getVehicleCode() {
return vehicleCode;
}
public void setVehicleCode(String vehicleCode) {
this.vehicleCode = vehicleCode;
}
public void setVehicleType(String vehicleType)
{
this.vehicleType = vehicleType;

View File

@ -69,4 +69,11 @@ public interface AppLocationMapper
int deleteAppLocationByLocationIds(String[] locationIds);
Map<String, Integer> countAvailableStock();
/**
* 根据id查询货位
* @param locationIds
* @return
*/
List<AppLocation> selectAppLocationListByLocationIds(String[] locationIds);
}

View File

@ -11,8 +11,7 @@ import java.util.Map;
* @author ruoyi
* @date 2025-01-14
*/
public interface IAppLocationService
{
public interface IAppLocationService {
/**
* 查询请填写功能名称
*
@ -39,6 +38,7 @@ public interface IAppLocationService
/**
* 批量保存数据
*
* @param appLocationList 数据列表
* @return 结果
*/
@ -70,6 +70,7 @@ public interface IAppLocationService
/**
* 请求库位
*
* @param equipmentId 设备号
* @return 库位
*/
@ -78,4 +79,12 @@ public interface IAppLocationService
String sendLocation();
Map<String, Integer> countAvailable();
/**
* 修改禁用启用状态
*
* @param locationIds
* @return
*/
void changeIsEnableStatus(String[] locationIds);
}

View File

@ -6,10 +6,12 @@ import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -124,10 +126,8 @@ public class AppLocationServiceImpl implements IAppLocationService {
AppLocation resultLocation = null;
// 可用库位列表
List<AppLocation> availableLocationList = appLocationList.stream().filter(item ->
item.getIsWorking() == 0 && item.getIsLock() == 0 && item.getLocationStatus() == 0)
.sorted(Comparator.comparingInt(AppLocation::getwDepth).reversed())
.sorted(Comparator.comparingInt(location -> location.getwCol() + location.getwLayer()))
.collect(Collectors.toList());
item.getIsWorking() == 0 && item.getIsLock() == 0 && item.getLocationStatus() == 0).sorted(Comparator
.comparingInt(AppLocation::getwCol).thenComparingInt(AppLocation::getwLayer).thenComparingInt(AppLocation::getwDepth)).collect(Collectors.toList());
// 排序
for (AppLocation appLocation : availableLocationList) {
if (appLocation.getIsWorking() == 1 || appLocation.getIsLock() == 1 || appLocation.getLocationStatus() == 1) {
@ -157,17 +157,17 @@ public class AppLocationServiceImpl implements IAppLocationService {
List<AppLocation> collect1 = appLocations.stream().filter(l -> l.getwDepth().equals(1)).collect(Collectors.toList());
//定义库位
String locationId = null;
if(ObjectUtil.isNotEmpty(collect)){
locationId = collect.get(0).getLocationId();
}else{
locationId =collect1.get(0).getLocationId();
if (ObjectUtil.isNotEmpty(collect)) {
locationId = collect.get(0).getLocationId();
} else {
locationId = collect1.get(0).getLocationId();
}
AppLocation location = new AppLocation();
location.setLocationId(locationId);
location.setLocationStatus(1);
//更新库位为任务中
int i = appLocationMapper.updateAppLocation(location);
if(i == 0 ){
if (i == 0) {
throw new RuntimeException("库位更新失败");
}
return locationId;
@ -224,4 +224,20 @@ public class AppLocationServiceImpl implements IAppLocationService {
public Map<String, Integer> countAvailable() {
return appLocationMapper.countAvailableStock();
}
@Override
public void changeIsEnableStatus(String[] locationIds) {
List<AppLocation> appLocationList = appLocationMapper.selectAppLocationListByLocationIds(locationIds);
if (CollectionUtil.isNotEmpty(appLocationList)) {
appLocationList.forEach(appLocation -> {
Integer oldIsEnabled = appLocation.getIsEnable();
if (AppConstants.APP_LOCATION_STATUS_ENABLE.equals(oldIsEnabled)) {
appLocation.setIsEnable(AppConstants.APP_LOCATION_STATUS_DISABLE);
}else if (AppConstants.APP_LOCATION_STATUS_DISABLE.equals(oldIsEnabled)) {
appLocation.setIsEnable(AppConstants.APP_LOCATION_STATUS_ENABLE);
}
appLocationMapper.updateAppLocation(appLocation);
});
}
}
}

View File

@ -20,6 +20,7 @@
<result property="vehicleId" column="vehicle_id"/>
<result property="remark" column="remark"/>
<result property="isWorking" column="is_working"/>
<result property="isEnable" column="is_enable"/>
</resultMap>
<sql id="selectAppLocationVo">
@ -37,7 +38,8 @@
is_lock,
vehicle_id,
remark,
is_working
is_working,
is_enable
from app_location
</sql>
@ -57,6 +59,7 @@
<if test="isLock != null ">and is_lock = #{isLock}</if>
<if test="vehicleId != null and vehicleId != ''">and vehicle_id = #{vehicleId}</if>
<if test="isWorking != null ">and is_working = #{isWorking}</if>
<if test="isEnable != null ">and is_enable = #{isEnable}</if>
</where>
</select>
@ -90,6 +93,7 @@
<if test="vehicleId != null">vehicle_id,</if>
<if test="remark != null">remark,</if>
<if test="isWorking != null">is_working,</if>
<if test="isEnable != null">is_enable,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="locationId != null">#{locationId},</if>
@ -107,6 +111,7 @@
<if test="vehicleId != null">#{vehicleId},</if>
<if test="remark != null">#{remark},</if>
<if test="isWorking != null">#{isWorking},</if>
<if test="isEnable != null">#{isEnable},</if>
</trim>
</insert>
@ -130,6 +135,7 @@
<if test="location.vehicleId != null">vehicle_id,</if>
<if test="location.remark != null">remark,</if>
<if test="location.isWorking != null">is_working,</if>
<if test="location.isEnable != null">is_enable,</if>
</trim>
)
values
@ -150,6 +156,7 @@
<if test="location.vehicleId != null">#{location.vehicleId},</if>
<if test="location.remark != null">#{location.remark},</if>
<if test="location.isWorking != null">#{location.isWorking},</if>
<if test="location.isEnable != null">#{location.isEnable},</if>
</trim>
)
</foreach>
@ -172,6 +179,7 @@
<if test="vehicleId != null">vehicle_id = #{vehicleId},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="isWorking != null">is_working = #{isWorking},</if>
<if test="isEnable != null">is_enable = #{isEnable},</if>
</trim>
where location_id = #{locationId}
</update>
@ -188,4 +196,12 @@
#{locationId}
</foreach>
</delete>
<select id="selectAppLocationListByLocationIds" parameterType="String" resultMap="AppLocationResult">
<include refid="selectAppLocationVo"/>
where location_id in
<foreach item="locationId" collection="array" open="(" separator="," close=")">
#{locationId}
</foreach>
</select>
</mapper>

View File

@ -6,6 +6,7 @@
<resultMap type="AppStand" id="AppStandResult">
<result property="standId" column="stand_id" />
<result property="standCode" column="stand_code" />
<result property="standName" column="stand_name" />
<result property="standType" column="stand_type" />
<result property="standArea" column="stand_area" />
@ -16,12 +17,13 @@
</resultMap>
<sql id="selectAppStandVo">
select stand_id, stand_name, stand_type, stand_area, stand_property, stand_status, is_lock, remark from app_stand
select stand_id,stand_code, stand_name, stand_type, stand_area, stand_property, stand_status, is_lock, remark from app_stand
</sql>
<select id="selectAppStandList" parameterType="AppStand" resultMap="AppStandResult">
<include refid="selectAppStandVo"/>
<where>
<if test="standCode != null and standCode != ''"> and stand_code like concat('%', #{standCode}, '%')</if>
<if test="standName != null and standName != ''"> and stand_name like concat('%', #{standName}, '%')</if>
<if test="standType != null and standType != ''"> and stand_type = #{standType}</if>
<if test="standArea != null and standArea != ''"> and stand_area = #{standArea}</if>
@ -40,6 +42,7 @@
insert into app_stand
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="standId != null">stand_id,</if>
<if test="standCode != null and standCode != ''">stand_code,</if>
<if test="standName != null and standName != ''">stand_name,</if>
<if test="standType != null and standType != ''">stand_type,</if>
<if test="standArea != null and standArea != ''">stand_area,</if>
@ -50,6 +53,7 @@
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="standId != null">#{standId},</if>
<if test="standCode != null and standCode != ''">#{standCode},</if>
<if test="standName != null and standName != ''">#{standName},</if>
<if test="standType != null and standType != ''">#{standType},</if>
<if test="standArea != null and standArea != ''">#{standArea},</if>
@ -63,6 +67,7 @@
<update id="updateAppStand" parameterType="AppStand">
update app_stand
<trim prefix="SET" suffixOverrides=",">
<if test="standCode != null and standCode != ''">stand_code = #{standCode},</if>
<if test="standName != null and standName != ''">stand_name = #{standName},</if>
<if test="standType != null and standType != ''">stand_type = #{standType},</if>
<if test="standArea != null and standArea != ''">stand_area = #{standArea},</if>

View File

@ -6,6 +6,7 @@
<resultMap type="AppVehicle" id="AppVehicleResult">
<result property="vehicleId" column="vehicle_id" />
<result property="vehicleCode" column="vehicle_code" />
<result property="vehicleType" column="vehicle_type" />
<result property="vehicleStatus" column="vehicle_status" />
<result property="locationId" column="location_id" />
@ -18,6 +19,7 @@
<resultMap type="AppVehicleInfo" id="AppVehicleInfoResult">
<result property="vehicleId" column="vehicle_id" />
<result property="vehicleCode" column="vehicle_code" />
<result property="vehicleStatus" column="vehicle_status" />
<result property="locationId" column="location_id" />
<result property="isEmpty" column="is_empty" />
@ -25,13 +27,14 @@
</resultMap>
<sql id="selectAppVehicleVo">
select vehicle_id, vehicle_type, vehicle_status, location_id, is_empty, is_lock, last_in_time, last_in_user, remark from app_vehicle
select vehicle_id, vehicle_code, vehicle_type, vehicle_status, location_id, is_empty, is_lock, last_in_time, last_in_user, remark from app_vehicle
</sql>
<select id="selectAppVehicleList" parameterType="AppVehicle" resultMap="AppVehicleResult">
<include refid="selectAppVehicleVo"/>
<where>
<if test="vehicleType != null and vehicleType != ''"> and vehicle_type = #{vehicleType}</if>
<if test="vehicleCode != null and vehicleCode != ''"> and vehicle_code = #{vehicleCode}</if>
<if test="vehicleStatus != null "> and vehicle_status = #{vehicleStatus}</if>
<if test="locationId != null and locationId != ''"> and location_id = #{locationId}</if>
<if test="isEmpty != null "> and is_empty = #{isEmpty}</if>
@ -50,6 +53,7 @@
insert into app_vehicle
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="vehicleId != null">vehicle_id,</if>
<if test="vehicleCode != null">vehicle_code,</if>
<if test="vehicleType != null and vehicleType != ''">vehicle_type,</if>
<if test="vehicleStatus != null">vehicle_status,</if>
<if test="locationId != null">location_id,</if>
@ -61,6 +65,7 @@
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="vehicleId != null">#{vehicleId},</if>
<if test="vehicleCode != null">#{vehicleCode},</if>
<if test="vehicleType != null and vehicleType != ''">#{vehicleType},</if>
<if test="vehicleStatus != null">#{vehicleStatus},</if>
<if test="locationId != null">#{locationId},</if>
@ -75,6 +80,7 @@
<update id="updateAppVehicle" parameterType="AppVehicle">
update app_vehicle
<trim prefix="SET" suffixOverrides=",">
<if test="vehicleCode != null and vehicleCode != ''">vehicle_code = #{vehicleCode},</if>
<if test="vehicleType != null and vehicleType != ''">vehicle_type = #{vehicleType},</if>
<if test="vehicleStatus != null">vehicle_status = #{vehicleStatus},</if>
<if test="locationId != null">location_id = #{locationId},</if>
@ -99,6 +105,6 @@
</delete>
<select id="selectVehicleList" resultMap="AppVehicleInfoResult">
select vehicle_id, vehicle_status, is_empty, is_lock, location_id from app_vehicle
select vehicle_id,vehicle_code, vehicle_status, is_empty, is_lock, location_id from app_vehicle
</select>
</mapper>