package com.changhong.epc.admin.controller.site; import com.changhong.epc.admin.service.site.MasterDefaultMappingService; import com.changhong.epc.bean.admin.MasterDefaultMapping; import com.changhong.epc.bean.admin.MasterElementMapping; import com.changhong.epc.bean.admin.MasterValueToCode; import com.changhong.epc.bean.tenant.master.MasterDefine; import com.changhong.epc.bean.tenant.master.MasterValue; import com.changhong.epc.constter.admin.AdminUrlConst; 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; import java.util.Map; @RestController public class MasterDefaultMappingController implements AdminUrlConst{ @Resource private MasterDefaultMappingService masterDefault; /** * 查询是否有关联映射 * @param master * @return */ @PostMapping(MASTER_SELECT) public List> selectCode(@RequestBody MasterDefine master){ return masterDefault.selectCode(master); } /** * 查询主数据映射 * @param * @return */ @PostMapping(MASTER_SELECTMASTERDEFAULT) public MasterDefaultMapping selectMasterDefault(@RequestBody MasterDefine master) { return masterDefault.selectMasterDefault(master.getCode()); } @PostMapping(MASTER_DEF_MAPPING_LIST) public List selectMasterDefMappingList(){ return masterDefault.selectMasterDefMappingList(); } /** * 查询主数据映射字段 * @param mdm * @return */ @PostMapping(MASTER_SELECTMASTERELEMENT) public List selectMasterElement(@RequestBody MasterDefaultMapping mdm ) { return masterDefault.selectMasterElement(mdm); } /** * Code转Value */ @PostMapping(MASTER_CODECONVALUE) public MasterValue CodeConValue(@RequestBody MasterValueToCode con){ return masterDefault.CodeConValue(con); } /** * value转code */ @PostMapping(MASTER_VALUECONCODE) public MasterValue ValueConCode(@RequestBody MasterValueToCode con){ return masterDefault.ValueConCode(con); } /** * 获取映射主数据字段,code */ @PostMapping(MASTER_GETFIELDORCODE) public Map getFieldOrCode(@RequestBody MasterDefine master){ return masterDefault.getFieldOrCode(master.getCode()); } /** * 插入数值MasterDefine * */ @PostMapping(MASTER_INSERTMASTERDEFAULT) public int insertMasterDefine(@RequestBody MasterDefaultMapping mdm ){ return masterDefault.insertMasterDefault(mdm); } /** * 更新字段MasterDefine * */ @PostMapping(MASTER_UPDATEMASTERDEFAULT) public int updateMasterDefine(@RequestBody MasterDefaultMapping mdm){ return masterDefault.updateMasterDefault(mdm); } /** * 插入数值MasterElementMapping * */ @PostMapping(MASTER_INSERTMASTERElEMENT) public int insertMasterElementMapping(@RequestBody List masterElementMapping ){ return masterDefault.insertMasterElement(masterElementMapping); } /** * 更新字段MasterElementMapping * */ @PostMapping(MASTER_UPDATEMASTERElEMENT) public int updateMasterElementMapping(@RequestBody MasterElementMapping masterElementMapping){ return masterDefault.updateMasterElement(masterElementMapping); } }