自动化立体仓库 - WMS系统
zyx
2024-01-14 25314b5ee613c48e7db31138d7fcb8abc4c536be
src/main/java/com/zy/asrs/controller/LocInPrintMatController.java
@@ -7,11 +7,14 @@
import com.baomidou.mybatisplus.plugins.Page;
import com.core.common.DateUtils;
import com.zy.asrs.entity.LocInPrintMat;
import com.zy.asrs.entity.Mat;
import com.zy.asrs.entity.MatPrint;
import com.zy.asrs.service.LocInPrintMatService;
import com.core.annotations.ManagerAuth;
import com.core.common.BaseRes;
import com.core.common.Cools;
import com.core.common.R;
import com.zy.common.CodeRes;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -41,6 +44,8 @@
        excludeTrash(param);
        convert(param, wrapper);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        wrapper.orderBy("status",true);
        wrapper.orderBy("create_time",false);
        return R.ok(locInPrintMatService.selectPage(new Page<>(curr, limit), wrapper));
    }
@@ -60,6 +65,12 @@
    @RequestMapping(value = "/locInPrintMat/add/auth")
    @ManagerAuth
    public R add(LocInPrintMat locInPrintMat) {
        Date now = new Date();
        locInPrintMat.setUuid(String.valueOf(now.getTime()));
        locInPrintMat.setUpdateTime(now);
        locInPrintMat.setCreateBy(getUserId());
        locInPrintMat.setUpdateTime(now);
        locInPrintMat.setUpdateBy(getUserId());
        locInPrintMatService.insert(locInPrintMat);
        return R.ok();
    }