|
@ -17,6 +17,7 @@ import com.win.module.wms.service.productdismantleJob.ProductdismantleJobMainSer |
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
import io.swagger.v3.oas.annotations.Parameter; |
|
|
import io.swagger.v3.oas.annotations.Parameter; |
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
|
|
|
import jodd.util.StringUtil; |
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
import org.springframework.validation.annotation.Validated; |
|
|
import org.springframework.validation.annotation.Validated; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
@ -25,8 +26,10 @@ import javax.annotation.Resource; |
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
import javax.validation.Valid; |
|
|
import javax.validation.Valid; |
|
|
import java.io.IOException; |
|
|
import java.io.IOException; |
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.Collection; |
|
|
import java.util.Collection; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
import static com.win.framework.common.pojo.CommonResult.success; |
|
|
import static com.win.framework.common.pojo.CommonResult.success; |
|
|
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; |
|
|
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; |
|
@ -145,4 +148,19 @@ public class ProductdismantleJobMainController { |
|
|
return success(result); |
|
|
return success(result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/getCountByStatus") |
|
|
|
|
|
@Operation(summary = "APP获得制品拆解任务数量根据任务状态") |
|
|
|
|
|
@Parameter(name = "types", description = "类型数组", required = false, example = "\"types\":[\"1\",\"2\"]") |
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('wms:productdismantle-job-main:query')") |
|
|
|
|
|
public CommonResult<Map<String,Integer>> getCountByStatus(@RequestBody Map<String, List<String>> map) { |
|
|
|
|
|
List<String> list = new ArrayList<>(); |
|
|
|
|
|
if(map==null||map.get("types")==null|| StringUtil.isEmpty(map.get("types").toString())){ |
|
|
|
|
|
list.add("1");//默认不传为执行中的
|
|
|
|
|
|
}else{ |
|
|
|
|
|
list = map.get("types"); |
|
|
|
|
|
} |
|
|
|
|
|
Map<String, Integer> countByStatus = productdismantleJobMainService.getCountByStatus(list); |
|
|
|
|
|
return success(countByStatus); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|