package com.changhong.epc.tenant.controller.norm;
|
|
import com.changhong.epc.bean.tenant.master.MasterDefine;
|
import com.changhong.epc.bean.tenant.master.extend.MasterDefinesExtend;
|
import com.changhong.epc.constter.tenant.TenantUrlConst;
|
import com.changhong.epc.tenant.service.norm.impl.MasterDefineServiceImpl;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import javax.annotation.Resource;
|
import java.util.List;
|
|
@RestController
|
public class MasterDefineController implements TenantUrlConst {
|
|
@Autowired
|
private MasterDefineServiceImpl masterDefineService;
|
|
/**
|
* 查询主数据维度
|
*/
|
@PostMapping(REST_TENANT_MASTERTYPE_SELECT)
|
public List<MasterDefine> selectByQuery(@RequestBody MasterDefine masterDefine){
|
return masterDefineService.selectByQuery(masterDefine);
|
}
|
|
/**
|
* 查询所有主数据列表
|
* @return
|
*/
|
@PostMapping(REST_TENANT_MASTERTYPE_SELECTALLMASTER)
|
public List<MasterDefine> selectAllMaster() {
|
return masterDefineService.selectAllMaster();
|
}
|
|
/**
|
* 查询所有主数据下所有元素
|
*/
|
@PostMapping(REST_TENANT_MASTERTYPE_SELECTELE)
|
public List<MasterDefinesExtend> selectEle(@RequestBody MasterDefine masterDefine){
|
return masterDefineService.selectEle(masterDefine);
|
}
|
|
/**
|
* 查询所有主数据下所有元素
|
*/
|
@PostMapping(REST_TENANT_MASTERTYPE_SELECTNAME)
|
public List<MasterDefinesExtend> selectName(@RequestBody MasterDefine masterDefine){
|
return masterDefineService.selectName(masterDefine);
|
}
|
|
|
/**
|
* 自用,票据取值公式表
|
*/
|
@PostMapping("/syn/master")
|
public int synMaster(@RequestBody MasterDefine master){
|
return masterDefineService.synMaster(master);
|
}
|
|
/**
|
* 查询可配置
|
*/
|
@PostMapping(REST_TENANT_MASTERTYPE_SELECTCONFIGMASTER)
|
public List<MasterDefine> selectAllConfigM() {
|
MasterDefine master =new MasterDefine();
|
master.setConfigType("4");
|
return masterDefineService.selectAllConfigM(master);
|
}
|
|
|
}
|