入库出库

This commit is contained in:
2026-03-20 14:03:34 +08:00
parent 173ff58639
commit d5a7dbb988
6 changed files with 90 additions and 12 deletions

View File

@ -15,6 +15,8 @@ import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.pictc.datalog.DataOperationContent;
import com.pictc.datalog.DataOperationListener;
import com.xjrsoft.common.model.result.R;
import com.xjrsoft.common.page.ConventPage;
import com.xjrsoft.common.page.PageOutput;
@ -26,10 +28,8 @@ import com.xjrsoft.module.inventory.dto.UpdateLngInventoryInDto;
import com.xjrsoft.module.inventory.entity.LngInventoryIn;
import com.xjrsoft.module.inventory.service.ILngInventoryInService;
import com.xjrsoft.module.inventory.vo.LngInventoryInPageVo;
import com.xjrsoft.module.inventory.vo.LngInventoryInVo;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -89,7 +89,19 @@ public class LngInventoryInController {
@ApiOperation(value = "新增LngInventoryIn")
@SaCheckPermission("lngInventoryIn:add")
public R add(@Valid @RequestBody UpdateLngInventoryInDto dto){
UpdateLngInventoryInDto res = dataService.insert(dto);
UpdateLngInventoryInDto res = dataService.insert(dto,new DataOperationListener<UpdateLngInventoryInDto>() {
@Override
public UpdateLngInventoryInDto before(DataOperationContent<UpdateLngInventoryInDto> content) {
return null;
}
@Override
public UpdateLngInventoryInDto after(DataOperationContent<UpdateLngInventoryInDto> content) {
return null;
}
});
return R.ok(res.getId());
}
@ -97,14 +109,38 @@ public class LngInventoryInController {
@ApiOperation(value = "修改LngInventoryIn")
@SaCheckPermission("lngInventoryIn:edit")
public R update(@Valid @RequestBody UpdateLngInventoryInDto dto){
return R.ok(dataService.updateById(dto));
return R.ok(dataService.updateById(dto,new DataOperationListener<UpdateLngInventoryInDto>() {
@Override
public UpdateLngInventoryInDto before(DataOperationContent<UpdateLngInventoryInDto> content) {
return null;
}
@Override
public UpdateLngInventoryInDto after(DataOperationContent<UpdateLngInventoryInDto> content) {
return null;
}
}));
}
@DeleteMapping
@ApiOperation(value = "删除")
@SaCheckPermission("lngInventoryIn:delete")
public R delete(@Valid @RequestBody List<Long> ids){
return R.ok(dataService.deleteByIds(UpdateLngInventoryInDto.class, ids));
return R.ok(dataService.deleteByIds(UpdateLngInventoryInDto.class, ids,new DataOperationListener<UpdateLngInventoryInDto>() {
@Override
public UpdateLngInventoryInDto before(DataOperationContent<UpdateLngInventoryInDto> content) {
return null;
}
@Override
public UpdateLngInventoryInDto after(DataOperationContent<UpdateLngInventoryInDto> content) {
return null;
}
}));
}

View File

@ -15,6 +15,8 @@ import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.pictc.datalog.DataOperationContent;
import com.pictc.datalog.DataOperationListener;
import com.xjrsoft.common.model.result.R;
import com.xjrsoft.common.page.ConventPage;
import com.xjrsoft.common.page.PageOutput;
@ -23,6 +25,7 @@ import com.xjrsoft.module.datalog.service.DatalogService;
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
import com.xjrsoft.module.inventory.dto.LngInventoryOutPageDto;
import com.xjrsoft.module.inventory.dto.UpdateLngInventoryOutDto;
import com.xjrsoft.module.inventory.dto.UpdateLngInventoryOutDto;
import com.xjrsoft.module.inventory.entity.LngInventoryOut;
import com.xjrsoft.module.inventory.service.ILngInventoryOutService;
import com.xjrsoft.module.inventory.vo.LngInventoryOutPageVo;
@ -86,7 +89,19 @@ public class LngInventoryOutController {
@ApiOperation(value = "新增LngInventoryOut")
@SaCheckPermission("lngInventoryOut:add")
public R add(@Valid @RequestBody UpdateLngInventoryOutDto dto){
UpdateLngInventoryOutDto res = dataService.insert(dto);
UpdateLngInventoryOutDto res = dataService.insert(dto,new DataOperationListener<UpdateLngInventoryOutDto>() {
@Override
public UpdateLngInventoryOutDto before(DataOperationContent<UpdateLngInventoryOutDto> content) {
return null;
}
@Override
public UpdateLngInventoryOutDto after(DataOperationContent<UpdateLngInventoryOutDto> content) {
return null;
}
});
return R.ok(res.getId());
}
@ -94,14 +109,38 @@ public class LngInventoryOutController {
@ApiOperation(value = "修改LngInventoryOut")
@SaCheckPermission("lngInventoryOut:edit")
public R update(@Valid @RequestBody UpdateLngInventoryOutDto dto){
return R.ok(dataService.updateById(dto));
return R.ok(dataService.updateById(dto,new DataOperationListener<UpdateLngInventoryOutDto>() {
@Override
public UpdateLngInventoryOutDto before(DataOperationContent<UpdateLngInventoryOutDto> content) {
return null;
}
@Override
public UpdateLngInventoryOutDto after(DataOperationContent<UpdateLngInventoryOutDto> content) {
return null;
}
}));
}
@DeleteMapping
@ApiOperation(value = "删除")
@SaCheckPermission("lngInventoryOut:delete")
public R delete(@Valid @RequestBody List<Long> ids){
return R.ok(dataService.deleteByIds(UpdateLngInventoryOutDto.class, ids));
return R.ok(dataService.deleteByIds(UpdateLngInventoryOutDto.class, ids,new DataOperationListener<UpdateLngInventoryOutDto>() {
@Override
public UpdateLngInventoryOutDto before(DataOperationContent<UpdateLngInventoryOutDto> content) {
return null;
}
@Override
public UpdateLngInventoryOutDto after(DataOperationContent<UpdateLngInventoryOutDto> content) {
return null;
}
}));
}

View File

@ -21,12 +21,13 @@ public interface LngInventoryInMapper extends BaseMapper<LngInventoryIn> {
@Select("SELECT ii.*, dd_ii.name AS type_name, "+
" opi.ss_no AS ssNo , sl.full_name AS staName , "+
" k.k_name AS k_name ,"+
" su.su_name AS su_name , "+
" su.su_name AS su_name ,bc.full_name as cat_name, "+
" NVL(com.short_name,com.name) AS com_name "+
" FROM lng_inventory_in ii "+
" LEFT JOIN lng_ops_pur_int opi ON opi.id=ii.ops_id "+
" LEFT JOIN lng_contract k ON k.id=ii.k_id "+
" LEFT JOIN lng_supplier su ON su.su_code=ii.su_code "+
" LEFT JOIN lng_b_category bc on bc.code=ii.cat_code "+
" LEFT JOIN xjr_dictionary_item di_ii on di_ii.code='LNG_INV_I' "+
" LEFT JOIN xjr_dictionary_detail dd_ii on dd_ii.item_id=di_ii.id AND dd_ii.code=ii.type_code "+
" LEFT JOIN lng_b_station_lng sl ON sl.code=ii.sta_code "+

View File

@ -20,11 +20,12 @@ public interface LngInventoryOutMapper extends BaseMapper<LngInventoryOut> {
@Select("SELECT io.*, sl.full_name AS staName ,"+
" k.k_name as kName , "+
" k.k_name as kName , bc.full_name as cat_name,"+
" cu.cu_name as cuName ,NVL(com.short_name,com.name) AS com_name "+
" FROM lng_inventory_out io "+
" LEFT JOIN lng_contract k ON k.id=io.k_id "+
" LEFT JOIN lng_contract k ON k.id=io.k_id"+
" LEFT JOIN lng_customer cu ON cu.cu_code=io.cu_code "+
" LEFT JOIN lng_b_category bc on bc.code=ii.cat_code "+
" LEFT JOIN lng_b_station_lng sl ON sl.code=io.sta_code "+
" LEFT JOIN xjr_department com ON com.id=io.com_id "+
" WHERE io.id = #{id}")