#
Junjie
昨天 a2a5f1b9b70be48687ac7f84ebf6aa132c3721e9
src/main/java/com/zy/asrs/controller/WrkMastController.java
@@ -6,11 +6,16 @@
import com.core.common.Cools;
import com.core.common.DateUtils;
import com.core.common.R;
import com.zy.asrs.domain.param.CreateOutTaskBatchParam;
import com.zy.asrs.entity.WrkMast;
import com.zy.asrs.service.WrkMastService;
import com.zy.common.service.CommonService;
import com.zy.common.web.BaseController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@@ -23,6 +28,8 @@
    @Autowired
    private WrkMastService wrkMastService;
    @Autowired
    private CommonService commonService;
    @RequestMapping(value = "/wrkMast/list/auth")
    @ManagerAuth
@@ -47,6 +54,20 @@
        return R.ok(wrkMastService.page(new Page<>(curr, limit), wrapper));
    }
    @PostMapping(value = "/wrkBatchOut/create/auth")
    @ManagerAuth(memo = "生成出库任务")
    @Transactional
    public R createBatchOutTask(@RequestBody CreateOutTaskBatchParam param) {
        if (param == null) {
            return R.error("参数不能为空");
        }
        boolean result = commonService.createOutTaskBatch(param);
        if (result) {
            return R.ok();
        }
        return R.error("生成批量出库任务失败");
    }
    private <T> void convert(Map<String, Object> map, QueryWrapper<T> wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            String val = String.valueOf(entry.getValue());