装备设备库存修改(批量),增加驳回人驳回时间
This commit is contained in:
parent
1726130093
commit
c54c474627
|
|
@ -15,11 +15,13 @@ import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.bonus.common.core.constant.Constants.PAGE_NUM;
|
import static com.bonus.common.core.constant.Constants.PAGE_NUM;
|
||||||
import static com.bonus.common.core.constant.Constants.PAGE_SIZE;
|
import static com.bonus.common.core.constant.Constants.PAGE_SIZE;
|
||||||
|
|
||||||
|
|
@ -227,31 +229,6 @@ public class MaTypeController extends BaseController {
|
||||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, listByParentId));
|
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, listByParentId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据左列表类型id查询右表格
|
|
||||||
* @param typeId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
// @ApiOperation(value = "根据左列表类型id查询右表格")
|
|
||||||
// @GetMapping("/getListByMaType")
|
|
||||||
// public TableDataInfo getListByMaType(@RequestParam(required = false) Long typeId,
|
|
||||||
// @RequestParam(required = false) String typeName,
|
|
||||||
// @RequestParam(required = false) Integer pageSize,
|
|
||||||
// @RequestParam(required = false) Integer pageNum){
|
|
||||||
// if(typeId==null){
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
// List<MaType> listByMaType = iTypeService.getListByMaType(typeId, typeName);
|
|
||||||
// TableDataInfo rspData = new TableDataInfo();
|
|
||||||
// rspData.setTotal(listByMaType.size());
|
|
||||||
// rspData.setCode(HttpStatus.SUCCESS);
|
|
||||||
// // listByMaType = listByMaType.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
|
|
||||||
// rspData.setRows(listByMaType);
|
|
||||||
// rspData.setMsg("查询成功");
|
|
||||||
//
|
|
||||||
// return rspData;
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取机具类型管理ma_type详细信息
|
* 获取机具类型管理ma_type详细信息
|
||||||
*/
|
*/
|
||||||
|
|
@ -276,6 +253,20 @@ public class MaTypeController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "租赁价(批量)修改")
|
||||||
|
@PostMapping("/updateLeasePrice")
|
||||||
|
public AjaxResult updateLeasePrice(@RequestBody List<Integer> typeIds) {
|
||||||
|
if (typeIds.isEmpty()) {
|
||||||
|
return AjaxResult.error("请选择要修改的机具");
|
||||||
|
}
|
||||||
|
Integer i = iTypeService.updateLeasePrice(typeIds);
|
||||||
|
if (i > 0){
|
||||||
|
return AjaxResult.success("修改成功");
|
||||||
|
}else {
|
||||||
|
return AjaxResult.error("修改失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改机具类型管理ma_type
|
* 修改机具类型管理ma_type
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -84,4 +84,6 @@ public interface MaTypeMapper {
|
||||||
List<MaTypeKeeper> selectMaTypeByUserId(Long userId);
|
List<MaTypeKeeper> selectMaTypeByUserId(Long userId);
|
||||||
|
|
||||||
List<Integer> selectParentId(@Param("typeId")Long typeId, @Param("level")Integer level);
|
List<Integer> selectParentId(@Param("typeId")Long typeId, @Param("level")Integer level);
|
||||||
|
|
||||||
|
Integer updateLeasePrice(@Param("typeIds")List<Integer> typeIds);
|
||||||
}
|
}
|
||||||
|
|
@ -68,4 +68,5 @@ public interface ITypeService {
|
||||||
List<MaType> getEquipmentType(Long typeId, String typeName);
|
List<MaType> getEquipmentType(Long typeId, String typeName);
|
||||||
|
|
||||||
|
|
||||||
|
Integer updateLeasePrice(List<Integer> typeIds);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -371,6 +371,11 @@ public class MaTypeServiceImpl implements ITypeService {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer updateLeasePrice(List<Integer> typeIds) {
|
||||||
|
return maTypeMapper.updateLeasePrice(typeIds);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author dingjie
|
* @Author dingjie
|
||||||
* @Date 2023/12/14
|
* @Date 2023/12/14
|
||||||
|
|
|
||||||
|
|
@ -447,4 +447,11 @@
|
||||||
<update id="updateTypeNum">
|
<update id="updateTypeNum">
|
||||||
update ma_type set storage_num = IFNULL( storage_num, 0 ) + 1 where type_id = #{typeId}
|
update ma_type set storage_num = IFNULL( storage_num, 0 ) + 1 where type_id = #{typeId}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateLeasePrice">
|
||||||
|
update ma_type set lease_price = #{leasePrice} where type_id in
|
||||||
|
<foreach item="typeId" collection="typeIds" open="(" separator="," close=")">
|
||||||
|
#{typeId}
|
||||||
|
</foreach>
|
||||||
|
and del_flag = 0
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -54,8 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
,rent_over_time = now()
|
,rent_over_time = now()
|
||||||
</if>
|
</if>
|
||||||
<if test="orderStatus == 7">
|
<if test="orderStatus == 7">
|
||||||
,rent_over_user = #{userName}
|
,refuse_user = #{userName}
|
||||||
,rent_over_time = now()
|
,refuse_time = now()
|
||||||
</if>
|
</if>
|
||||||
where order_id = #{orderId}
|
where order_id = #{orderId}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue