package com.changhong.epc.tenant.controller.system.math; import java.util.List; import java.util.Map; import javax.annotation.Resource; import com.changhong.epc.bean.tenant.cost.CostFromMapping; import com.changhong.epc.tenant.mapper.tenant.system.math.SystemMathMapper; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import com.changhong.epc.bean.count.system.SystemMath; import com.changhong.epc.bean.count.system.SystemMathExtend; import com.changhong.epc.constter.tenant.TenantUrlConst; import com.changhong.epc.tenant.service.system.math.SystemMathService; /** * 系统变量 * * @author liush */ @RestController public class SystemMathController implements TenantUrlConst { @Resource(name = "systemMathServiceImpl") private SystemMathService systemMathService; /** * 查询系统变量及其对应的参数 * * @return */ @PostMapping(REST_TENANT_SYSTEM_MATH_SYSTEMMATH_SELECTLISTS) public List selectAllSysMathEx() { return systemMathService.selectAllSystemMathExtend(); } /** * 查询引用公式 * * @param systemMath * @return */ @PostMapping(REST_TENANT_SYSTEM_MATH_SYSTEMMATH_SELECTLISTNAME) public List selectListName() { return systemMathService.selectSystemMathNameList(); } /** * 接收系统变量拓展类 插入系统变量及其参数 * * @param systemMathExtend * @return */ @PostMapping(REST_TENANT_SYSTEM_MATH_SYSTEMMATH_INSERT) public Integer insert(@RequestBody SystemMathExtend systemMathExtend) { return systemMathService.insert(systemMathExtend); } /** * 接收系统变量拓展类更新系统变量及其参数 * * @param systemMathExtend * @return */ @PostMapping(REST_TENANT_SYSTEM_MATH_SYSTEMMATH_UPDATESELECTIVE) public Integer update(@RequestBody SystemMathExtend systemMathExtend) { return systemMathService.updateByPrimaryKey(systemMathExtend); } /** * 接收系统变量拓展类删除系统变量及其参数 * * @param systemMathExtend * @return */ @PostMapping(REST_TENANT_SYSTEM_MATH_SYSTEMMATH_DELETE) public Integer delete(@RequestBody SystemMathExtend systemMathExtend) { return systemMathService.deleteByPrimaryKey(systemMathExtend); } /** * 获得公式 * * @return */ @PostMapping(REST_TENANT_SYSTEM_MATH_SYSTEMMATH_GETFUNCTION) public List> getFunction() { return systemMathService.getFunction(); } /** * 通过表单id获取费用类型 * @param costFromMapping * @return */ @PostMapping(REST_TENANT_COST_TYPE_BY_FORMID) public Map getCostType(@RequestBody Map map) { System.out.println(map); return systemMathService.getCostTypeByFormId(map); } }