Browse Source

[feat] 工程管理

修复产品型号管理不能根据创建实现查询的问题
产品型号管理分页查询后端接口,新增根据工程师查询;新增根据创建时间降序排序
产品型号管理前端添加页面新增添加的时候自动获取登录人的姓名作为工程员
dev
liuxiaoxu 2 months ago
parent
commit
8a91faa452
  1. 19
      ruoyi-admin/src/main/resources/mapper/system/SysProductModelMapper.xml
  2. 12
      ruoyi-admin/src/main/resources/templates/system/model/add.html

19
ruoyi-admin/src/main/resources/mapper/system/SysProductModelMapper.xml

@ -43,16 +43,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)file )file
on s.pid = file.rel_id on s.pid = file.rel_id
<where> <where>
<if test="pcode != null and pcode != ''"> and pcode like concat('%', #{pcode}, '%')</if> <if test="pcode != null and pcode != ''"> and s.pcode like concat('%', #{pcode}, '%')</if>
<if test="equipModel != null and equipModel != ''"> and equipModel like concat('%', #{equipModel}, '%')</if> <if test="equipModel != null and equipModel != ''"> and s.equipModel like concat('%', #{equipModel}, '%')</if>
<if test="equipName != null and equipName != ''"> and equipName like concat('%', #{equipName}, '%')</if> <if test="equipName != null and equipName != ''"> and s.equipName like concat('%', #{equipName}, '%')</if>
<if test="specification != null and specification != ''"> and specification like concat('%', #{specification}, '%') </if> <if test="specification != null and specification != ''"> and s.specification like concat('%', #{specification}, '%') </if>
<if test="differences != null and differences != ''"> and differences like concat('%', #{differences}, '%')</if> <if test="differences != null and differences != ''"> and s.differences like concat('%', #{differences}, '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and create_time between #{params.beginCreateTime} and #{params.endCreateTime} and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if> </if>
<if test="engineer !=null and engineer != ''">engineer = #{engineer}</if> <if test="engineer !=null and engineer != ''">and s.engineer = #{engineer}</if>
</where> </where>
order by s.create_time desc
</select> </select>
<select id="selectSysProductModelById" parameterType="Long" resultMap="SysProductModelResult"> <select id="selectSysProductModelById" parameterType="Long" resultMap="SysProductModelResult">
@ -69,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pcode != null">pcode,</if> <if test="pcode != null">pcode,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="engineer != null">engineer,</if>
<if test="equipModel != null">equipModel,</if> <if test="equipModel != null">equipModel,</if>
<if test="equipName != null">equipName,</if> <if test="equipName != null">equipName,</if>
<if test="specification != null">specification,</if> <if test="specification != null">specification,</if>
@ -78,11 +80,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="photoUrl != null">photoUrl,</if> <if test="photoUrl != null">photoUrl,</if>
use_status
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="pcode != null">#{pcode},</if> <if test="pcode != null">#{pcode},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="engineer != null">#{engineer},</if>
<if test="equipModel != null">#{equipModel},</if> <if test="equipModel != null">#{equipModel},</if>
<if test="equipName != null">#{equipName},</if> <if test="equipName != null">#{equipName},</if>
<if test="specification != null">#{specification},</if> <if test="specification != null">#{specification},</if>
@ -92,7 +94,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="photoUrl != null">#{photoUrl},</if> <if test="photoUrl != null">#{photoUrl},</if>
'1'
</trim> </trim>
</insert> </insert>

12
ruoyi-admin/src/main/resources/templates/system/model/add.html

@ -32,6 +32,12 @@
<input name="differences" class="form-control" type="text" required> <input name="differences" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">工程员:</label>
<div class="col-sm-7">
<input name="engineer" id="engineer_add" class="form-control m-b" readonly required />
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">备注:</label> <label class="col-sm-4 control-label">备注:</label>
<div class="col-sm-7"> <div class="col-sm-7">
@ -64,6 +70,9 @@
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> <script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]];
new Vue({ new Vue({
el: '#app', el: '#app',
data: function() { data: function() {
@ -139,6 +148,9 @@
} }
} }
//添加工程员
$("#engineer_add").val(loginName);
</script> </script>
</body> </body>
</html> </html>
Loading…
Cancel
Save