已经完成

所有增删改查
master
森屿海巷 4 years ago
parent b4bb8067cf
commit f9450eefd3

@ -2,6 +2,8 @@ package com.ruoyi.web.controller.basic;
import java.util.List; import java.util.List;
import com.ruoyi.system.domain.BaseEfficiencyLevel;
import com.ruoyi.system.service.IBaseEfficiencyLevelService;
import com.ruoyi.web.controller.tool.UUIDTool; import com.ruoyi.web.controller.tool.UUIDTool;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -36,6 +38,9 @@ public class BaseLocationInfoController extends BaseController
@Autowired @Autowired
private IBaseLocationInfoService baseLocationInfoService; private IBaseLocationInfoService baseLocationInfoService;
@Autowired
private IBaseEfficiencyLevelService baseEfficiencyLevelService;
@RequiresPermissions("system:baselocationinfo:view") @RequiresPermissions("system:baselocationinfo:view")
@GetMapping() @GetMapping()
public String baselocationinfo() public String baselocationinfo()
@ -74,8 +79,11 @@ public class BaseLocationInfoController extends BaseController
* *
*/ */
@GetMapping("/add") @GetMapping("/add")
public String add() public String add(ModelMap modelMap)
{ {
BaseEfficiencyLevel baseEfficiencyLevel = new BaseEfficiencyLevel();
List<BaseEfficiencyLevel> baseEfficiencyLevels = baseEfficiencyLevelService.selectBaseEfficiencyLevelList(baseEfficiencyLevel);
modelMap.put("baseEfficiencyLevels",baseEfficiencyLevels);
return prefix + "/add"; return prefix + "/add";
} }

