|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.yxt.supervise.cyf.biz.materialinventoryrecord; |
|
|
|
|
|
|
|
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; |
|
|
@ -15,6 +16,8 @@ import com.yxt.supervise.cyf.api.materialinventoryrecord.MaterialInventoryRecord |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
/** |
|
|
|
* @author wangpengfei |
|
|
|
* @date 2023/5/4 14:37 |
|
|
@ -42,6 +45,9 @@ public class MaterialInventoryRecordService extends MybatisBaseService<MaterialI |
|
|
|
ResultBean rb=new ResultBean(); |
|
|
|
MaterialInventoryRecord entity=new MaterialInventoryRecord(); |
|
|
|
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("新增成功"); |
|
|
|
} |
|
|
|