Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "update" #140

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public OperatorController(IOperatorService operatorService) {
this.operatorService = operatorService;
}

@PostMapping("pageList")
public Response<Page<OperatorVO>> getOperatorPageList(@RequestBody QueryOperatorDTO queryOperatorDTO) {
return operatorService.getOperatorPageList(queryOperatorDTO);
@PostMapping("list")
public Response<Page<OperatorVO>> getOperatorList(@RequestBody QueryOperatorDTO queryOperatorDTO) {
return operatorService.getOperatorList(queryOperatorDTO);
}

@PostMapping("addOrUpdate")
Expand All @@ -40,8 +40,4 @@ public Response<String> updateOperatorStatus(@RequestParam("ids") List<Long> ids
return operatorService.updateOperatorStatus(ids, status);
}

@GetMapping("list/{type}")
public Response<List<OperatorVO>> getOperatorList(@PathVariable String type) {
return operatorService.getOperatorListByType(type);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,4 @@ public void exportExcel(@RequestParam("type") String type, HttpServletResponse r
public Response<List<String>> uploadOss(@RequestParam("files") List<MultipartFile> files) {
return commonService.uploadOss(files);
}

@GetMapping("nextId/{type}")
public Response<String> nextId(@PathVariable String type) {
return commonService.generateSnowflakeId(type);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public FinancialAccountController(IFinancialAccountService accountService) {
this.accountService = accountService;
}

@PostMapping("pageList")
public Response<Page<AccountVO>> getAccountPageList(@RequestBody QueryAccountDTO queryAccountDTO) {
return accountService.getAccountPageList(queryAccountDTO);
@PostMapping("list")
public Response<Page<AccountVO>> getAccountList(@RequestBody QueryAccountDTO queryAccountDTO) {
return accountService.getAccountList(queryAccountDTO);
}

@PostMapping("addOrUpdate")
Expand All @@ -53,8 +53,4 @@ public Response<String> updateAccountStatus(@RequestParam("ids") List<Long> ids,
return accountService.updateAccountStatus(ids, status);
}

@GetMapping("list")
public Response<List<AccountVO>> getAccountList() {
return accountService.getAccountList();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("/financial/advance-charge")
@RequestMapping("/financial/advanceCharge")
class AdvanceChargeController(private val advanceChargeService: AdvanceChargeService) {

@PostMapping("addOrUpdate")
fun addOrUpdateAdvanceCharge(@RequestBody advanceChargeDTO: AddOrUpdateAdvanceChargeDTO): Response<String> {
return advanceChargeService.addOrUpdateAdvanceCharge(advanceChargeDTO)
}

@PostMapping("pageList")
@PostMapping("getPageList")
fun getAdvanceChargePageList(@RequestBody advanceChargeDTO: QueryAdvanceChargeDTO) : Response<Page<AdvanceChargeVO>> {
return advanceChargeService.getAdvanceChargePageList(advanceChargeDTO)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class SysFile implements Serializable {
@TableId(value = "id", type = IdType.NONE)
private Long id;

private String uid;
private String uId;

private String fileName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
*/
package com.wansenai.bo

import com.fasterxml.jackson.annotation.JsonFormat
import com.fasterxml.jackson.databind.annotation.JsonSerialize
import com.wansenai.NoArg
import lombok.Data
import java.math.BigDecimal
Expand All @@ -22,12 +20,10 @@ import java.math.BigDecimal
@Data
data class AdvanceChargeDataBO(

@JsonFormat(shape = JsonFormat.Shape.STRING)
val accountId: Long,

val accountName: String,

@JsonSerialize(using = BigDecimalSerializerBO::class)
val amount : BigDecimal,

val remark : String? = null,
Expand Down
4 changes: 0 additions & 4 deletions core/domain/src/main/kotlin/com/wansenai/bo/FileDataBO.kt
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
package com.wansenai.bo

import com.fasterxml.jackson.annotation.JsonFormat
import com.wansenai.NoArg
import lombok.Data

@Data
@NoArg
data class FileDataBO(

@JsonFormat(shape = JsonFormat.Shape.STRING)
var id: Long? = null,

var uid: String? = null,

var fileName : String,

var fileUrl : String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ import java.time.LocalDateTime
@Data
data class AdvanceChargeDetailVO (

@JsonFormat(shape = JsonFormat.Shape.STRING)
var memberId: Long? = null,

var memberName: String? = null,

var receiptNumber: String,
Expand All @@ -38,9 +35,6 @@ data class AdvanceChargeDetailVO (

var financialPersonnel: String,

@JsonFormat(shape = JsonFormat.Shape.STRING)
var financialPersonnelId: Long? = null,

@JsonSerialize(using = BigDecimalSerializerBO::class)
var totalAmount : BigDecimal,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public void addInterceptors(InterceptorRegistry registry) {
.excludePathPatterns("/user/login")
.excludePathPatterns("/user/mobileLogin")
.excludePathPatterns("/user/updatePassword")
.excludePathPatterns("/v2/common/sms/{type}/{phoneNumber}")
.excludePathPatterns("/v2/common/nextId/{type}");
.excludePathPatterns("/v2/common/sms/{type}/{phoneNumber}");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

public interface IOperatorService extends IService<Operator> {

Response<Page<OperatorVO>> getOperatorPageList(QueryOperatorDTO queryOperatorDTO);
Response<Page<OperatorVO>> getOperatorList(QueryOperatorDTO queryOperatorDTO);

Response<String> addOrUpdateOperator(AddOrUpdateOperatorDTO addOrUpdateOperatorDTO);

Expand All @@ -34,5 +34,5 @@ public interface IOperatorService extends IService<Operator> {

Operator getOperatorById(Long id);

Response<List<OperatorVO>> getOperatorListByType(String type);

}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public OperatorServiceImpl(OperatorMapper operatorMapper, BaseService baseServic
}

@Override
public Response<Page<OperatorVO>> getOperatorPageList(QueryOperatorDTO queryOperatorDTO) {
public Response<Page<OperatorVO>> getOperatorList(QueryOperatorDTO queryOperatorDTO) {
var result = new Page<OperatorVO>();
var operatorVOS = new ArrayList<OperatorVO>();

Expand Down Expand Up @@ -139,28 +139,4 @@ public Operator getOperatorById(Long id) {
}
return getById(id);
}

@Override
public Response<List<OperatorVO>> getOperatorListByType(String type) {
if(!StringUtils.hasLength(type)) {
return Response.responseMsg(BaseCodeEnum.PARAMETER_NULL);
}

var operatorVOS = new ArrayList<OperatorVO>();
var operator = lambdaQuery()
.eq(Operator::getType, type)
.eq(Operator::getStatus, CommonConstants.STATUS_NORMAL)
.eq(Operator::getDeleteFlag, CommonConstants.NOT_DELETED)
.list();

if (operator.isEmpty()) {
return Response.responseMsg(BaseCodeEnum.QUERY_DATA_EMPTY);
}
operator.forEach(item -> {
OperatorVO operatorVO = new OperatorVO();
BeanUtils.copyProperties(item, operatorVO);
operatorVOS.add(operatorVO);
});
return Response.responseData(operatorVOS);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,4 @@ public interface CommonService {
File exportExcel(String type);

Response<List<String>> uploadOss(List<MultipartFile> files);

Response<String> generateSnowflakeId(String type);
}
Original file line number Diff line number Diff line change
Expand Up @@ -640,50 +640,14 @@ public Response<List<String>> uploadOss(List<MultipartFile> files) {
keys.add("temp" + "_" + SnowflakeIdUtil.nextId() + "_" + file.getOriginalFilename());
});
var result = instance.uploadBatch(FileUtil.convertMultipartFilesToFiles(files), keys);
log.info("上传文件信息: " + result);
log.info("上传图片信息: " + result);
return Response.responseData(result);
}catch (Exception e) {
log.error("上传文件失败: " + e.getMessage());
log.error("上传图片失败: " + e.getMessage());
return Response.responseMsg(BaseCodeEnum.FILE_UPLOAD_ERROR);
}
}

@Override
public Response<String> generateSnowflakeId(String type) {
if (!StringUtils.hasText(type)) {
return Response.responseMsg(BaseCodeEnum.SNOWFLAKE_ID_GENERATE_ERROR);
}
var id = SnowflakeIdUtil.nextId();
StringBuilder idStr = new StringBuilder(String.valueOf(id));
var idLength = idStr.length();
if (idLength < 18) {
var zero = 18 - idLength;
for (int i = 0; i < zero; ++i) {
idStr.insert(0, "0");
}
}
var idPrefix = switch (type) {
case "供应商" -> "S";
case "客户" -> "C";
case "会员" -> "V";
case "商品" -> "P";
case "订单" -> "O";
case "采购单" -> "CGD";
case "销售单" -> "XSD";
case "退货单" -> "THD";
case "入库单" -> "RKD";
case "出库单" -> "CKD";
case "调拨单" -> "DBD";
case "盘点单" -> "PDD";
case "报损单" -> "BSD";
case "报溢单" -> "BZD";
case "调价单" -> "DJD";
case "收预付款" -> "ACD";
default -> "";
};
return Response.responseData(idPrefix + idStr);
}

private String getCellValue(Cell cell, DataFormatter dataFormatter) {
if (cell != null) {
String value = dataFormatter.formatCellValue(cell);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@
*/
public interface IFinancialAccountService extends IService<FinancialAccount> {

Response<Page<AccountVO>> getAccountPageList(QueryAccountDTO queryAccountDTO);
Response<Page<AccountVO>> getAccountList(QueryAccountDTO queryAccountDTO);

Response<String> addOrUpdateAccount(AddOrUpdateAccountDTO addOrUpdateAccountDTO);

Response<String> deleteBatchAccount(List<Long> ids);

Response<String> updateAccountStatus(List<Long> ids, Integer status);

Response<List<AccountVO>> getAccountList();
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public FinancialAccountServiceImpl(BaseService baseService, FinancialAccountMapp


@Override
public Response<Page<AccountVO>> getAccountPageList(QueryAccountDTO queryAccountDTO) {
public Response<Page<AccountVO>> getAccountList(QueryAccountDTO queryAccountDTO) {
var result = new Page<AccountVO>();
var accountVos = new ArrayList<AccountVO>();

Expand Down Expand Up @@ -156,21 +156,4 @@ public Response<String> updateAccountStatus(List<Long> ids, Integer status) {

return Response.responseMsg(FinancialCodeEnum.UPDATE_ACCOUNT_STATUS_SUCCESS);
}

@Override
public Response<List<AccountVO>> getAccountList() {
var accountList = lambdaQuery()
.eq(FinancialAccount::getDeleteFlag, CommonConstants.NOT_DELETED)
.list();
if(accountList.isEmpty()) {
return Response.responseMsg(BaseCodeEnum.QUERY_DATA_EMPTY);
}
var accountVos = new ArrayList<AccountVO>();
accountList.forEach(item -> {
AccountVO accountVO = new AccountVO();
BeanUtils.copyProperties(item, accountVO);
accountVos.add(accountVO);
});
return Response.responseData(accountVos);
}
}
Loading