@ -537,6 +537,20 @@ var table = {
}); });
return actions.join(''); return actions.join('');
}, },
selectDictLabelss: function(datas, value) {
if ($.common.isEmpty(datas) || $.common.isEmpty(value)) {
return '';
}
var actions = [];
$.each(datas, function(index, dict) {
if (dict.dictValue == ('' + value)) {
var listClass = $.common.equals("default", dict.listClass) || $.common.isEmpty(dict.listClass) ? "" : "badge badge-" + dict.listClass;
actions.push($.common.sprintf("<span class='%s'>%s</span>", listClass, dict.dictLabel));
return false;
}
});
return actions.join('');
},
// 回显数据字典(字符串数组) // 回显数据字典(字符串数组)
selectDictLabels: function(datas, value, separator) { selectDictLabels: function(datas, value, separator) {
if ($.common.isEmpty(datas) || $.common.isEmpty(value)) { if ($.common.isEmpty(datas) || $.common.isEmpty(value)) {

@ -63,10 +63,15 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">效率级别:</label> <label class="col-sm-3 control-label">效率级别:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="efficiency" class="form-control" type="text"> <!--<input name="efficiency" class="form-control" type="text">-->
<select name="efficiency" id="efficiency" class="form-control m-b" required>
<option th:each="baseEfficiencyLevels: ${baseEfficiencyLevels}" th:text="${baseEfficiencyLevels.levelName}" th:value="${baseEfficiencyLevels.efficiencyLevel}"></option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

@ -57,6 +57,8 @@
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:baselocationinfo:edit')}]]; var editFlag = [[${@permission.hasPermi('system:baselocationinfo:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:baselocationinfo:remove')}]]; var removeFlag = [[${@permission.hasPermi('system:baselocationinfo:remove')}]];
var locationStatusDatas = [[${@dict.getType('location_status')}]]; var locationStatusDatas = [[${@dict.getType('location_status')}]];
var prefix = ctx + "system/baselocationinfo"; var prefix = ctx + "system/baselocationinfo";
@ -118,6 +120,7 @@
{ {
field: 'efficiency', field: 'efficiency',
title: '效率级别' title: '效率级别'
}, },
{ {
field: 'remark', field: 'remark',

@ -50,7 +50,7 @@ public class PermissionService
} }
/** /**
* hiddenBoolean使hasAnyPermissions * `hiddenBoolean使hasAnyPermissions
* *
* @param permissions PERMISSION_NAMES_DELIMETER * @param permissions PERMISSION_NAMES_DELIMETER
* @return * @return

@ -58,4 +58,12 @@ public interface BaseLocationInfoMapper
* @return * @return
*/ */
public int deleteBaseLocationInfoByObjids(String[] objids); public int deleteBaseLocationInfoByObjids(String[] objids);
/**
*
*
* @param baseLocationInfo
* @return
*/
public List<BaseLocationInfo> selectBaseLocationInfoListByTable();
} }

@ -27,6 +27,9 @@ public interface IBaseLocationInfoService
*/ */
public List<BaseLocationInfo> selectBaseLocationInfoList(BaseLocationInfo baseLocationInfo); public List<BaseLocationInfo> selectBaseLocationInfoList(BaseLocationInfo baseLocationInfo);
/** /**
* *
* *

@ -14,7 +14,7 @@ import com.ruoyi.common.core.text.Convert;
* @author Frank zhou * @author Frank zhou
* @date 2021-09-10 * @date 2021-09-10
*/ */
@Service @Service("baseEfficiencyLevelService")
public class BaseEfficiencyLevelServiceImpl implements IBaseEfficiencyLevelService public class BaseEfficiencyLevelServiceImpl implements IBaseEfficiencyLevelService
{ {
@Autowired @Autowired
@ -44,6 +44,8 @@ public class BaseEfficiencyLevelServiceImpl implements IBaseEfficiencyLevelServi
return baseEfficiencyLevelMapper.selectBaseEfficiencyLevelList(baseEfficiencyLevel); return baseEfficiencyLevelMapper.selectBaseEfficiencyLevelList(baseEfficiencyLevel);
} }
/** /**
* *
* *

@ -44,6 +44,8 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService
return baseLocationInfoMapper.selectBaseLocationInfoList(baseLocationInfo); return baseLocationInfoMapper.selectBaseLocationInfoList(baseLocationInfo);
} }
/** /**
* *
* *

@ -17,6 +17,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select objid, efficiency_level, level_name, efficiency, delete_flag, record_time from base_efficiency_level select objid, efficiency_level, level_name, efficiency, delete_flag, record_time from base_efficiency_level
</sql> </sql>
<select id="selectBaseEfficiencyLevelList" parameterType="BaseEfficiencyLevel" resultMap="BaseEfficiencyLevelResult"> <select id="selectBaseEfficiencyLevelList" parameterType="BaseEfficiencyLevel" resultMap="BaseEfficiencyLevelResult">
<include refid="selectBaseEfficiencyLevelVo"/> <include refid="selectBaseEfficiencyLevelVo"/>
<where> <where>

@ -25,6 +25,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select objid, location_code, location_name, material_type, store_code, location_area, location_row, location_line, location_tier, location_status, efficiency, remark, delete_flag, record_time from base_location_info select objid, location_code, location_name, material_type, store_code, location_area, location_row, location_line, location_tier, location_status, efficiency, remark, delete_flag, record_time from base_location_info
</sql> </sql>
<select id="selectBaseLocationInfoList" parameterType="BaseLocationInfo" resultMap="BaseLocationInfoResult"> <select id="selectBaseLocationInfoList" parameterType="BaseLocationInfo" resultMap="BaseLocationInfoResult">
<include refid="selectBaseLocationInfoVo"/> <include refid="selectBaseLocationInfoVo"/>
<where> <where>
@ -37,9 +40,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBaseLocationInfoByObjid" parameterType="String" resultMap="BaseLocationInfoResult"> <select id="selectBaseLocationInfoByObjid" parameterType="String" resultMap="BaseLocationInfoResult">
<include refid="selectBaseLocationInfoVo"/> <include refid="selectBaseLocationInfoVo"/>
where objid = #{objid}
</select> </select>
<insert id="insertBaseLocationInfo" parameterType="BaseLocationInfo"> <insert id="insertBaseLocationInfo" parameterType="BaseLocationInfo">
<!--<selectKey keyProperty="objid" resultType="long" order="BEFORE"> <!--<selectKey keyProperty="objid" resultType="long" order="BEFORE">
SELECT seq_base_location_info.NEXTVAL as objid FROM DUAL SELECT seq_base_location_info.NEXTVAL as objid FROM DUAL

Loading…
Cancel
Save