no message
parent
f6fb151886
commit
a83c86d3b9
|
|
@ -16,6 +16,7 @@
|
|||
package com.youchain.businessdata.repository;
|
||||
|
||||
import com.youchain.businessdata.domain.Pick;
|
||||
import com.youchain.businessdata.domain.PickDetail;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
|
|
@ -37,4 +38,7 @@ public interface PickRepository extends JpaRepository<Pick, Long>, JpaSpecificat
|
|||
|
||||
@Query(value = " from Pick p WHERE p.gdCode=:gdCode ")
|
||||
List<Pick> findByPickGdCode(String gdCode);
|
||||
|
||||
@Query(value = " from PickDetail pd WHERE pd.pick.id=:pickId ")
|
||||
List<PickDetail> queryPickDetail(Long pickId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ package com.youchain.businessdata.rest;
|
|||
|
||||
import com.youchain.annotation.Log;
|
||||
import com.youchain.businessdata.domain.Pick;
|
||||
import com.youchain.businessdata.domain.PickDetail;
|
||||
import com.youchain.businessdata.service.PickService;
|
||||
import com.youchain.businessdata.service.dto.PickQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
|
@ -27,12 +28,14 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author huojin
|
||||
* @website https://eladmin.vip
|
||||
* @date 2024-06-11
|
||||
**/
|
||||
@RestController
|
||||
|
|
@ -83,4 +86,9 @@ public class PickController {
|
|||
pickService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/queryPickDetail")
|
||||
public ResponseEntity<Object> queryPickDetail(@RequestParam("pickId") Long pickId) {
|
||||
return new ResponseEntity<>(pickService.queryPickDetail(pickId), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ package com.youchain.businessdata.service;
|
|||
|
||||
import com.youchain.RequestData.Yclbl;
|
||||
import com.youchain.businessdata.domain.Pick;
|
||||
import com.youchain.businessdata.domain.PickDetail;
|
||||
import com.youchain.businessdata.service.dto.PickDto;
|
||||
import com.youchain.businessdata.service.dto.PickQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
|
@ -123,4 +124,6 @@ public interface PickService {
|
|||
* @param pick->出库单
|
||||
*/
|
||||
void materialPick(Pick pick);
|
||||
|
||||
List<PickDetail> queryPickDetail(Long pickId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -349,5 +349,10 @@ public class PickServiceImpl implements PickService {
|
|||
pickRepository.save(pick);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PickDetail> queryPickDetail(Long pickId) {
|
||||
return pickRepository.queryPickDetail(pickId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
package com.youchain.modules.system.rest;
|
||||
|
||||
import com.youchain.annotation.AnonymousAccess;
|
||||
import com.youchain.annotation.Log;
|
||||
import com.youchain.exception.BadRequestException;
|
||||
import com.youchain.modules.system.domain.ApiDict;
|
||||
|
|
@ -49,21 +50,18 @@ public class ApiDictController {
|
|||
|
||||
@ApiOperation("导出字典数据")
|
||||
@GetMapping(value = "/download")
|
||||
|
||||
public void exportDict(HttpServletResponse response, ApiDictQueryCriteria criteria) throws IOException {
|
||||
dictService.download(dictService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@ApiOperation("查询字典")
|
||||
@GetMapping(value = "/all")
|
||||
|
||||
public ResponseEntity<Object> queryAllDict(){
|
||||
return new ResponseEntity<>(dictService.queryAll(new ApiDictQueryCriteria()),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@ApiOperation("查询字典")
|
||||
@GetMapping
|
||||
|
||||
public ResponseEntity<Object> queryDict(ApiDictQueryCriteria resources, Pageable pageable){
|
||||
return new ResponseEntity<>(dictService.queryAll(resources,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
|
@ -71,7 +69,6 @@ public class ApiDictController {
|
|||
@Log("新增字典")
|
||||
@ApiOperation("新增字典")
|
||||
@PostMapping
|
||||
|
||||
public ResponseEntity<Object> createDict(@Validated @RequestBody ApiDict resources){
|
||||
if (resources.getId() != null) {
|
||||
throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID");
|
||||
|
|
@ -84,7 +81,6 @@ public class ApiDictController {
|
|||
@Log("修改字典")
|
||||
@ApiOperation("修改字典")
|
||||
@PutMapping
|
||||
|
||||
public ResponseEntity<Object> updateDict(@Validated(ApiDict.Update.class) @RequestBody ApiDict resources){
|
||||
dictService.update(resources);
|
||||
dictService.queryAllToSave();
|
||||
|
|
@ -94,7 +90,6 @@ public class ApiDictController {
|
|||
@Log("删除字典")
|
||||
@ApiOperation("删除字典")
|
||||
@DeleteMapping
|
||||
|
||||
public ResponseEntity<Object> deleteDict(@RequestBody Set<Long> ids){
|
||||
dictService.delete(ids);
|
||||
dictService.queryAllToSave();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ spring:
|
|||
validation-query: select 1
|
||||
# 配置监控统计
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
enabled: false
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue