2022-11-11面料管理修改

zhc4dev
YTD 2 years ago
parent 16a6112ecd
commit 9f1d2a6ed5
  1. 16
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/controller/ZyFabricController.java
  2. 4
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/mapper/ZyFabricMapper.java
  3. 2
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/service/IZyFabricService.java
  4. 5
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/service/impl/ZyFabricServiceImpl.java

@ -75,7 +75,21 @@ public class ZyFabricController extends JeecgController<ZyFabric, IZyFabricServi
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) throws IOException, WriterException {
QueryWrapper<ZyFabric> queryWrapper = QueryGenerator.initQueryWrapper(zyFabric, req.getParameterMap());
// QueryWrapper<ZyFabric> queryWrapper = QueryGenerator.initQueryWrapper(zyFabric, req.getParameterMap());
QueryWrapper queryWrapper = new QueryWrapper();
if(zyFabric.getTypeId()!=null&&!zyFabric.getTypeId().equals("")){
String s="%"+zyFabric.getTypeId()+"%";
zyFabric.setTypeId(null);
List<String> list= zyFabricService.findAllId(s);
queryWrapper.in("type_id",list);
}
if(zyFabric.getFabricNumber()!=null&&!zyFabric.getFabricNumber().equals("")){
queryWrapper.like("fabric_number",zyFabric.getFabricNumber());
}
if(zyFabric.getName()!=null&&!zyFabric.getName().equals("")){
queryWrapper.like("name",zyFabric.getName());
}
// QueryWrapper queryWrapper = new QueryWrapper();
Page<ZyFabric> page = new Page<>(pageNo, pageSize);
IPage<ZyFabric> pageList = zyFabricService.page(page, queryWrapper);

@ -3,6 +3,7 @@ package org.jeecg.modules.demo.fabric.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.fabric.entity.ZyFabric;
import org.jeecg.modules.demo.statistic.vo.StaticDayVo;
import org.jeecg.modules.demo.fabric.vo.WorkStationVo;
@ -49,4 +50,7 @@ public interface ZyFabricMapper extends BaseMapper<ZyFabric> {
//查出所有的工具统计信息:编号,库存和所在仓库
public List<StaticVo> findAllStaticTool();
@Select("select id from zy_fabric_type where content like #{s}")
List<String> findAllid(String s);
}

@ -68,4 +68,6 @@ public interface IZyFabricService extends IService<ZyFabric> {
//统计面辅料、工具、成衣的库存数量并标记存储位置
public StaticThreeVo staticThreeNum();
List<String> findAllId(String s);
}

@ -175,6 +175,11 @@ public class ZyFabricServiceImpl extends ServiceImpl<ZyFabricMapper, ZyFabric> i
return res;
}
@Override
public List<String> findAllId(String s) {
return zyFabricMapper.findAllid(s);
}
/**
* 逻辑单个货品的扫码出库旧的删掉对应的库存表中的库存减一生成新的二维码
* @param fabric

Loading…
Cancel
Save