入库出库
This commit is contained in:
@ -54,6 +54,7 @@ public class LngInventoryInVo extends com.xjrsoft.common.model.base.BaseModel{
|
|||||||
@ApiModelProperty("品种(缺省LNG)")
|
@ApiModelProperty("品种(缺省LNG)")
|
||||||
private String catCode;
|
private String catCode;
|
||||||
|
|
||||||
|
private String catName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购执行主键(type_code=CQ时选采购执行,带出船期计划、采购合同、供应商;ZN时空)
|
* 采购执行主键(type_code=CQ时选采购执行,带出船期计划、采购合同、供应商;ZN时空)
|
||||||
|
|||||||
@ -57,7 +57,7 @@ public class LngInventoryOutVo extends com.xjrsoft.common.model.base.BaseModel{
|
|||||||
@ApiModelProperty("品种")
|
@ApiModelProperty("品种")
|
||||||
private String catCode;
|
private String catCode;
|
||||||
|
|
||||||
|
private String catName;
|
||||||
/**
|
/**
|
||||||
* 销售合同主键(type_code=ZN时必须,其他空)
|
* 销售合同主键(type_code=ZN时必须,其他空)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -15,6 +15,8 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
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.model.result.R;
|
||||||
import com.xjrsoft.common.page.ConventPage;
|
import com.xjrsoft.common.page.ConventPage;
|
||||||
import com.xjrsoft.common.page.PageOutput;
|
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.entity.LngInventoryIn;
|
||||||
import com.xjrsoft.module.inventory.service.ILngInventoryInService;
|
import com.xjrsoft.module.inventory.service.ILngInventoryInService;
|
||||||
import com.xjrsoft.module.inventory.vo.LngInventoryInPageVo;
|
import com.xjrsoft.module.inventory.vo.LngInventoryInPageVo;
|
||||||
import com.xjrsoft.module.inventory.vo.LngInventoryInVo;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -89,7 +89,19 @@ public class LngInventoryInController {
|
|||||||
@ApiOperation(value = "新增LngInventoryIn")
|
@ApiOperation(value = "新增LngInventoryIn")
|
||||||
@SaCheckPermission("lngInventoryIn:add")
|
@SaCheckPermission("lngInventoryIn:add")
|
||||||
public R add(@Valid @RequestBody UpdateLngInventoryInDto dto){
|
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());
|
return R.ok(res.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,14 +109,38 @@ public class LngInventoryInController {
|
|||||||
@ApiOperation(value = "修改LngInventoryIn")
|
@ApiOperation(value = "修改LngInventoryIn")
|
||||||
@SaCheckPermission("lngInventoryIn:edit")
|
@SaCheckPermission("lngInventoryIn:edit")
|
||||||
public R update(@Valid @RequestBody UpdateLngInventoryInDto dto){
|
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
|
@DeleteMapping
|
||||||
@ApiOperation(value = "删除")
|
@ApiOperation(value = "删除")
|
||||||
@SaCheckPermission("lngInventoryIn:delete")
|
@SaCheckPermission("lngInventoryIn:delete")
|
||||||
public R delete(@Valid @RequestBody List<Long> ids){
|
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;
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,8 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
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.model.result.R;
|
||||||
import com.xjrsoft.common.page.ConventPage;
|
import com.xjrsoft.common.page.ConventPage;
|
||||||
import com.xjrsoft.common.page.PageOutput;
|
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.datalog.vo.DataChangeLogVo;
|
||||||
import com.xjrsoft.module.inventory.dto.LngInventoryOutPageDto;
|
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.dto.UpdateLngInventoryOutDto;
|
||||||
import com.xjrsoft.module.inventory.entity.LngInventoryOut;
|
import com.xjrsoft.module.inventory.entity.LngInventoryOut;
|
||||||
import com.xjrsoft.module.inventory.service.ILngInventoryOutService;
|
import com.xjrsoft.module.inventory.service.ILngInventoryOutService;
|
||||||
import com.xjrsoft.module.inventory.vo.LngInventoryOutPageVo;
|
import com.xjrsoft.module.inventory.vo.LngInventoryOutPageVo;
|
||||||
@ -86,7 +89,19 @@ public class LngInventoryOutController {
|
|||||||
@ApiOperation(value = "新增LngInventoryOut")
|
@ApiOperation(value = "新增LngInventoryOut")
|
||||||
@SaCheckPermission("lngInventoryOut:add")
|
@SaCheckPermission("lngInventoryOut:add")
|
||||||
public R add(@Valid @RequestBody UpdateLngInventoryOutDto dto){
|
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());
|
return R.ok(res.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,14 +109,38 @@ public class LngInventoryOutController {
|
|||||||
@ApiOperation(value = "修改LngInventoryOut")
|
@ApiOperation(value = "修改LngInventoryOut")
|
||||||
@SaCheckPermission("lngInventoryOut:edit")
|
@SaCheckPermission("lngInventoryOut:edit")
|
||||||
public R update(@Valid @RequestBody UpdateLngInventoryOutDto dto){
|
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
|
@DeleteMapping
|
||||||
@ApiOperation(value = "删除")
|
@ApiOperation(value = "删除")
|
||||||
@SaCheckPermission("lngInventoryOut:delete")
|
@SaCheckPermission("lngInventoryOut:delete")
|
||||||
public R delete(@Valid @RequestBody List<Long> ids){
|
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;
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,12 +21,13 @@ public interface LngInventoryInMapper extends BaseMapper<LngInventoryIn> {
|
|||||||
@Select("SELECT ii.*, dd_ii.name AS type_name, "+
|
@Select("SELECT ii.*, dd_ii.name AS type_name, "+
|
||||||
" opi.ss_no AS ssNo , sl.full_name AS staName , "+
|
" opi.ss_no AS ssNo , sl.full_name AS staName , "+
|
||||||
" k.k_name AS k_name ,"+
|
" 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 "+
|
" NVL(com.short_name,com.name) AS com_name "+
|
||||||
" FROM lng_inventory_in ii "+
|
" FROM lng_inventory_in ii "+
|
||||||
" LEFT JOIN lng_ops_pur_int opi ON opi.id=ii.ops_id "+
|
" 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_contract k ON k.id=ii.k_id "+
|
||||||
" LEFT JOIN lng_supplier su ON su.su_code=ii.su_code "+
|
" 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_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 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 "+
|
" LEFT JOIN lng_b_station_lng sl ON sl.code=ii.sta_code "+
|
||||||
|
|||||||
@ -20,11 +20,12 @@ public interface LngInventoryOutMapper extends BaseMapper<LngInventoryOut> {
|
|||||||
|
|
||||||
|
|
||||||
@Select("SELECT io.*, sl.full_name AS staName ,"+
|
@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 "+
|
" cu.cu_name as cuName ,NVL(com.short_name,com.name) AS com_name "+
|
||||||
" FROM lng_inventory_out io "+
|
" 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_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 lng_b_station_lng sl ON sl.code=io.sta_code "+
|
||||||
" LEFT JOIN xjr_department com ON com.id=io.com_id "+
|
" LEFT JOIN xjr_department com ON com.id=io.com_id "+
|
||||||
" WHERE io.id = #{id}")
|
" WHERE io.id = #{id}")
|
||||||
|
|||||||
Reference in New Issue
Block a user