Merge remote-tracking branch 'origin/dev' into test
This commit is contained in:
@@ -7,6 +7,7 @@ import com.zt.plat.module.base.controller.admin.templtp.onlyoffice.service.OnlyO
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.security.PermitAll;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/base/onlyoffice")
|
||||
@Tag(name = "管理后台 - onlyOffice回调")
|
||||
@@ -31,12 +33,14 @@ public class OnlyOfficeCallbackController {
|
||||
@PostMapping("/callback/{id}")
|
||||
@PermitAll
|
||||
@TenantIgnore
|
||||
public ResponseEntity<Map<String, Integer>> handleCallback(@RequestBody OnlyOfficeCallback callback, @PathVariable String id,@RequestParam("fileName") String fileName) {
|
||||
public ResponseEntity<Map<String, Object>> handleCallback(@RequestBody OnlyOfficeCallback callback, @PathVariable String id,@RequestParam("fileName") String fileName) {
|
||||
// 处理回调逻辑
|
||||
callbackService.processCallback(callback,id,fileName);
|
||||
log.info("回调参数:【{}】",callback.toString());
|
||||
// 返回必须的响应,否则OnlyOffice会显示错误
|
||||
Map<String, Integer> response = new HashMap<>();
|
||||
Map<String, Object> response = new HashMap<>();
|
||||
response.put("error", 0);
|
||||
// response.put("version", 100);
|
||||
return new ResponseEntity<>(response, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -52,6 +56,7 @@ public class OnlyOfficeCallbackController {
|
||||
// 返回必须的响应,否则OnlyOffice会显示错误
|
||||
Map<String, Integer> response = new HashMap<>();
|
||||
response.put("error", 0);
|
||||
// response.put("version", 0);
|
||||
return new ResponseEntity<>(response, HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,6 +168,7 @@ public class OnlyOfficeCallbackServiceImpl implements OnlyOfficeCallbackService
|
||||
fileInfo.put("id",String.valueOf(fileRespDTO.getId()));
|
||||
fileInfo.put("name", fileRespDTO.getName());
|
||||
fileInfo.put("directory", fileRespDTO.getDirectory());
|
||||
fileInfo.put("key", callback.getKey());
|
||||
templateInstanceService.updateTemplateInstanceFileUrlByInstanceId(id, JSONObject.toJSONString(fileInfo));
|
||||
} else {
|
||||
// 创建文件失败,处理错误
|
||||
@@ -352,6 +353,7 @@ public class OnlyOfficeCallbackServiceImpl implements OnlyOfficeCallbackService
|
||||
fileInfo.put("id",String.valueOf(fileRespDTO.getId()));
|
||||
fileInfo.put("name", fileRespDTO.getName());
|
||||
fileInfo.put("directory", fileRespDTO.getDirectory());
|
||||
fileInfo.put("key", callback.getKey());
|
||||
templateInstanceService.updateTemplateInstanceFileUrlByInstanceId(id, JSONObject.toJSONString(fileInfo));
|
||||
} else {
|
||||
// 创建文件失败,处理错误
|
||||
|
||||
@@ -16,6 +16,11 @@ public class TemplateInstanceDataRespVO {
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
|
||||
@Schema(description = "字段名字", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("字段名字")
|
||||
private String fldName;
|
||||
|
||||
@Schema(description = "关联实例主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25824")
|
||||
@ExcelProperty("关联实例主键")
|
||||
private String inscId;
|
||||
@@ -24,6 +29,10 @@ public class TemplateInstanceDataRespVO {
|
||||
@ExcelProperty("字段标识;关联字段库")
|
||||
private String fldKy;
|
||||
|
||||
@Schema(description = "字段結構", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("字段結構;")
|
||||
private String fldDoc;
|
||||
|
||||
@Schema(description = "用户填写的值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("用户填写的值")
|
||||
private String fldVal;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.base.controller.admin.templtp.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
||||
@@ -44,4 +44,12 @@ public class TemplateInstanceDataDO extends BusinessBaseDO {
|
||||
@TableField("FLD_VAL")
|
||||
private String fldVal;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String fldName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String fldDoc;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class TemplateInstanceItemServiceImpl implements TemplateInstanceItemServ
|
||||
@Override
|
||||
public void updateTemplateInstanceItem(TemplateInstanceItemSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateTemplateInstanceItemExists(updateReqVO.getInscId());
|
||||
validateTemplateInstanceItemExists(updateReqVO.getId());
|
||||
// 更新
|
||||
TemplateInstanceItemDO updateObj = BeanUtils.toBean(updateReqVO, TemplateInstanceItemDO.class);
|
||||
templateInstanceItemMapper.updateById(updateObj);
|
||||
|
||||
@@ -409,9 +409,19 @@ public class TemplateInstanceServiceImpl implements TemplateInstanceService {
|
||||
|
||||
// 实例数据
|
||||
private List<TemplateInstanceDataRespVO> setTemplateInstanceDataRespVOS(Long id) {
|
||||
return BeanUtils.toBean(templateInstanceDataMapper.selectList(new LambdaQueryWrapper<TemplateInstanceDataDO>()
|
||||
List<TemplateInstanceDataRespVO> templateInstanceDataRespVOS = BeanUtils.toBean(templateInstanceDataMapper.selectList(new LambdaQueryWrapper<TemplateInstanceDataDO>()
|
||||
.eq(TemplateInstanceDataDO::getInscId, id)
|
||||
.eq(TemplateInstanceDataDO::getCompanyId, CompanyContextHolder.getCompanyId())), TemplateInstanceDataRespVO.class);
|
||||
List<TmplTpFldDO> tmplTpListByValKeys = tmplTpFldService.getTmplTpListByValKeys(templateInstanceDataRespVOS.stream().map(TemplateInstanceDataRespVO::getFldKy).toList());
|
||||
templateInstanceDataRespVOS.forEach(templateInstanceDataRespVO -> {
|
||||
tmplTpListByValKeys.forEach(tmplTpFldDO -> {
|
||||
if (templateInstanceDataRespVO.getFldKy().equals(tmplTpFldDO.getFldKy())) {
|
||||
templateInstanceDataRespVO.setFldName(tmplTpFldDO.getFldName());
|
||||
templateInstanceDataRespVO.setFldDoc(tmplTpFldDO.getFldDoc());
|
||||
}
|
||||
});
|
||||
});
|
||||
return templateInstanceDataRespVOS;
|
||||
}
|
||||
|
||||
private void validateStatusCanDelete(List<Long> ids) {
|
||||
|
||||
@@ -96,6 +96,9 @@ public class TmplTpFldServiceImpl extends ServiceImpl<TmplTpFldMapper, TmplTpFld
|
||||
|
||||
@Override
|
||||
public List<TmplTpFldDO> getTmplTpListByValKeys(List<String> valNames) {
|
||||
if (CollUtil.isEmpty(valNames)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<TmplTpFldDO>().in(TmplTpFldDO::getFldKy, valNames));
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ package com.zt.plat.module.contractorder.api;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.contractorder.api.dto.contract.ContractRespDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.PrchOrdDtlDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.PurchaseOrderWithDetailsDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.SalesOrdDtlDTO;
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.international.IntContract;
|
||||
@@ -56,4 +57,14 @@ public interface ContractApi {
|
||||
@GetMapping(PREFIX + "/sales-order-detail-by-ids")
|
||||
@Operation(summary = "通过消费订单详情id批量获取消费订单详情")
|
||||
CommonResult<List<SalesOrdDtlDTO>> getSalesOrderDetailByIds(@RequestParam("ids") List<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/po-order-detail-by-id")
|
||||
@Operation(summary = "通过采购订单详情id获取消费订单详情")
|
||||
CommonResult<PrchOrdDtlDTO> getPoOrderDetailById(@RequestParam("id") Long id);
|
||||
|
||||
@GetMapping(PREFIX + "/po-order-detail-by-ids")
|
||||
@Operation(summary = "通过采购订单详情id批量获取消费订单详情")
|
||||
CommonResult<List<PrchOrdDtlDTO>> getPoOrderDetailByIds(@RequestParam("ids") List<Long> ids);
|
||||
|
||||
//销售采购融合。主子表
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user