提交 df01222b 编写于 作者: ibizdev's avatar ibizdev

xignzi006 发布系统代码 [Spring Boot,采购]

上级 8ecf4227
......@@ -896,6 +896,152 @@ mock.onPost(new RegExp(/^\/purchase_requisition_lines\/?([a-zA-Z0-9\-\;]{0,35})\
});
// Product_change
mock.onPost(new RegExp(/^\/res_suppliers\/([a-zA-Z0-9\-\;]{1,35})\/purchase_requisitions\/([a-zA-Z0-9\-\;]{1,35})\/purchase_requisition_lines\/([a-zA-Z0-9\-\;]{1,35})\/product_change$/)).reply((config: any) => {
console.groupCollapsed("实体:purchase_requisition_line 方法: Product_change");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id','id','id'];
const matchArray:any = new RegExp(/^\/res_suppliers\/([a-zA-Z0-9\-\;]{1,35})\/purchase_requisitions\/([a-zA-Z0-9\-\;]{1,35})\/purchase_requisition_lines\/([a-zA-Z0-9\-\;]{1,35})\/product_change$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Product_change
mock.onPost(new RegExp(/^\/product_templates\/([a-zA-Z0-9\-\;]{1,35})\/product_products\/([a-zA-Z0-9\-\;]{1,35})\/purchase_requisition_lines\/([a-zA-Z0-9\-\;]{1,35})\/product_change$/)).reply((config: any) => {
console.groupCollapsed("实体:purchase_requisition_line 方法: Product_change");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id','id','id'];
const matchArray:any = new RegExp(/^\/product_templates\/([a-zA-Z0-9\-\;]{1,35})\/product_products\/([a-zA-Z0-9\-\;]{1,35})\/purchase_requisition_lines\/([a-zA-Z0-9\-\;]{1,35})\/product_change$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Product_change
mock.onPost(new RegExp(/^\/purchase_requisitions\/([a-zA-Z0-9\-\;]{1,35})\/purchase_requisition_lines\/([a-zA-Z0-9\-\;]{1,35})\/product_change$/)).reply((config: any) => {
console.groupCollapsed("实体:purchase_requisition_line 方法: Product_change");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id','id'];
const matchArray:any = new RegExp(/^\/purchase_requisitions\/([a-zA-Z0-9\-\;]{1,35})\/purchase_requisition_lines\/([a-zA-Z0-9\-\;]{1,35})\/product_change$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Product_change
mock.onPost(new RegExp(/^\/product_products\/([a-zA-Z0-9\-\;]{1,35})\/purchase_requisition_lines\/([a-zA-Z0-9\-\;]{1,35})\/product_change$/)).reply((config: any) => {
console.groupCollapsed("实体:purchase_requisition_line 方法: Product_change");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id','id'];
const matchArray:any = new RegExp(/^\/product_products\/([a-zA-Z0-9\-\;]{1,35})\/purchase_requisition_lines\/([a-zA-Z0-9\-\;]{1,35})\/product_change$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Product_change
mock.onPost(new RegExp(/^\/purchase_requisition_lines\/?([a-zA-Z0-9\-\;]{0,35})\/product_change$/)).reply((config: any) => {
console.groupCollapsed("实体:purchase_requisition_line 方法: Product_change");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/purchase_requisition_lines\/([a-zA-Z0-9\-\;]{1,35})\/product_change$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/res_suppliers\/([a-zA-Z0-9\-\;]{1,35})\/purchase_requisitions\/([a-zA-Z0-9\-\;]{1,35})\/purchase_requisition_lines\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:purchase_requisition_line 方法: Save");
......@@ -1328,15 +1474,6 @@ mock.onGet(new RegExp(/^\/purchase_requisition_lines\/fetchdefault(\?[\w-./?%&=,
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock.onDelete(new RegExp(/^\/res_suppliers\/([a-zA-Z0-9\-\;]{1,35})\/purchase_requisitions\/([a-zA-Z0-9\-\;]{1,35})\/purchase_requisition_lines\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
......
......@@ -388,6 +388,48 @@ export default class Purchase_requisition_lineServiceBase extends EntityService
return res;
}
/**
* Product_change接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Purchase_requisition_lineServiceBase
*/
public async Product_change(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.res_supplier && context.purchase_requisition && context.purchase_requisition_line){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/res_suppliers/${context.res_supplier}/purchase_requisitions/${context.purchase_requisition}/purchase_requisition_lines/${context.purchase_requisition_line}/product_change`,data,isloading);
return res;
}
if(context.product_template && context.product_product && context.purchase_requisition_line){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/product_templates/${context.product_template}/product_products/${context.product_product}/purchase_requisition_lines/${context.purchase_requisition_line}/product_change`,data,isloading);
return res;
}
if(context.purchase_requisition && context.purchase_requisition_line){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/purchase_requisitions/${context.purchase_requisition}/purchase_requisition_lines/${context.purchase_requisition_line}/product_change`,data,isloading);
return res;
}
if(context.product_product && context.purchase_requisition_line){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/product_products/${context.product_product}/purchase_requisition_lines/${context.purchase_requisition_line}/product_change`,data,isloading);
return res;
}
let res:any = Http.getInstance().post(`/purchase_requisition_lines/${context.purchase_requisition_line}/product_change`,data,isloading);
return res;
}
/**
* Save接口方法
*
......@@ -467,19 +509,4 @@ export default class Purchase_requisition_lineServiceBase extends EntityService
let res:any = Http.getInstance().get(`/purchase_requisition_lines/fetchdefault`,tempData,isloading);
return res;
}
/**
* Product_change接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof Purchase_requisition_lineServiceBase
*/
public async Product_change(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let appLogic:Product_changeLogic = new Product_changeLogic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(data))});
const res = await appLogic.onExecute(context,data,isloading?true:false);
return {status:200,data:res};
}
}
\ No newline at end of file
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /businesscentral-app-hr.jar
EXPOSE 31110
EXPOSE 8080
ADD businesscentral-app-hr.jar /businesscentral-app-hr.jar
......@@ -3,25 +3,9 @@ services:
businesscentral-app-hr:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-app-hr:latest
ports:
- "31110:31110"
- "8080:8080"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=31110
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=odoo
- SPRING_DATASOURCE_PASSWORD=odoo
- SPRING_DATASOURCE_URL=jdbc:postgresql://172.16.240.158:15432/odoo
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=org.postgresql.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=odoo
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
......@@ -83,10 +83,6 @@ zuul:
path: /ir_attachments/**
serviceId: ${ibiz.ref.service.ibizbusinesscentral-core:ibizbusinesscentral-core}
stripPrefix: false
mail_followers_mail_message_subtype_rel:
path: /mail_followers_mail_message_subtype_rels/**
serviceId: ${ibiz.ref.service.ibizbusinesscentral-core:ibizbusinesscentral-core}
stripPrefix: false
hr_skill_level:
path: /hr_skill_levels/**
serviceId: ${ibiz.ref.service.ibizbusinesscentral-core:ibizbusinesscentral-core}
......
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /businesscentral-app-invoice.jar
EXPOSE 31110
EXPOSE 8080
ADD businesscentral-app-invoice.jar /businesscentral-app-invoice.jar
......@@ -3,25 +3,9 @@ services:
businesscentral-app-invoice:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-app-invoice:latest
ports:
- "31110:31110"
- "8080:8080"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=31110
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=odoo
- SPRING_DATASOURCE_PASSWORD=odoo
- SPRING_DATASOURCE_URL=jdbc:postgresql://172.16.240.158:15432/odoo
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=org.postgresql.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=odoo
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /businesscentral-app-purchase.jar
EXPOSE 31110
EXPOSE 8080
ADD businesscentral-app-purchase.jar /businesscentral-app-purchase.jar
......@@ -3,25 +3,9 @@ services:
businesscentral-app-purchase:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-app-purchase:latest
ports:
- "31110:31110"
- "8080:8080"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=31110
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=odoo
- SPRING_DATASOURCE_PASSWORD=odoo
- SPRING_DATASOURCE_URL=jdbc:postgresql://172.16.240.158:15432/odoo
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=org.postgresql.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=odoo
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
......@@ -35,6 +35,7 @@ public interface IPurchase_requisition_lineService extends IService<Purchase_req
Purchase_requisition_line getDraft(Purchase_requisition_line et) ;
Purchase_requisition_line calc_price(Purchase_requisition_line et) ;
boolean checkKey(Purchase_requisition_line et) ;
Purchase_requisition_line product_change(Purchase_requisition_line et) ;
boolean save(Purchase_requisition_line et) ;
void saveBatch(List<Purchase_requisition_line> list) ;
Page<Purchase_requisition_line> searchDefault(Purchase_requisition_lineSearchContext context) ;
......
......@@ -192,6 +192,13 @@ public class Purchase_requisition_lineServiceImpl extends EBSServiceImpl<Purchas
public boolean checkKey(Purchase_requisition_line et) {
return (!ObjectUtils.isEmpty(et.getId()))&&(!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public Purchase_requisition_line product_change(Purchase_requisition_line et) {
product_changeLogic.execute(et);
return et ;
}
@Override
@Transactional
public boolean save(Purchase_requisition_line et) {
......
......@@ -1996,14 +1996,6 @@
"datascope":[{"id":"all","name":"全部数据"}]
}
, {
"dename":"Mail_followers_mail_message_subtype_rel",
"delogicname":"关注消息类型",
"sysmoudle":{"id":"ODOO_MAIL","name":"[ODOO]讨论"},
"dedataset":[{"id":"Default" , "name":"数据集"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}]
}
, {
"dename":"Base_import_tests_models_complex",
"delogicname":"测试:基本导入模型复合体",
"sysmoudle":{"id":"ODOO_BASE_IMPORT","name":"[ODOO]基础导入"},
......
......@@ -131,6 +131,17 @@ public class Purchase_requisition_lineResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_requisition_lineService.checkKey(purchase_requisition_lineMapping.toDomain(purchase_requisition_linedto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_requisition_line-Product_change-all')")
@ApiOperation(value = "product_change", tags = {"采购申请行" }, notes = "product_change")
@RequestMapping(method = RequestMethod.POST, value = "/purchase_requisition_lines/{purchase_requisition_line_id}/product_change")
public ResponseEntity<Purchase_requisition_lineDTO> product_change(@PathVariable("purchase_requisition_line_id") Long purchase_requisition_line_id, @RequestBody Purchase_requisition_lineDTO purchase_requisition_linedto) {
Purchase_requisition_line domain = purchase_requisition_lineMapping.toDomain(purchase_requisition_linedto);
domain.setId(purchase_requisition_line_id);
domain = purchase_requisition_lineService.product_change(domain);
purchase_requisition_linedto = purchase_requisition_lineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_requisition_linedto);
}
@PreAuthorize("hasPermission(this.purchase_requisition_lineMapping.toDomain(#purchase_requisition_linedto),'iBizBusinessCentral-Purchase_requisition_line-Save')")
@ApiOperation(value = "保存采购申请行", tags = {"采购申请行" }, notes = "保存采购申请行")
@RequestMapping(method = RequestMethod.POST, value = "/purchase_requisition_lines/save")
......@@ -265,6 +276,17 @@ public class Purchase_requisition_lineResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_requisition_lineService.checkKey(purchase_requisition_lineMapping.toDomain(purchase_requisition_linedto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_requisition_line-Product_change-all')")
@ApiOperation(value = "根据产品采购申请行", tags = {"采购申请行" }, notes = "根据产品采购申请行")
@RequestMapping(method = RequestMethod.POST, value = "/product_products/{product_product_id}/purchase_requisition_lines/{purchase_requisition_line_id}/product_change")
public ResponseEntity<Purchase_requisition_lineDTO> product_changeByProduct_product(@PathVariable("product_product_id") Long product_product_id, @PathVariable("purchase_requisition_line_id") Long purchase_requisition_line_id, @RequestBody Purchase_requisition_lineDTO purchase_requisition_linedto) {
Purchase_requisition_line domain = purchase_requisition_lineMapping.toDomain(purchase_requisition_linedto);
domain.setProductId(product_product_id);
domain = purchase_requisition_lineService.product_change(domain) ;
purchase_requisition_linedto = purchase_requisition_lineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_requisition_linedto);
}
@PreAuthorize("hasPermission(this.purchase_requisition_lineMapping.toDomain(#purchase_requisition_linedto),'iBizBusinessCentral-Purchase_requisition_line-Save')")
@ApiOperation(value = "根据产品保存采购申请行", tags = {"采购申请行" }, notes = "根据产品保存采购申请行")
@RequestMapping(method = RequestMethod.POST, value = "/product_products/{product_product_id}/purchase_requisition_lines/save")
......@@ -405,6 +427,17 @@ public class Purchase_requisition_lineResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_requisition_lineService.checkKey(purchase_requisition_lineMapping.toDomain(purchase_requisition_linedto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_requisition_line-Product_change-all')")
@ApiOperation(value = "根据采购申请采购申请行", tags = {"采购申请行" }, notes = "根据采购申请采购申请行")
@RequestMapping(method = RequestMethod.POST, value = "/purchase_requisitions/{purchase_requisition_id}/purchase_requisition_lines/{purchase_requisition_line_id}/product_change")
public ResponseEntity<Purchase_requisition_lineDTO> product_changeByPurchase_requisition(@PathVariable("purchase_requisition_id") Long purchase_requisition_id, @PathVariable("purchase_requisition_line_id") Long purchase_requisition_line_id, @RequestBody Purchase_requisition_lineDTO purchase_requisition_linedto) {
Purchase_requisition_line domain = purchase_requisition_lineMapping.toDomain(purchase_requisition_linedto);
domain.setRequisitionId(purchase_requisition_id);
domain = purchase_requisition_lineService.product_change(domain) ;
purchase_requisition_linedto = purchase_requisition_lineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_requisition_linedto);
}
@PreAuthorize("hasPermission(this.purchase_requisition_lineMapping.toDomain(#purchase_requisition_linedto),'iBizBusinessCentral-Purchase_requisition_line-Save')")
@ApiOperation(value = "根据采购申请保存采购申请行", tags = {"采购申请行" }, notes = "根据采购申请保存采购申请行")
@RequestMapping(method = RequestMethod.POST, value = "/purchase_requisitions/{purchase_requisition_id}/purchase_requisition_lines/save")
......@@ -545,6 +578,17 @@ public class Purchase_requisition_lineResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_requisition_lineService.checkKey(purchase_requisition_lineMapping.toDomain(purchase_requisition_linedto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_requisition_line-Product_change-all')")
@ApiOperation(value = "根据产品模板产品采购申请行", tags = {"采购申请行" }, notes = "根据产品模板产品采购申请行")
@RequestMapping(method = RequestMethod.POST, value = "/product_templates/{product_template_id}/product_products/{product_product_id}/purchase_requisition_lines/{purchase_requisition_line_id}/product_change")
public ResponseEntity<Purchase_requisition_lineDTO> product_changeByProduct_templateProduct_product(@PathVariable("product_template_id") Long product_template_id, @PathVariable("product_product_id") Long product_product_id, @PathVariable("purchase_requisition_line_id") Long purchase_requisition_line_id, @RequestBody Purchase_requisition_lineDTO purchase_requisition_linedto) {
Purchase_requisition_line domain = purchase_requisition_lineMapping.toDomain(purchase_requisition_linedto);
domain.setProductId(product_product_id);
domain = purchase_requisition_lineService.product_change(domain) ;
purchase_requisition_linedto = purchase_requisition_lineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_requisition_linedto);
}
@PreAuthorize("hasPermission(this.purchase_requisition_lineMapping.toDomain(#purchase_requisition_linedto),'iBizBusinessCentral-Purchase_requisition_line-Save')")
@ApiOperation(value = "根据产品模板产品保存采购申请行", tags = {"采购申请行" }, notes = "根据产品模板产品保存采购申请行")
@RequestMapping(method = RequestMethod.POST, value = "/product_templates/{product_template_id}/product_products/{product_product_id}/purchase_requisition_lines/save")
......@@ -685,6 +729,17 @@ public class Purchase_requisition_lineResource {
return ResponseEntity.status(HttpStatus.OK).body(purchase_requisition_lineService.checkKey(purchase_requisition_lineMapping.toDomain(purchase_requisition_linedto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Purchase_requisition_line-Product_change-all')")
@ApiOperation(value = "根据供应商采购申请采购申请行", tags = {"采购申请行" }, notes = "根据供应商采购申请采购申请行")
@RequestMapping(method = RequestMethod.POST, value = "/res_suppliers/{res_supplier_id}/purchase_requisitions/{purchase_requisition_id}/purchase_requisition_lines/{purchase_requisition_line_id}/product_change")
public ResponseEntity<Purchase_requisition_lineDTO> product_changeByRes_supplierPurchase_requisition(@PathVariable("res_supplier_id") Long res_supplier_id, @PathVariable("purchase_requisition_id") Long purchase_requisition_id, @PathVariable("purchase_requisition_line_id") Long purchase_requisition_line_id, @RequestBody Purchase_requisition_lineDTO purchase_requisition_linedto) {
Purchase_requisition_line domain = purchase_requisition_lineMapping.toDomain(purchase_requisition_linedto);
domain.setRequisitionId(purchase_requisition_id);
domain = purchase_requisition_lineService.product_change(domain) ;
purchase_requisition_linedto = purchase_requisition_lineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(purchase_requisition_linedto);
}
@PreAuthorize("hasPermission(this.purchase_requisition_lineMapping.toDomain(#purchase_requisition_linedto),'iBizBusinessCentral-Purchase_requisition_line-Save')")
@ApiOperation(value = "根据供应商采购申请保存采购申请行", tags = {"采购申请行" }, notes = "根据供应商采购申请保存采购申请行")
@RequestMapping(method = RequestMethod.POST, value = "/res_suppliers/{res_supplier_id}/purchase_requisitions/{purchase_requisition_id}/purchase_requisition_lines/save")
......
......@@ -37,11 +37,6 @@
git clone -b master $para2 ibizbusinesscentral/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibizbusinesscentral/
mvn clean package -Ppurchase
cd businesscentral-app/businesscentral-app-purchase
mvn -Ppurchase docker:build
mvn -Ppurchase docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/businesscentral-app-purchase.yaml iBizEE --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册