|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.yxt.supervise.cyf.biz.packaginginventoryrecord; |
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.yxt.common.base.service.MybatisBaseService; |
|
|
@ -8,13 +9,18 @@ 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.packaginginventory.PackagingInventory; |
|
|
|
import com.yxt.supervise.cyf.api.packaginginventoryrecord.PackagingInventoryRecord; |
|
|
|
import com.yxt.supervise.cyf.api.packaginginventoryrecord.PackagingInventoryRecordDto; |
|
|
|
import com.yxt.supervise.cyf.api.packaginginventoryrecord.PackagingInventoryRecordQuery; |
|
|
|
import com.yxt.supervise.cyf.api.packaginginventoryrecord.PackagingInventoryRecordVo; |
|
|
|
import com.yxt.supervise.cyf.biz.packaginginventory.PackagingInventoryService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
/** |
|
|
|
* @author wangpengfei |
|
|
|
* @date 2023/5/4 14:37 |
|
|
@ -22,6 +28,8 @@ import org.springframework.stereotype.Service; |
|
|
|
@Service |
|
|
|
public class PackagingInventoryRecordService extends MybatisBaseService<PackagingInventoryRecordMapper, PackagingInventoryRecord> { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
PackagingInventoryService packagingInventoryService; |
|
|
|
|
|
|
|
public PagerVo<PackagingInventoryRecordVo> listPageVo(PagerQuery<PackagingInventoryRecordQuery> pq) { |
|
|
|
PackagingInventoryRecordQuery query = pq.getParams(); |
|
|
@ -42,6 +50,9 @@ public class PackagingInventoryRecordService extends MybatisBaseService<Packagin |
|
|
|
ResultBean rb=new ResultBean(); |
|
|
|
PackagingInventoryRecord entity=new PackagingInventoryRecord(); |
|
|
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|
|
|
Date curDate = new Date(); |
|
|
|
String dfmt = DateUtil.format(curDate, "yyyy-MM-dd"); |
|
|
|
entity.setInventoryDate(dfmt); |
|
|
|
baseMapper.insert(entity); |
|
|
|
return rb.success().setMsg("新增成功"); |
|
|
|
} |
|
|
|