Browse Source

修改bug

master
xia 2 years ago
parent
commit
2da7a0d515
  1. 2
      archives/src/main/java/com/storeroom/modules/archives/controller/ExternalArchives1Controller.java
  2. 38
      archives/src/main/java/com/storeroom/modules/archives/controller/ExternalArchives2Controller.java
  3. 17
      archives/src/main/java/com/storeroom/modules/archives/controller/ExternalArchivesController.java
  4. 10
      archives/src/main/java/com/storeroom/modules/archives/repository/BorrowArchivesRepository.java
  5. 2
      archives/src/main/java/com/storeroom/modules/archives/service/impl/ArchivesCaseServiceImpl.java

2
archives/src/main/java/com/storeroom/modules/archives/controller/ExternalArchives1Controller.java

@ -1,6 +1,7 @@
package com.storeroom.modules.archives.controller;
import com.storeroom.annotaion.rest.AnonymousPostMapping;
import com.storeroom.annotation.Log;
import com.storeroom.modules.archives.service.ArchivesService;
import com.storeroom.modules.archives.service.dto.ArchivesExternalGetDTO;
import io.swagger.annotations.Api;
@ -21,6 +22,7 @@ public class ExternalArchives1Controller {
@ApiOperation("7.移动列查询档案数据")
@AnonymousPostMapping("/MoveColumnGetFiles")
@Log(value = "第三方:移动列查询档案数据",apiAddress = "/api/ArchiverDetails/MoveColumnGetFiles")
public Object externalMoveColumnGetFiles(
@Validated @RequestBody ArchivesExternalGetDTO dto
){

38
archives/src/main/java/com/storeroom/modules/archives/controller/ExternalArchives2Controller.java

@ -0,0 +1,38 @@
package com.storeroom.modules.archives.controller;
import com.alibaba.fastjson.JSONObject;
import com.storeroom.annotaion.rest.AnonymousPostMapping;
import com.storeroom.annotation.Log;
import com.storeroom.modules.archives.service.ArchivesCaseService;
import com.storeroom.modules.archives.service.ArchivesService;
import com.storeroom.modules.archives.service.dto.ArchivesExternalGetDTO;
import com.storeroom.utils.ApiResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequiredArgsConstructor
@Api(tags = "外部接口-档案")
@RequestMapping("/api/task")
public class ExternalArchives2Controller {
private final ArchivesCaseService caseService;
@ApiOperation("5.任务管理页面任务的使用")
@AnonymousPostMapping("/notice")
@Log(value = "第三方:任务管理页面任务的使用",apiAddress = "/api/task/notice")
public ApiResponse<Object> notice(
@Validated @RequestBody String json
){
JSONObject jsonObject = JSONObject.parseObject(json);
String caseId = jsonObject.get("id") +"";
caseService.externalCallback(caseId);
return ApiResponse.success("{\"success\":\"0\"}");
}
}

17
archives/src/main/java/com/storeroom/modules/archives/controller/ExternalArchivesController.java

@ -2,6 +2,7 @@ package com.storeroom.modules.archives.controller;
import com.alibaba.fastjson.JSONObject;
import com.storeroom.annotaion.rest.AnonymousPostMapping;
import com.storeroom.annotation.Log;
import com.storeroom.modules.archives.service.ArchivesCaseService;
import com.storeroom.modules.archives.service.ArchivesService;
import com.storeroom.modules.archives.service.dto.ArchivesDTO;
@ -28,11 +29,11 @@ import java.util.Map;
public class ExternalArchivesController {
private final ArchivesService archivesService;
private final ArchivesCaseService caseService;
private final DeviceService deviceService;
@ApiOperation("1.从系统服务获取档案信息")
@AnonymousPostMapping("/get")
@Log(value = "第三方:从系统服务获取档案信息",apiAddress = "/api/Archives/get")
public Object externalGet(
@Validated @RequestBody ArchivesExternalGetDTO dto
){
@ -41,6 +42,7 @@ public class ExternalArchivesController {
@ApiOperation("2.获取密集架当前区在库不在库数量")
@AnonymousPostMapping("/getArchivesCount")
@Log(value = "第三方:获取密集架当前区在库不在库数量",apiAddress = "/api/Archives/getArchivesCount")
public Object externalGetArchivesCount(
@Validated @RequestBody ArchivesExternalGetDTO dto
){
@ -55,19 +57,9 @@ public class ExternalArchivesController {
return archivesService.externalGetColumnInfo(dto);
}
@ApiOperation("5.任务管理页面任务的使用")
@AnonymousPostMapping("/externalCallback")
public ApiResponse<Object> externalCallback(
@Validated @RequestBody String json
){
JSONObject jsonObject = JSONObject.parseObject(json);
String caseId = jsonObject.get("id") +"";
caseService.externalCallback(caseId);
return ApiResponse.success("{\"success\":\"0\"}");
}
@ApiOperation("6.移动列网格列表页面进入目录详情页面")
@AnonymousPostMapping("/GetArchivesByZy")
@Log(value = "第三方:获取密集架当前左边右边的总数量",apiAddress = "/api/Archives/GetArchivesByZy")
public Object externalGetArchivesByZy(
@Validated @RequestBody ArchivesExternalGetDTO dto
){
@ -76,6 +68,7 @@ public class ExternalArchivesController {
@ApiOperation("8.上传密集架报警信息")
@AnonymousPostMapping("log")
@Log(value = "第三方:获取密集架当前左边右边的总数量",apiAddress = "/api/Archives/log")
public Object deseCabinetAlarmLog(@RequestBody AlarmDeseCaBinetLog alarmDeseCaBinetLog) {
deviceService.upLoadAlarmLog(alarmDeseCaBinetLog);

10
archives/src/main/java/com/storeroom/modules/archives/repository/BorrowArchivesRepository.java

@ -23,13 +23,7 @@ public interface BorrowArchivesRepository extends JpaRepository<BorrowArchives,
@Query(nativeQuery = true,
value = "select asy.archives_id as archivesId,1 as borrowType,asy.category_id as categoryId,asy.tag_no as tid,asy.barcode," +
"asy.category_name as categoryName,asy.archive_no as archiveNo,asy.maintitle,asy.case_name as caseName," +
"(select GROUP_CONCAT(DISTINCT CONCAT(room.name ,'-' , di.device_name , '-' , dat.position_name)) as seat " +
"from archives_case_cartoning acc inner join archives_case ace on acc.case_id = ace.id " +
"inner join device_archives_tag dat on dat.id = ace.shelf_id " +
"inner join device_info di ON dat.device_info_id = di.id " +
"inner join storeroom room ON di.storeroom_id = room.id " +
"where acc.parent_id = asy.archives_id) as folderLocationDetails " +
"asy.category_name as categoryName,asy.archive_no as archiveNo,asy.maintitle,asy.case_name as caseName,asy.folder_location_details as folderLocationDetails " +
"from archives_summary asy where asy.archives_id in ?1 ")
List<Map<String,Object>> findAllByArchivesIdss(List<String> archiveIds);
@ -132,7 +126,7 @@ public interface BorrowArchivesRepository extends JpaRepository<BorrowArchives,
"WHEN ba.borrow_type = 2 then '待借阅' " +
"WHEN ba.borrow_type = 3 && bbl.borrow_end < DATE(now()) THEN '逾期' " +
"WHEN ba.borrow_type = 3 && bbl.borrow_end >= DATE(now()) THEN '待归还' " +
"WHEN bbl.borrow_type = 4 then '已归还' ELSE '未知' END AS borrowType " +
"WHEN ba.borrow_type = 4 then '已归还' ELSE '未知' END AS borrowType " +
"from borrow_archives ba " +
"inner join borrow_bill_archives bba on ba.id = bba.ba_id " +
"inner join borrow_bill bbl on bba.bill_id = bbl.id " +

2
archives/src/main/java/com/storeroom/modules/archives/service/impl/ArchivesCaseServiceImpl.java

@ -810,7 +810,7 @@ public class ArchivesCaseServiceImpl implements ArchivesCaseService {
}
archivesCase = caseRepository.saveAndFlush(archivesCase);
this.recordStorage(archivesCase,type == 1 ? 1:2);
this.recordStorage(archivesCase,type == 1 ? 2:4);
return null;
}

Loading…
Cancel
Save