Merge remote-tracking branch 'origin/main'
commit
b21b042030
|
|
@ -0,0 +1,91 @@
|
|||
package com.zcloud.basic.info.web;
|
||||
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.basic.info.api.ImgFilesServiceI;
|
||||
import com.zcloud.basic.info.dto.ImgFilesAddCmd;
|
||||
import com.zcloud.basic.info.dto.ImgFilesPageQry;
|
||||
import com.zcloud.basic.info.dto.ImgFilesQryCmd;
|
||||
import com.zcloud.basic.info.dto.ImgFilesUpdateCmd;
|
||||
import com.zcloud.basic.info.dto.clientobject.ImgFilesCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.ImgFilesInfoCO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:05
|
||||
*/
|
||||
@Api(tags = "图片信息表")
|
||||
@RequestMapping("/${application.gateway}/imgFiles")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
public class ImgFilesController {
|
||||
private final ImgFilesServiceI imgFilesService;
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<ImgFilesCO> add(@Validated ImgFilesAddCmd cmd) {
|
||||
return imgFilesService.add(cmd);
|
||||
}
|
||||
|
||||
@ApiOperation("批量新增")
|
||||
@PostMapping("/batchSave")
|
||||
public SingleResponse<ImgFilesInfoCO> batchAdd(@Validated ImgFilesAddCmd cmd) {
|
||||
return imgFilesService.batchAdd(cmd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation("分页")
|
||||
@PostMapping("/list")
|
||||
public PageResponse<ImgFilesCO> page(@RequestBody ImgFilesPageQry qry) {
|
||||
return imgFilesService.listPage(qry);
|
||||
}
|
||||
|
||||
@ApiOperation("所有数据")
|
||||
@GetMapping("/listAll")
|
||||
public MultiResponse<ImgFilesCO> listAll(ImgFilesQryCmd imgFilesQryCmd) {
|
||||
return imgFilesService.listAll(imgFilesQryCmd);
|
||||
}
|
||||
|
||||
@ApiOperation("详情")
|
||||
@GetMapping("/{id}")
|
||||
public SingleResponse<ImgFilesCO> getInfoById(@PathVariable("id") Long id) {
|
||||
return SingleResponse.of(new ImgFilesCO());
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{filePath}")
|
||||
public Response removeFile(@PathVariable("filePath") String filePath) {
|
||||
imgFilesService.removeFile(filePath);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除多个")
|
||||
@DeleteMapping("/ids")
|
||||
public Response removeBatch(@RequestParam Long[] ids) {
|
||||
imgFilesService.removeBatch(ids);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping("/edit")
|
||||
public SingleResponse edit(@Validated @RequestBody ImgFilesUpdateCmd imgFilesUpdateCmd) {
|
||||
imgFilesService.edit(imgFilesUpdateCmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package com.zcloud.basic.info.command;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.zcloud.basic.info.command.convertor.ImgFilesCoConvertor;
|
||||
import com.zcloud.basic.info.domain.gateway.ImgFilesGateway;
|
||||
import com.zcloud.basic.info.domain.model.ImgFilesE;
|
||||
import com.zcloud.basic.info.dto.ImgFilesAddCmd;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.zcloud.basic.info.dto.clientobject.ImgFilesCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.ImgFilesInfoCO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.ImgFilesDO;
|
||||
import com.zcloud.basic.info.persistence.repository.ImgFilesRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.math3.analysis.function.Sin;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:00
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class ImgFilesAddExe {
|
||||
private final ImgFilesGateway imgFilesGateway;
|
||||
private final ImgFilesCoConvertor imgFilesCoConvertor;
|
||||
private final ImgFilesRepository imgFilesRepository;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public SingleResponse<ImgFilesCO> execute(ImgFilesAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
Long tenantId = ssoUser.getTenantId();
|
||||
ImgFilesE imgFilesE = new ImgFilesE();
|
||||
BeanUtils.copyProperties(cmd, imgFilesE);
|
||||
boolean res = false;
|
||||
ImgFilesCO imgFilesCO = new ImgFilesCO();
|
||||
try {
|
||||
String filePath = imgFilesE.initAdd(tenantId, imgFilesE);
|
||||
imgFilesCO.setFilePath(filePath);
|
||||
res = true;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return SingleResponse.of(imgFilesCO);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public SingleResponse<ImgFilesInfoCO> batchExecute(ImgFilesAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
Long tenantId = ssoUser.getTenantId();
|
||||
ImgFilesE imgFilesE = new ImgFilesE();
|
||||
BeanUtils.copyProperties(cmd, imgFilesE);
|
||||
boolean res = false;
|
||||
ImgFilesInfoCO imgFilesCO = new ImgFilesInfoCO();
|
||||
try {
|
||||
List<ImgFilesE> imgFilesEList = imgFilesE.initBatchAdd(tenantId, imgFilesE);
|
||||
List<ImgFilesDO> imgFilesDOList = imgFilesCoConvertor.converEsToDOs(imgFilesEList);
|
||||
imgFilesRepository.saveBatch(imgFilesDOList);
|
||||
List<ImgFilesCO> imgFilesCOList = imgFilesCoConvertor.converDOsToCOs(imgFilesDOList);
|
||||
imgFilesCO.setFileList(imgFilesCOList);
|
||||
imgFilesCO.setForeignKey(imgFilesE.getForeignKey());
|
||||
res = true;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (!res) {
|
||||
throw new BizException("保存失败");
|
||||
}
|
||||
return SingleResponse.of(imgFilesCO);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.zcloud.basic.info.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.basic.info.domain.gateway.ImgFilesGateway;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:07
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class ImgFilesRemoveExe {
|
||||
private final ImgFilesGateway imgFilesGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(String filePath) {
|
||||
|
||||
// if (!res) {
|
||||
// throw new BizException("删除失败");
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(Long[] ids) {
|
||||
boolean res = imgFilesGateway.deletedImgFilesByIds(ids);
|
||||
if (!res) {
|
||||
throw new BizException("删除失败");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.basic.info.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.basic.info.domain.gateway.ImgFilesGateway;
|
||||
import com.zcloud.basic.info.domain.model.ImgFilesE;
|
||||
import com.zcloud.basic.info.dto.ImgFilesUpdateCmd;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:08
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class ImgFilesUpdateExe {
|
||||
private final ImgFilesGateway imgFilesGateway;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(ImgFilesUpdateCmd imgFilesUpdateCmd) {
|
||||
ImgFilesE imgFilesE = new ImgFilesE();
|
||||
BeanUtils.copyProperties(imgFilesUpdateCmd, imgFilesE);
|
||||
boolean res = imgFilesGateway.update(imgFilesE);
|
||||
if (!res) {
|
||||
throw new BizException("修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.zcloud.basic.info.command.convertor;
|
||||
|
||||
import com.zcloud.basic.info.domain.model.ImgFilesE;
|
||||
import com.zcloud.basic.info.dto.clientobject.ImgFilesCO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.ImgFilesDO;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:05
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface ImgFilesCoConvertor {
|
||||
/**
|
||||
* @param imgFilesDOs
|
||||
* @return
|
||||
*/
|
||||
List<ImgFilesCO> converDOsToCOs(List<ImgFilesDO> imgFilesDOs);
|
||||
List<ImgFilesDO> converEsToDOs(List<ImgFilesE> imgFilesEs);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.zcloud.basic.info.command.query;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.zcloud.basic.info.command.convertor.ImgFilesCoConvertor;
|
||||
import com.zcloud.basic.info.dto.ImgFilesAddCmd;
|
||||
import com.zcloud.basic.info.dto.ImgFilesPageQry;
|
||||
import com.zcloud.basic.info.dto.ImgFilesQryCmd;
|
||||
import com.zcloud.basic.info.dto.clientobject.ImgFilesCO;
|
||||
import com.zcloud.basic.info.persistence.dataobject.ImgFilesDO;
|
||||
import com.zcloud.basic.info.persistence.repository.ImgFilesRepository;
|
||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* web-app
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:07
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class ImgFilesQueryExe {
|
||||
private final ImgFilesRepository imgFilesRepository;
|
||||
private final ImgFilesCoConvertor imgFilesCoConvertor;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
* @param imgFilesPageQry
|
||||
* @return
|
||||
*/
|
||||
public PageResponse<ImgFilesCO> execute(ImgFilesPageQry imgFilesPageQry) {
|
||||
Map<String,Object> parmas = PageQueryHelper.toHashMap(imgFilesPageQry);
|
||||
PageResponse<ImgFilesDO> pageResponse = imgFilesRepository.listPage(parmas);
|
||||
List<ImgFilesCO> examCenterCOS = imgFilesCoConvertor.converDOsToCOs(pageResponse.getData());
|
||||
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||
}
|
||||
/**
|
||||
* list
|
||||
*
|
||||
* @param imgFilesQryCmd
|
||||
* @return
|
||||
*/
|
||||
public MultiResponse<ImgFilesCO> executeList(ImgFilesQryCmd imgFilesQryCmd) {
|
||||
Map<String,Object> parmas = PageQueryHelper.toHashMap(imgFilesQryCmd);
|
||||
List<ImgFilesDO> imgFilesDOList = imgFilesRepository.listAll(parmas);
|
||||
List<ImgFilesCO> imgFilesCOList = imgFilesCoConvertor.converDOsToCOs(imgFilesDOList);
|
||||
return MultiResponse.of(imgFilesCOList);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package com.zcloud.basic.info.service;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.zcloud.basic.info.api.ImgFilesServiceI;
|
||||
import com.zcloud.basic.info.command.ImgFilesAddExe;
|
||||
import com.zcloud.basic.info.command.ImgFilesRemoveExe;
|
||||
import com.zcloud.basic.info.command.ImgFilesUpdateExe;
|
||||
import com.zcloud.basic.info.command.query.ImgFilesQueryExe;
|
||||
import com.zcloud.basic.info.dto.ImgFilesAddCmd;
|
||||
import com.zcloud.basic.info.dto.ImgFilesPageQry;
|
||||
import com.zcloud.basic.info.dto.ImgFilesQryCmd;
|
||||
import com.zcloud.basic.info.dto.ImgFilesUpdateCmd;
|
||||
import com.zcloud.basic.info.dto.clientobject.ImgFilesCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.ImgFilesInfoCO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* web-app
|
||||
*
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:08
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class ImgFilesServiceImpl implements ImgFilesServiceI {
|
||||
private final ImgFilesAddExe imgFilesAddExe;
|
||||
private final ImgFilesUpdateExe imgFilesUpdateExe;
|
||||
private final ImgFilesRemoveExe imgFilesRemoveExe;
|
||||
private final ImgFilesQueryExe imgFilesQueryExe;
|
||||
|
||||
@Override
|
||||
public PageResponse<ImgFilesCO> listPage(ImgFilesPageQry qry) {
|
||||
|
||||
return imgFilesQueryExe.execute(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse add(ImgFilesAddCmd cmd) {
|
||||
return imgFilesAddExe.execute(cmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse<ImgFilesInfoCO> batchAdd(ImgFilesAddCmd cmd) {
|
||||
return imgFilesAddExe.batchExecute(cmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(ImgFilesUpdateCmd imgFilesUpdateCmd) {
|
||||
imgFilesUpdateExe.execute(imgFilesUpdateCmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeFile(String filePath) {
|
||||
imgFilesRemoveExe.execute(filePath);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeBatch(Long[] ids) {
|
||||
imgFilesRemoveExe.execute(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MultiResponse<ImgFilesCO> listAll(ImgFilesQryCmd imgFilesQryCmd) {
|
||||
return imgFilesQueryExe.executeList(imgFilesQryCmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.zcloud.basic.info.api;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.zcloud.basic.info.dto.ImgFilesAddCmd;
|
||||
import com.zcloud.basic.info.dto.ImgFilesPageQry;
|
||||
import com.zcloud.basic.info.dto.ImgFilesQryCmd;
|
||||
import com.zcloud.basic.info.dto.ImgFilesUpdateCmd;
|
||||
import com.zcloud.basic.info.dto.clientobject.ImgFilesCO;
|
||||
import com.zcloud.basic.info.dto.clientobject.ImgFilesInfoCO;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:08
|
||||
*/
|
||||
public interface ImgFilesServiceI {
|
||||
PageResponse<ImgFilesCO> listPage(ImgFilesPageQry qry);
|
||||
|
||||
SingleResponse<ImgFilesCO> add(ImgFilesAddCmd cmd);
|
||||
SingleResponse<ImgFilesInfoCO> batchAdd(ImgFilesAddCmd cmd);
|
||||
|
||||
void edit(ImgFilesUpdateCmd cmd);
|
||||
|
||||
void removeFile(String filePath);
|
||||
|
||||
void removeBatch(Long[] ids);
|
||||
|
||||
MultiResponse<ImgFilesCO> listAll(ImgFilesQryCmd imgFilesQryCmd);
|
||||
}
|
||||
|
||||
|
|
@ -58,10 +58,10 @@ public class CorpInfoAddCmd extends Command {
|
|||
private LocalDate createDate;
|
||||
@ApiModelProperty(value = "企业状态", name = "corpState", required = true)
|
||||
private String corpState;
|
||||
@ApiModelProperty(value = "企业状态编码", name = "corpStateCode", required = true)
|
||||
private String corpStateCode;
|
||||
@ApiModelProperty(value = "资产总额(万元)", name = "totalassets", required = true)
|
||||
private Double totalassets;
|
||||
@ApiModelProperty(value = "企业状态名称", name = "corpStateName", required = true)
|
||||
private String corpStateName;
|
||||
@ApiModelProperty(value = "资产总额(万元)", name = "totalAssets", required = true)
|
||||
private BigDecimal totalAssets;
|
||||
@ApiModelProperty(value = "注册资金(万元)", name = "regcapital", required = true)
|
||||
private BigDecimal regcapital;
|
||||
@ApiModelProperty(value = "企事业单位经营地址", name = "addressBusiness", required = true)
|
||||
|
|
@ -69,9 +69,9 @@ public class CorpInfoAddCmd extends Command {
|
|||
@ApiModelProperty(value = "企事业单位办公地址", name = "addressOffice", required = true)
|
||||
private String addressOffice;
|
||||
@ApiModelProperty(value = "固定资产", name = "fixedAssets", required = true)
|
||||
private Double fixedAssets;
|
||||
private BigDecimal fixedAssets;
|
||||
@ApiModelProperty(value = "年产值", name = "yearOutputValue", required = true)
|
||||
private Double yearOutputValue;
|
||||
private BigDecimal yearOutputValue;
|
||||
@ApiModelProperty(value = "经济类型", name = "ecoType", required = true)
|
||||
private String ecoType;
|
||||
@ApiModelProperty(value = "主要负责人", name = "contacts", required = true)
|
||||
|
|
@ -85,7 +85,7 @@ public class CorpInfoAddCmd extends Command {
|
|||
@ApiModelProperty(value = "是否规模以上,1:是,2:否", name = "scaleType", required = true)
|
||||
private Integer scaleType;
|
||||
@ApiModelProperty(value = "占地面积", name = "areaCovered", required = true)
|
||||
private Double areaCovered;
|
||||
private BigDecimal areaCovered;
|
||||
@ApiModelProperty(value = "职工人数", name = "employees", required = true)
|
||||
private Integer employees;
|
||||
@ApiModelProperty(value = "经度", name = "longitude", required = true)
|
||||
|
|
|
|||
|
|
@ -61,10 +61,10 @@ public class CorpInfoUpdateCmd extends Command {
|
|||
private LocalDate createDate;
|
||||
@ApiModelProperty(value = "企业状态", name = "corpState", required = true)
|
||||
private String corpState;
|
||||
@ApiModelProperty(value = "企业状态编码", name = "corpStateCode", required = true)
|
||||
private String corpStateCode;
|
||||
@ApiModelProperty(value = "资产总额(万元)", name = "totalassets", required = true)
|
||||
private Double totalassets;
|
||||
@ApiModelProperty(value = "企业状态名称", name = "corpStateName", required = true)
|
||||
private String corpStateName;
|
||||
@ApiModelProperty(value = "资产总额(万元)", name = "totalAssets", required = true)
|
||||
private BigDecimal totalAssets;
|
||||
@ApiModelProperty(value = "注册资金(万元)", name = "regcapital", required = true)
|
||||
private BigDecimal regcapital;
|
||||
@ApiModelProperty(value = "企事业单位经营地址", name = "addressBusiness", required = true)
|
||||
|
|
@ -72,9 +72,9 @@ public class CorpInfoUpdateCmd extends Command {
|
|||
@ApiModelProperty(value = "企事业单位办公地址", name = "addressOffice", required = true)
|
||||
private String addressOffice;
|
||||
@ApiModelProperty(value = "固定资产", name = "fixedAssets", required = true)
|
||||
private Double fixedAssets;
|
||||
private BigDecimal fixedAssets;
|
||||
@ApiModelProperty(value = "年产值", name = "yearOutputValue", required = true)
|
||||
private Double yearOutputValue;
|
||||
private BigDecimal yearOutputValue;
|
||||
@ApiModelProperty(value = "经济类型", name = "ecoType", required = true)
|
||||
private String ecoType;
|
||||
@ApiModelProperty(value = "主要负责人", name = "contacts", required = true)
|
||||
|
|
@ -88,7 +88,7 @@ public class CorpInfoUpdateCmd extends Command {
|
|||
@ApiModelProperty(value = "是否规模以上,1:是,2:否", name = "scaleType", required = true)
|
||||
private Integer scaleType;
|
||||
@ApiModelProperty(value = "占地面积", name = "areaCovered", required = true)
|
||||
private Double areaCovered;
|
||||
private BigDecimal areaCovered;
|
||||
@ApiModelProperty(value = "职工人数", name = "employees", required = true)
|
||||
private Integer employees;
|
||||
@ApiModelProperty(value = "经度", name = "longitude", required = true)
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public class CorpInfoXgfAddCmd extends Command {
|
|||
|
||||
@ApiModelProperty(value = "规模", name = "scale", required = true)
|
||||
private String scale;
|
||||
@ApiModelProperty(value = "规模名称", name = "scaleName", required = true)
|
||||
@ApiModelProperty(value = "规模名称,汉字6以内", name = "scaleName", required = true)
|
||||
private String scaleName;
|
||||
|
||||
@ApiModelProperty(value = "成立时间", name = "createDate", required = true)
|
||||
|
|
@ -68,11 +68,11 @@ public class CorpInfoXgfAddCmd extends Command {
|
|||
@ApiModelProperty(value = "企业状态", name = "corpState", required = true)
|
||||
private String corpState;
|
||||
|
||||
@ApiModelProperty(value = "企业状态编码", name = "corpStateCode", required = true)
|
||||
private String corpStateCode;
|
||||
@ApiModelProperty(value = "企业状态名称", name = "corpStateName", required = true)
|
||||
private String corpStateName;
|
||||
|
||||
@ApiModelProperty(value = "资产总额(万元)", name = "totalassets", required = true)
|
||||
private Double totalassets;
|
||||
@ApiModelProperty(value = "资产总额(万元)", name = "totalAssets", required = true)
|
||||
private BigDecimal totalAssets;
|
||||
|
||||
@ApiModelProperty(value = "注册资金(万元)", name = "regcapital", required = true)
|
||||
private BigDecimal regcapital;
|
||||
|
|
@ -84,10 +84,10 @@ public class CorpInfoXgfAddCmd extends Command {
|
|||
private String addressOffice;
|
||||
|
||||
@ApiModelProperty(value = "固定资产", name = "fixedAssets", required = true)
|
||||
private Double fixedAssets;
|
||||
private BigDecimal fixedAssets;
|
||||
|
||||
@ApiModelProperty(value = "年产值", name = "yearOutputValue", required = true)
|
||||
private Double yearOutputValue;
|
||||
private BigDecimal yearOutputValue;
|
||||
|
||||
@ApiModelProperty(value = "经济类型", name = "ecoType", required = true)
|
||||
private String ecoType;
|
||||
|
|
@ -108,7 +108,7 @@ public class CorpInfoXgfAddCmd extends Command {
|
|||
private Integer scaleType;
|
||||
|
||||
@ApiModelProperty(value = "占地面积", name = "areaCovered", required = true)
|
||||
private Double areaCovered;
|
||||
private BigDecimal areaCovered;
|
||||
|
||||
@ApiModelProperty(value = "职工人数", name = "employees", required = true)
|
||||
private Integer employees;
|
||||
|
|
|
|||
|
|
@ -62,10 +62,10 @@ public class CorpInfoXgfUpdateCmd extends Command {
|
|||
private LocalDate createDate;
|
||||
@ApiModelProperty(value = "企业状态", name = "corpState", required = true)
|
||||
private String corpState;
|
||||
@ApiModelProperty(value = "企业状态编码", name = "corpStateCode", required = true)
|
||||
private String corpStateCode;
|
||||
@ApiModelProperty(value = "企业状态名称", name = "corpStateName", required = true)
|
||||
private String corpStateName;
|
||||
@ApiModelProperty(value = "资产总额(万元)", name = "totalassets", required = true)
|
||||
private Double totalassets;
|
||||
private BigDecimal totalAssets;
|
||||
@ApiModelProperty(value = "注册资金(万元)", name = "regcapital", required = true)
|
||||
private BigDecimal regcapital;
|
||||
@ApiModelProperty(value = "企事业单位经营地址", name = "addressBusiness", required = true)
|
||||
|
|
@ -73,9 +73,9 @@ public class CorpInfoXgfUpdateCmd extends Command {
|
|||
@ApiModelProperty(value = "企事业单位办公地址", name = "addressOffice", required = true)
|
||||
private String addressOffice;
|
||||
@ApiModelProperty(value = "固定资产", name = "fixedAssets", required = true)
|
||||
private Double fixedAssets;
|
||||
private BigDecimal fixedAssets;
|
||||
@ApiModelProperty(value = "年产值", name = "yearOutputValue", required = true)
|
||||
private Double yearOutputValue;
|
||||
private BigDecimal yearOutputValue;
|
||||
@ApiModelProperty(value = "经济类型", name = "ecoType", required = true)
|
||||
private String ecoType;
|
||||
@ApiModelProperty(value = "主要负责人", name = "contacts", required = true)
|
||||
|
|
@ -89,7 +89,7 @@ public class CorpInfoXgfUpdateCmd extends Command {
|
|||
@ApiModelProperty(value = "是否规模以上,1:是,2:否", name = "scaleType", required = true)
|
||||
private Integer scaleType;
|
||||
@ApiModelProperty(value = "占地面积", name = "areaCovered", required = true)
|
||||
private Double areaCovered;
|
||||
private BigDecimal areaCovered;
|
||||
@ApiModelProperty(value = "职工人数", name = "employees", required = true)
|
||||
private Integer employees;
|
||||
@ApiModelProperty(value = "经度", name = "longitude", required = true)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,51 @@
|
|||
package com.zcloud.basic.info.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:09:58
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ImgFilesAddCmd extends Command {
|
||||
|
||||
@ApiModelProperty(value = "类型,参考 com.zcloud.imgfiles.enums.filetype", name = "type", required = true)
|
||||
@NotNull(message = "类型,参考 com.zcloud.imgfiles.enums.filetype不能为空")
|
||||
private Integer type;
|
||||
@ApiModelProperty(value = "路径", name = "path", required = true)
|
||||
@NotEmpty(message = "文件存储路径不能为空")
|
||||
private String path;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "文件集合", name = "files")
|
||||
@NotEmpty(message = "至少上传一个文件")
|
||||
private MultipartFile[] files;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "外键", name = "foreignKey")
|
||||
private String foreignKey;
|
||||
|
||||
@ApiModelProperty(value = "附件名称", name = "fileName")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty(value = "企业id", name = "corpinfoId")
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "路径", name = "filePath")
|
||||
private String filePath;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.zcloud.basic.info.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:07
|
||||
*/
|
||||
@Data
|
||||
public class ImgFilesPageQry extends PageQuery {
|
||||
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `ImgFilesPageQry`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
private String likeImgFilesId;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.zcloud.basic.info.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:09:58
|
||||
*/
|
||||
@Data
|
||||
public class ImgFilesQryCmd extends Command {
|
||||
/**
|
||||
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||
* - `ImgFilesQryCmd`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||
* - `eq`: 等值查询,对应SQL的=操作符
|
||||
* - `gt`: 大于比较查询
|
||||
* - `lt`: 小于比较查询
|
||||
* - `ge`: 大于等于比较查询
|
||||
* - `le`: 小于等于比较查询
|
||||
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||
*/
|
||||
private String eqImgFilesId;
|
||||
private Integer eqType;
|
||||
private String eqForeignKey;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.zcloud.basic.info.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:08
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ImgFilesUpdateCmd extends Command {
|
||||
@ApiModelProperty(value = "主键", name = "id", required = true)
|
||||
@NotNull(message = "主键不能为空")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "业务主键id", name = "imgFilesId", required = true)
|
||||
@NotEmpty(message = "业务主键id不能为空")
|
||||
private String imgFilesId;
|
||||
@ApiModelProperty(value = "路径", name = "filePath", required = true)
|
||||
@NotEmpty(message = "路径不能为空")
|
||||
private String filePath;
|
||||
@ApiModelProperty(value = "类型,参考 com.zcloud.imgfiles.enums.filetype", name = "type", required = true)
|
||||
@NotNull(message = "类型,参考 com.zcloud.imgfiles.enums.filetype不能为空")
|
||||
private Integer type;
|
||||
@ApiModelProperty(value = "外键", name = "foreignKey", required = true)
|
||||
private String foreignKey;
|
||||
@ApiModelProperty(value = "附件名称", name = "fileName", required = true)
|
||||
@NotEmpty(message = "附件名称不能为空")
|
||||
private String fileName;
|
||||
@ApiModelProperty(value = "企业id", name = "corpinfoId", required = true)
|
||||
@NotNull(message = "企业id不能为空")
|
||||
private Long corpinfoId;
|
||||
}
|
||||
|
||||
|
|
@ -64,12 +64,12 @@ public class CorpInfoCO extends ClientObject {
|
|||
//企业状态
|
||||
@ApiModelProperty(value = "企业状态")
|
||||
private String corpState;
|
||||
//企业状态编码
|
||||
@ApiModelProperty(value = "企业状态编码")
|
||||
private String corpStateCode;
|
||||
//企业状态名称
|
||||
@ApiModelProperty(value = "企业状态名称")
|
||||
private String corpStateName;
|
||||
//资产总额(万元)
|
||||
@ApiModelProperty(value = "资产总额(万元)")
|
||||
private Double totalassets;
|
||||
private BigDecimal totalAssets;
|
||||
//注册资金(万元)
|
||||
@ApiModelProperty(value = "注册资金(万元)")
|
||||
private BigDecimal regcapital;
|
||||
|
|
@ -81,10 +81,10 @@ public class CorpInfoCO extends ClientObject {
|
|||
private String addressOffice;
|
||||
//固定资产
|
||||
@ApiModelProperty(value = "固定资产")
|
||||
private Double fixedAssets;
|
||||
private BigDecimal fixedAssets;
|
||||
//年产值
|
||||
@ApiModelProperty(value = "年产值")
|
||||
private Double yearOutputValue;
|
||||
private BigDecimal yearOutputValue;
|
||||
//经济类型
|
||||
@ApiModelProperty(value = "经济类型")
|
||||
private String ecoType;
|
||||
|
|
@ -105,7 +105,7 @@ public class CorpInfoCO extends ClientObject {
|
|||
private Integer scaleType;
|
||||
//占地面积
|
||||
@ApiModelProperty(value = "占地面积")
|
||||
private Double areaCovered;
|
||||
private BigDecimal areaCovered;
|
||||
//职工人数
|
||||
@ApiModelProperty(value = "职工人数")
|
||||
private Integer employees;
|
||||
|
|
|
|||
|
|
@ -66,12 +66,12 @@ public class CorpInfoXgfCO extends ClientObject {
|
|||
//企业状态
|
||||
@ApiModelProperty(value = "企业状态")
|
||||
private String corpState;
|
||||
//企业状态编码
|
||||
@ApiModelProperty(value = "企业状态编码")
|
||||
private String corpStateCode;
|
||||
//企业状态名称
|
||||
@ApiModelProperty(value = "企业状态名称")
|
||||
private String corpStateName;
|
||||
//资产总额(万元)
|
||||
@ApiModelProperty(value = "资产总额(万元)")
|
||||
private Double totalassets;
|
||||
private BigDecimal totalAssets;
|
||||
//注册资金(万元)
|
||||
@ApiModelProperty(value = "注册资金(万元)")
|
||||
private BigDecimal regcapital;
|
||||
|
|
@ -83,10 +83,10 @@ public class CorpInfoXgfCO extends ClientObject {
|
|||
private String addressOffice;
|
||||
//固定资产
|
||||
@ApiModelProperty(value = "固定资产")
|
||||
private Double fixedAssets;
|
||||
private BigDecimal fixedAssets;
|
||||
//年产值
|
||||
@ApiModelProperty(value = "年产值")
|
||||
private Double yearOutputValue;
|
||||
private BigDecimal yearOutputValue;
|
||||
//经济类型
|
||||
@ApiModelProperty(value = "经济类型")
|
||||
private String ecoType;
|
||||
|
|
@ -107,7 +107,7 @@ public class CorpInfoXgfCO extends ClientObject {
|
|||
private Integer scaleType;
|
||||
//占地面积
|
||||
@ApiModelProperty(value = "占地面积")
|
||||
private Double areaCovered;
|
||||
private BigDecimal areaCovered;
|
||||
//职工人数
|
||||
@ApiModelProperty(value = "职工人数")
|
||||
private Integer employees;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,80 @@
|
|||
package com.zcloud.basic.info.dto.clientobject;
|
||||
|
||||
import com.alibaba.cola.dto.ClientObject;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:04
|
||||
*/
|
||||
@Data
|
||||
public class ImgFilesCO extends ClientObject {
|
||||
//主键
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long id;
|
||||
//业务主键id
|
||||
@ApiModelProperty(value = "业务主键id")
|
||||
private String imgFilesId;
|
||||
//路径
|
||||
@ApiModelProperty(value = "路径")
|
||||
private String filePath;
|
||||
//类型,参考 com.zcloud.imgfiles.enums.filetype
|
||||
@ApiModelProperty(value = "类型,参考 com.zcloud.imgfiles.enums.filetype")
|
||||
private Integer type;
|
||||
//外键
|
||||
@ApiModelProperty(value = "外键")
|
||||
private String foreignKey;
|
||||
//附件名称
|
||||
@ApiModelProperty(value = "附件名称")
|
||||
private String fileName;
|
||||
//企业id
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private Long corpinfoId;
|
||||
//乐观锁
|
||||
@ApiModelProperty(value = "乐观锁")
|
||||
private Integer version;
|
||||
//创建人
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private Long createId;
|
||||
//创建人姓名
|
||||
@ApiModelProperty(value = "创建人姓名")
|
||||
private String createName;
|
||||
//创建时间
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
//更新人
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private Long updateId;
|
||||
//修改人名称
|
||||
@ApiModelProperty(value = "修改人名称")
|
||||
private String updateName;
|
||||
//更新时间
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
//描述
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String remarks;
|
||||
//是否删除
|
||||
@ApiModelProperty(value = "是否删除")
|
||||
private String deleteEnum;
|
||||
//租户id
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Long tenantId;
|
||||
//机构id
|
||||
@ApiModelProperty(value = "机构id")
|
||||
private Long orgId;
|
||||
//环境
|
||||
@ApiModelProperty(value = "环境")
|
||||
private String env;
|
||||
@ApiModelProperty
|
||||
private List<ImgFilesCO> fileList;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.zcloud.basic.info.dto.clientobject;
|
||||
|
||||
import com.alibaba.cola.dto.ClientObject;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* web-client
|
||||
*
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:04
|
||||
*/
|
||||
@Data
|
||||
public class ImgFilesInfoCO extends ClientObject {
|
||||
//主键
|
||||
@ApiModelProperty(value = "外键")
|
||||
private String foreignKey;
|
||||
//附件名称
|
||||
@ApiModelProperty
|
||||
private List<ImgFilesCO> fileList;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.zcloud.basic.info.domain.gateway;
|
||||
|
||||
|
||||
import com.zcloud.basic.info.domain.model.ImgFilesE;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* web-domain
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:06
|
||||
*/
|
||||
public interface ImgFilesGateway {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
Boolean add(ImgFilesE imgFilesE) ;
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
Boolean update(ImgFilesE imgFilesE);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
Boolean deletedImgFilesById(Long id);
|
||||
Boolean deletedImgFilesByIds(Long[] id);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -53,10 +53,10 @@ public class CorpInfoE extends BaseE {
|
|||
private LocalDate createDate;
|
||||
//企业状态
|
||||
private String corpState;
|
||||
//企业状态编码
|
||||
private String corpStateCode;
|
||||
//企业状态名称
|
||||
private String corpStateName;
|
||||
//资产总额(万元)
|
||||
private Double totalassets;
|
||||
private BigDecimal totalAssets;
|
||||
//注册资金(万元)
|
||||
private BigDecimal regcapital;
|
||||
//企事业单位经营地址
|
||||
|
|
@ -64,9 +64,9 @@ public class CorpInfoE extends BaseE {
|
|||
//企事业单位办公地址
|
||||
private String addressOffice;
|
||||
//固定资产
|
||||
private Double fixedAssets;
|
||||
private BigDecimal fixedAssets;
|
||||
//年产值
|
||||
private Double yearOutputValue;
|
||||
private BigDecimal yearOutputValue;
|
||||
//经济类型
|
||||
private String ecoType;
|
||||
//主要负责人
|
||||
|
|
@ -80,7 +80,7 @@ public class CorpInfoE extends BaseE {
|
|||
//是否规模以上,1:是,2:否
|
||||
private Integer scaleType;
|
||||
//占地面积
|
||||
private Double areaCovered;
|
||||
private BigDecimal areaCovered;
|
||||
//职工人数
|
||||
private Integer employees;
|
||||
//经度
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ public class CorpInfoXgfE extends BaseE {
|
|||
private LocalDate createDate;
|
||||
//企业状态
|
||||
private String corpState;
|
||||
//企业状态编码
|
||||
private String corpStateCode;
|
||||
//企业状态名称
|
||||
private String corpStateName;
|
||||
//资产总额(万元)
|
||||
private Double totalassets;
|
||||
private BigDecimal totalAssets;
|
||||
//注册资金(万元)
|
||||
private BigDecimal regcapital;
|
||||
//企事业单位经营地址
|
||||
|
|
@ -58,9 +58,9 @@ public class CorpInfoXgfE extends BaseE {
|
|||
//企事业单位办公地址
|
||||
private String addressOffice;
|
||||
//固定资产
|
||||
private Double fixedAssets;
|
||||
private BigDecimal fixedAssets;
|
||||
//年产值
|
||||
private Double yearOutputValue;
|
||||
private BigDecimal yearOutputValue;
|
||||
//经济类型
|
||||
private String ecoType;
|
||||
//主要负责人
|
||||
|
|
@ -74,7 +74,7 @@ public class CorpInfoXgfE extends BaseE {
|
|||
//是否规模以上,1:是,2:否
|
||||
private Integer scaleType;
|
||||
//占地面积
|
||||
private Double areaCovered;
|
||||
private BigDecimal areaCovered;
|
||||
//职工人数
|
||||
private Integer employees;
|
||||
//经度
|
||||
|
|
|
|||
|
|
@ -0,0 +1,107 @@
|
|||
package com.zcloud.basic.info.domain.model;
|
||||
|
||||
import com.jjb.saas.framework.domain.model.BaseE;
|
||||
import com.zcloud.gbscommon.utils.DateUtil;
|
||||
import com.zcloud.gbscommon.utils.FileUpload;
|
||||
//import com.zcloud.gbscommon.utils.Smb;
|
||||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* web-domain
|
||||
*
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:06
|
||||
*/
|
||||
@Data
|
||||
public class ImgFilesE extends BaseE {
|
||||
//主键
|
||||
private Long id;
|
||||
//业务主键id
|
||||
private String imgFilesId;
|
||||
//路径
|
||||
private String filePath;
|
||||
//类型,参考 com.zcloud.imgfiles.enums.filetype
|
||||
private Integer type;
|
||||
//外键
|
||||
private String foreignKey;
|
||||
//附件名称
|
||||
private String fileName;
|
||||
//企业id
|
||||
private Long corpinfoId;
|
||||
// 文件存储路径
|
||||
private String path;
|
||||
|
||||
private MultipartFile[] files;
|
||||
//乐观锁
|
||||
private Integer version;
|
||||
//创建人
|
||||
private Long createId;
|
||||
//创建人姓名
|
||||
private String createName;
|
||||
//创建时间
|
||||
private LocalDateTime createTime;
|
||||
//更新人
|
||||
private Long updateId;
|
||||
//修改人名称
|
||||
private String updateName;
|
||||
//更新时间
|
||||
private LocalDateTime updateTime;
|
||||
//描述
|
||||
private String remarks;
|
||||
//是否删除
|
||||
private String deleteEnum;
|
||||
//租户id
|
||||
private Long tenantId;
|
||||
//机构id
|
||||
private Long orgId;
|
||||
//环境
|
||||
private String env;
|
||||
|
||||
public String initAdd(Long tenantId, ImgFilesE baseImgFilesE) throws InvocationTargetException, IllegalAccessException {
|
||||
|
||||
MultipartFile[] files = baseImgFilesE.getFiles();
|
||||
List<ImgFilesE> imgFilesList = new ArrayList<ImgFilesE>();
|
||||
String foreignKey = ObjectUtils.isEmpty(baseImgFilesE.getForeignKey()) ? Tools.get32UUID() : baseImgFilesE.getForeignKey();
|
||||
Long corpinfoId = ObjectUtils.isEmpty(baseImgFilesE.getCorpinfoId()) ? tenantId : baseImgFilesE.getCorpinfoId();
|
||||
String filePath = corpinfoId.toString() + "/" + DateUtil.getMonth() + "/" + baseImgFilesE.getPath();
|
||||
ImgFilesE imgFile = new ImgFilesE();
|
||||
BeanUtils.copyProperties(baseImgFilesE, imgFile);
|
||||
// 文件上传并获取上传路径
|
||||
String resultFilePath = FileUpload.fileUp(files[0], filePath, Tools.get32UUID());
|
||||
return filePath + resultFilePath;
|
||||
}
|
||||
|
||||
public List<ImgFilesE> initBatchAdd(Long tenantId, ImgFilesE baseImgFilesE) throws Exception {
|
||||
MultipartFile[] files = baseImgFilesE.getFiles();
|
||||
List<ImgFilesE> imgFilesList = new ArrayList<ImgFilesE>();
|
||||
String foreignKey = ObjectUtils.isEmpty(baseImgFilesE.getForeignKey()) ? Tools.get32UUID() : baseImgFilesE.getForeignKey();
|
||||
Long corpinfoId = ObjectUtils.isEmpty(baseImgFilesE.getCorpinfoId()) ? tenantId : baseImgFilesE.getCorpinfoId();
|
||||
String filePath = corpinfoId.toString() + "/" + DateUtil.getMonth() + "/" + baseImgFilesE.getPath();
|
||||
|
||||
for (MultipartFile file : files) {
|
||||
ImgFilesE imgFile = new ImgFilesE();
|
||||
BeanUtils.copyProperties(baseImgFilesE, imgFile);
|
||||
// 文件上传并获取上传路径
|
||||
// Smb.saveFile(file, filePath);
|
||||
imgFile.setImgFilesId(Tools.get32UUID());
|
||||
// imgFile.setFilePath(filePath+);
|
||||
imgFile.setType(baseImgFilesE.getType());
|
||||
imgFile.setForeignKey(foreignKey);
|
||||
imgFile.setFileName(file.getOriginalFilename());
|
||||
imgFile.setCorpinfoId(corpinfoId);
|
||||
imgFilesList.add(imgFile);
|
||||
}
|
||||
baseImgFilesE.setForeignKey(foreignKey);
|
||||
return imgFilesList;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.zcloud.basic.info.gatewayimpl;
|
||||
|
||||
import com.zcloud.basic.info.domain.gateway.ImgFilesGateway;
|
||||
import com.zcloud.basic.info.domain.model.ImgFilesE;
|
||||
import com.zcloud.basic.info.persistence.dataobject.ImgFilesDO;
|
||||
import com.zcloud.basic.info.persistence.repository.ImgFilesRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:06
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class ImgFilesGatewayImpl implements ImgFilesGateway {
|
||||
private final ImgFilesRepository imgFilesRepository;
|
||||
|
||||
@Override
|
||||
public Boolean add(ImgFilesE imgFilesE) {
|
||||
ImgFilesDO d = new ImgFilesDO();
|
||||
BeanUtils.copyProperties(imgFilesE, d);
|
||||
imgFilesRepository.save(d);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean update(ImgFilesE imgFilesE) {
|
||||
ImgFilesDO d = new ImgFilesDO();
|
||||
BeanUtils.copyProperties(imgFilesE, d);
|
||||
imgFilesRepository.updateById(d);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deletedImgFilesById(Long id) {
|
||||
return imgFilesRepository.removeById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean deletedImgFilesByIds(Long[] ids) {
|
||||
return imgFilesRepository.removeByIds(Arrays.asList(ids));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -70,12 +70,12 @@ public class CorpInfoDO extends BaseDO {
|
|||
//企业状态
|
||||
@ApiModelProperty(value = "企业状态")
|
||||
private String corpState;
|
||||
//企业状态编码
|
||||
@ApiModelProperty(value = "企业状态编码")
|
||||
private String corpStateCode;
|
||||
//企业状态名称
|
||||
@ApiModelProperty(value = "企业状态名称")
|
||||
private String corpStateName;
|
||||
//资产总额(万元)
|
||||
@ApiModelProperty(value = "资产总额(万元)")
|
||||
private Double totalassets;
|
||||
private BigDecimal totalAssets;
|
||||
//注册资金(万元)
|
||||
@ApiModelProperty(value = "注册资金(万元)")
|
||||
private BigDecimal regcapital;
|
||||
|
|
@ -87,10 +87,10 @@ public class CorpInfoDO extends BaseDO {
|
|||
private String addressOffice;
|
||||
//固定资产
|
||||
@ApiModelProperty(value = "固定资产")
|
||||
private Double fixedAssets;
|
||||
private BigDecimal fixedAssets;
|
||||
//年产值
|
||||
@ApiModelProperty(value = "年产值")
|
||||
private Double yearOutputValue;
|
||||
private BigDecimal yearOutputValue;
|
||||
//经济类型
|
||||
@ApiModelProperty(value = "经济类型")
|
||||
private String ecoType;
|
||||
|
|
@ -111,7 +111,7 @@ public class CorpInfoDO extends BaseDO {
|
|||
private Integer scaleType;
|
||||
//占地面积
|
||||
@ApiModelProperty(value = "占地面积")
|
||||
private Double areaCovered;
|
||||
private BigDecimal areaCovered;
|
||||
//职工人数
|
||||
@ApiModelProperty(value = "职工人数")
|
||||
private Integer employees;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
package com.zcloud.basic.info.persistence.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:06
|
||||
*/
|
||||
@Data
|
||||
@TableName("img_files")
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ImgFilesDO extends BaseDO {
|
||||
//业务主键id
|
||||
@ApiModelProperty(value = "业务主键id")
|
||||
private String imgFilesId;
|
||||
//路径
|
||||
@ApiModelProperty(value = "路径")
|
||||
private String filePath;
|
||||
//类型,参考 com.zcloud.imgfiles.enums.filetype
|
||||
@ApiModelProperty(value = "类型,参考 com.zcloud.imgfiles.enums.filetype")
|
||||
private Integer type;
|
||||
//外键
|
||||
@ApiModelProperty(value = "外键")
|
||||
private String foreignKey;
|
||||
//附件名称
|
||||
@ApiModelProperty(value = "附件名称")
|
||||
private String fileName;
|
||||
//企业id
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private Long corpinfoId;
|
||||
|
||||
public ImgFilesDO(String imgFilesId) {
|
||||
this.imgFilesId = imgFilesId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.zcloud.basic.info.persistence.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zcloud.basic.info.persistence.dataobject.ImgFilesDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:07
|
||||
*/
|
||||
@Mapper
|
||||
public interface ImgFilesMapper extends BaseMapper<ImgFilesDO> {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.zcloud.basic.info.persistence.repository;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||
import com.zcloud.basic.info.persistence.dataobject.ImgFilesDO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:07
|
||||
*/
|
||||
public interface ImgFilesRepository extends BaseRepository<ImgFilesDO> {
|
||||
PageResponse<ImgFilesDO> listPage(Map<String,Object> parmas);
|
||||
|
||||
|
||||
List<ImgFilesDO> listAll(Map<String,Object> parmas);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.zcloud.basic.info.persistence.repository.impl;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||
import com.zcloud.basic.info.persistence.dataobject.ImgFilesDO;
|
||||
import com.zcloud.basic.info.persistence.mapper.ImgFilesMapper;
|
||||
import com.zcloud.basic.info.persistence.repository.ImgFilesRepository;
|
||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||
import com.zcloud.gbscommon.utils.Query;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* web-infrastructure
|
||||
*
|
||||
* @Author zhangyue
|
||||
* @Date 2025-10-30 16:10:07
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ImgFilesRepositoryImpl extends BaseRepositoryImpl<ImgFilesMapper, ImgFilesDO> implements ImgFilesRepository {
|
||||
private final ImgFilesMapper imgFilesMapper;
|
||||
|
||||
@Override
|
||||
public PageResponse<ImgFilesDO> listPage(Map<String, Object> parmas) {
|
||||
IPage<ImgFilesDO> iPage = new Query<ImgFilesDO>().getPage(parmas);
|
||||
QueryWrapper<ImgFilesDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, parmas);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
IPage<ImgFilesDO> result = imgFilesMapper.selectPage(iPage, queryWrapper);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ImgFilesDO> listAll(Map<String, Object> parmas) {
|
||||
QueryWrapper<ImgFilesDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, parmas);
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
// queryWrapper.select("id", "img_files_id", "file_path", "type", "foreign_key", "file_name", "corpinfo_id");
|
||||
return imgFilesMapper.selectList(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.basic.info.persistence.mapper.CorpFormMapper">
|
||||
|
||||
|
||||
<select id="selectListByType" resultType="com.zcloud.basic.info.persistence.dataobject.CorpFormDO">
|
||||
SELECT
|
||||
f.type,
|
||||
f.info_id AS infoId,
|
||||
f.item_code AS itemCode,
|
||||
f.item_name AS itemName,
|
||||
c.corp_name AS corpName
|
||||
FROM
|
||||
corp_form f
|
||||
LEFT JOIN corp_info c ON f.info_id = c.id
|
||||
WHERE
|
||||
f.info_id = #{infoId} and f.delete_enum='false'
|
||||
AND f.type IN
|
||||
<foreach collection="typeList" item="type" open="(" close=")" separator=",">
|
||||
#{type}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.basic.info.persistence.mapper.CorpInfoMapper">
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.basic.info.persistence.mapper.CorpQualificationInfoMapper">
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.basic.info.persistence.mapper.DepartmentMapper">
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.basic.info.persistence.mapper.PostMapper">
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.basic.info.persistence.mapper.RiskPointMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.basic.info.persistence.mapper.SysUserMapper">
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.basic.info.persistence.mapper.UserQualificationInfoMapper">
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue