8 changed files with 0 additions and 258 deletions
@ -1,23 +0,0 @@ |
|||||
package com.yxt.supervise.cyf.api.rawmaterialtype; |
|
||||
|
|
||||
import com.yxt.common.core.vo.Vo; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2023/5/4 14:29 |
|
||||
*/ |
|
||||
@Data |
|
||||
@ApiModel(value = "原料类型信息 视图数据对象", description = "原料入库信息 视图数据对象") |
|
||||
public class RawMaterialTypeVo implements Vo { |
|
||||
private String id; |
|
||||
private String sid; |
|
||||
|
|
||||
//原料编号
|
|
||||
private String number; |
|
||||
//原料名称
|
|
||||
private String name; |
|
||||
//原料code
|
|
||||
private String code; |
|
||||
} |
|
@ -1,30 +0,0 @@ |
|||||
package com.yxt.supervise.cyf.biz.rawmaterialinventory; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialinventory.RawMaterialInventory; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialinventory.RawMaterialInventoryVo; |
|
||||
import org.apache.ibatis.annotations.Mapper; |
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
import org.apache.ibatis.annotations.Select; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2023/5/4 14:37 |
|
||||
*/ |
|
||||
@Mapper |
|
||||
public interface RawMaterialInventoryMapper extends BaseMapper<RawMaterialInventory> { |
|
||||
IPage<RawMaterialInventoryVo> selectPageVo(IPage<RawMaterialInventory> page, @Param(Constants.WRAPPER) Wrapper<RawMaterialInventory> qw); |
|
||||
@Select(" SELECT" + |
|
||||
" *,t.name as typeName" + |
|
||||
" FROM" + |
|
||||
" raw_material_inventory r" + |
|
||||
" left join raw_material_type t on t.sid=r.typeSid ") |
|
||||
List<RawMaterialInventoryVo> inventoryList(); |
|
||||
@Select("select * from raw_material_inventory where sid=#{sid}") |
|
||||
RawMaterialInventory getInventoryBySid(@Param("sid")String sid); |
|
||||
} |
|
@ -1,23 +0,0 @@ |
|||||
package com.yxt.supervise.cyf.biz.rawmaterialinventoryrecord; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecord; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecordVo; |
|
||||
import org.apache.ibatis.annotations.Mapper; |
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
import org.apache.ibatis.annotations.Select; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2023/5/4 14:37 |
|
||||
*/ |
|
||||
@Mapper |
|
||||
public interface RawMaterialInventoryRecordMapper extends BaseMapper<RawMaterialInventoryRecord> { |
|
||||
IPage<RawMaterialInventoryRecordVo> selectPageVo(IPage<RawMaterialInventoryRecord> page, @Param(Constants.WRAPPER) Wrapper<RawMaterialInventoryRecord> qw); |
|
||||
|
|
||||
} |
|
@ -1,41 +0,0 @@ |
|||||
package com.yxt.supervise.cyf.biz.rawmaterialinventoryrecord; |
|
||||
|
|
||||
import com.yxt.common.core.query.PagerQuery; |
|
||||
import com.yxt.common.core.result.ResultBean; |
|
||||
import com.yxt.common.core.vo.PagerVo; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecordDto; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecordQuery; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecordVo; |
|
||||
import io.swagger.annotations.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2023/5/4 14:38 |
|
||||
*/ |
|
||||
@Api(tags = "盘库信息") |
|
||||
@RestController |
|
||||
@RequestMapping("cyf/rawrecord") |
|
||||
public class RawMaterialInventoryRecordRest { |
|
||||
@Autowired |
|
||||
RawMaterialInventoryRecordService RawMaterialInventoryRecordService; |
|
||||
|
|
||||
@ApiOperation("根据条件分页查询数据的列表") |
|
||||
@PostMapping("/listPage") |
|
||||
public ResultBean<PagerVo<RawMaterialInventoryRecordVo>> listPage(@RequestBody PagerQuery<RawMaterialInventoryRecordQuery> pq) { |
|
||||
ResultBean rb = ResultBean.fireFail(); |
|
||||
PagerVo<RawMaterialInventoryRecordVo> pv = RawMaterialInventoryRecordService.listPageVo(pq); |
|
||||
return rb.success().setData(pv); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation("新增") |
|
||||
@PostMapping("/save") |
|
||||
public ResultBean save (@RequestBody RawMaterialInventoryRecordDto dto){ |
|
||||
return RawMaterialInventoryRecordService.save(dto); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,54 +0,0 @@ |
|||||
package com.yxt.supervise.cyf.biz.rawmaterialinventoryrecord; |
|
||||
|
|
||||
import cn.hutool.core.bean.BeanUtil; |
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.yxt.common.base.service.MybatisBaseService; |
|
||||
import com.yxt.common.base.utils.PagerUtil; |
|
||||
import com.yxt.common.core.query.PagerQuery; |
|
||||
import com.yxt.common.core.result.ResultBean; |
|
||||
import com.yxt.common.core.vo.PagerVo; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecord; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecordDto; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecordQuery; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialinventoryrecord.RawMaterialInventoryRecordVo; |
|
||||
import org.apache.commons.lang3.StringUtils; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2023/5/4 14:37 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class RawMaterialInventoryRecordService extends MybatisBaseService<RawMaterialInventoryRecordMapper, RawMaterialInventoryRecord> { |
|
||||
|
|
||||
|
|
||||
public PagerVo<RawMaterialInventoryRecordVo> listPageVo(PagerQuery<RawMaterialInventoryRecordQuery> pq) { |
|
||||
RawMaterialInventoryRecordQuery query = pq.getParams(); |
|
||||
QueryWrapper<RawMaterialInventoryRecord> qw = new QueryWrapper<>(); |
|
||||
if (StringUtils.isNotBlank(query.getDate())) { |
|
||||
qw.eq("STR_TO_DATE(r.inventoryDate,'%Y-%m-%d')", query.getDate()); |
|
||||
} |
|
||||
if (StringUtils.isNotBlank(query.getName())) { |
|
||||
qw.like("i.name", query.getName()); |
|
||||
} |
|
||||
if (StringUtils.isNotBlank(query.getType())) { |
|
||||
qw.eq("r.type", query.getType()); |
|
||||
} |
|
||||
IPage<RawMaterialInventoryRecord> page = PagerUtil.queryToPage(pq); |
|
||||
IPage<RawMaterialInventoryRecordVo> pagging = baseMapper.selectPageVo(page, qw); |
|
||||
PagerVo<RawMaterialInventoryRecordVo> p = PagerUtil.pageToVo(pagging, null); |
|
||||
return p; |
|
||||
} |
|
||||
|
|
||||
public ResultBean save(RawMaterialInventoryRecordDto dto){ |
|
||||
ResultBean rb=new ResultBean(); |
|
||||
RawMaterialInventoryRecord entity=new RawMaterialInventoryRecord(); |
|
||||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|
||||
baseMapper.insert(entity); |
|
||||
return rb.success().setMsg("新增成功"); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,31 +0,0 @@ |
|||||
package com.yxt.supervise.cyf.biz.rawmaterialoutbound; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialoutbound.RawMaterialOutbound; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialoutbound.RawMaterialOutboundVo; |
|
||||
import org.apache.ibatis.annotations.Mapper; |
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
import org.apache.ibatis.annotations.Select; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2023/5/4 14:37 |
|
||||
*/ |
|
||||
@Mapper |
|
||||
public interface RawMaterialOutboundMapper extends BaseMapper<RawMaterialOutbound> { |
|
||||
IPage<RawMaterialOutboundVo> selectPageVo(IPage<RawMaterialOutbound> page, @Param(Constants.WRAPPER) Wrapper<RawMaterialOutbound> qw); |
|
||||
@Select(" SELECT" + |
|
||||
" *,t.name as typeName,i.inventory as inventory" + |
|
||||
" FROM" + |
|
||||
" raw_material_outbound o" + |
|
||||
" left join raw_material_inventory i on i.sid=o.inventorySid" + |
|
||||
" left join raw_material_type t on t.sid=i.typeSid") |
|
||||
List<RawMaterialOutboundVo> outboundList(); |
|
||||
@Select("select * from tank_information where sid=#{sid}") |
|
||||
RawMaterialOutbound getOutboundBySid(@Param("sid")String sid); |
|
||||
} |
|
@ -1,30 +0,0 @@ |
|||||
package com.yxt.supervise.cyf.biz.rawmaterialstorage; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialstorage.RawMaterialStorage; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialstorage.RawMaterialStorageVo; |
|
||||
import org.apache.ibatis.annotations.Mapper; |
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
import org.apache.ibatis.annotations.Select; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2023/5/4 14:37 |
|
||||
*/ |
|
||||
@Mapper |
|
||||
public interface RawMaterialStorageMapper extends BaseMapper<RawMaterialStorage> { |
|
||||
IPage<RawMaterialStorageVo> selectPageVo(IPage<RawMaterialStorage> page, @Param(Constants.WRAPPER) Wrapper<RawMaterialStorage> qw); |
|
||||
@Select(" *,t.name as typeName,i.inventory as inventory" + |
|
||||
" FROM" + |
|
||||
" raw_material_storage s" + |
|
||||
" left join raw_material_inventory i on i.sid=s.inventorySid" + |
|
||||
" left join raw_material_type t on t.sid=i.typeSid") |
|
||||
List<RawMaterialStorageVo> StorageList(); |
|
||||
@Select("select * from raw_material_storage where sid=#{sid}") |
|
||||
RawMaterialStorage getStorageBySid(@Param("sid")String sid); |
|
||||
} |
|
@ -1,26 +0,0 @@ |
|||||
package com.yxt.supervise.cyf.biz.rawmaterialtype; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialtype.RawMaterialType; |
|
||||
import com.yxt.supervise.cyf.api.rawmaterialtype.RawMaterialTypeVo; |
|
||||
import org.apache.ibatis.annotations.Mapper; |
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
import org.apache.ibatis.annotations.Select; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2023/5/4 14:37 |
|
||||
*/ |
|
||||
@Mapper |
|
||||
public interface RawMaterialTypeMapper extends BaseMapper<RawMaterialType> { |
|
||||
IPage<RawMaterialTypeVo> selectPageVo(IPage<RawMaterialType> page, @Param(Constants.WRAPPER) Wrapper<RawMaterialType> qw); |
|
||||
@Select("select * from raw_material_type") |
|
||||
List<RawMaterialTypeVo> typeList(); |
|
||||
@Select("select * from raw_material_type where sid=#{sid}") |
|
||||
RawMaterialType getTypeBySid(@Param("sid")String sid); |
|
||||
} |
|
Loading…
Reference in new issue