Commit 19e0489c authored by wei's avatar wei 🎱

保存编码

parent cc84e35e
......@@ -58,6 +58,11 @@ public class ExtSupplierManageController<V extends ExtSupplierManageVO, S extend
}
}
@ApiOperation("供应商走已过期状态更新供方编号")
@PostMapping({"generateSupplierNumber"})
public ApiResult generateSupplierNumber(@RequestBody ExtSupplierManageVO extSupplierManageVO) {
return ApiResult.ok(extSupplierManageService.generateSupplierNumber(extSupplierManageVO), "更新供方编号成功");
}
}
......@@ -21,4 +21,6 @@ public interface ExtSupplierManageService<V extends ExtSupplierManageVO> extends
DxPageImpl earlyWarning(SearchQueryCondition searchQueryCondition, int warningDay);
List<SupplierEarlyWarningVO> exportEarlyWarningData(SearchQueryCondition searchQueryCondition, int warningDay);
String generateSupplierNumber(ExtSupplierManageVO extSupplierManageVO);
}
......@@ -104,18 +104,15 @@ public class ExtSupplierManageServiceImpl<V extends ExtSupplierManageVO> impleme
return recursion;
}
/**
* 走已过期更新供方编号
* @param extSupplierManageVO
* @return
*/
public String generateEncode(ExtSupplierManageVO extSupplierManageVO) {
@Override
public String generateSupplierNumber(ExtSupplierManageVO extSupplierManageVO) {
String supplierNumber = extSupplierManageVO.getSupplierNumber();
log.info("generateEncode.beforeSupplierNumber={}", supplierNumber);
String[] split = supplierNumber.split("-");
if (split.length > 2) {
supplierNumber = split[0] + "-" + split[1] + "-" + Year.now().getValue();
}
this.saveRecursion((V) extSupplierManageVO);
log.info("generateEncode.supplierNumber={}", supplierNumber);
return supplierNumber;
}
......
package com.yonde.dcs.plan.entity.po;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yonde.dex.basedata.entity.annotation.DexEmbedded;
import com.yonde.dex.dao.entity.base.DxIdEntityEmbeddable;
import com.yonde.dex.dao.entity.base.IdEntity;
......@@ -124,6 +125,11 @@ public class ExtSupplierManage extends IdOnlyEntity implements DxObjFileLinkHold
* 统一社会信用引用代码
*/
private String unifiedSocietyCode;
/**
* 供方系统默认编号
*/
private String supplierNumber;
}
......@@ -2,6 +2,7 @@ package com.yonde.dcs.plan.feign;
import com.yonde.dcs.plan.common.vo.ExtSupplierManageVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import com.yonde.dcs.plan.feign.shadow.ExtSupplierManageServiceFeignShadow;
......@@ -16,4 +17,8 @@ import com.yonde.dcs.plan.feign.shadow.ExtSupplierManageServiceFeignShadow;
@FeignClient(value = "${dcs.feign.INET-PLAN}", path = "/ExtSupplierManage")
public interface ExtSupplierManageServiceFeign<V extends ExtSupplierManageVO> extends ExtSupplierManageServiceFeignShadow<V> {
@ApiOperation("供应商走已过期状态更新供方编号")
@PostMapping(value = "/generateSupplierNumber")
String generateSupplierNumber(@RequestBody ExtSupplierManageVO extSupplierManageVO);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment