开发流程与工序数据回显功能。优化修改和新增,优化显示
parent
129521de6e
commit
685a9c5867
|
@ -1,16 +1,26 @@
|
|||
package com.wangziyang.mes.basedata.mapper;
|
||||
|
||||
import com.wangziyang.mes.basedata.entity.SpFlowOperRelation;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.wangziyang.mes.basedata.entity.SpFlowOperRelation;
|
||||
import com.wangziyang.mes.basedata.vo.SpOperVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author WangZiYang
|
||||
* @since 2020-03-14
|
||||
*/
|
||||
public interface SpFlowOperRelationMapper extends BaseMapper<SpFlowOperRelation> {
|
||||
/**
|
||||
* 根据流程ID查询下挂的全部工序
|
||||
*
|
||||
* @return 工序关系集合
|
||||
*/
|
||||
List<SpOperVo> queryOperRelationByFlowId(@Param("flowId") String flowId);
|
||||
|
||||
}
|
||||
|
|
|
@ -46,6 +46,11 @@ public class SpFlowOperRelationServiceImpl extends ServiceImpl<SpFlowOperRelatio
|
|||
*/
|
||||
@Autowired
|
||||
public ISpOperService iSpOperService;
|
||||
/**
|
||||
* 流程与工序关系
|
||||
*/
|
||||
@Autowired
|
||||
public SpFlowOperRelationMapper spFlowOperRelationMapper;
|
||||
|
||||
/**
|
||||
* 全部工序集合
|
||||
|
@ -75,8 +80,7 @@ public class SpFlowOperRelationServiceImpl extends ServiceImpl<SpFlowOperRelatio
|
|||
*/
|
||||
@Override
|
||||
public List<SpOperVo> currentOperViewServer(String flowId) throws Exception {
|
||||
|
||||
return null;
|
||||
return spFlowOperRelationMapper.queryOperRelationByFlowId(flowId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,4 +2,23 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.wangziyang.mes.basedata.mapper.SpFlowOperRelationMapper">
|
||||
|
||||
<resultMap id="ResultVoMap" type="com.wangziyang.mes.basedata.vo.SpOperVo">
|
||||
<result column="oper_id" property="value" jdbcType="VARCHAR"/>
|
||||
<result column="oper" property="title" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!--查询编码规则明细分页信息-->
|
||||
<select id="queryOperRelationByFlowId" parameterType="string"
|
||||
resultMap="ResultVoMap">
|
||||
SELECT
|
||||
oper_id,
|
||||
oper
|
||||
FROM
|
||||
sp_flow_oper_relation
|
||||
<where>
|
||||
flow_id = #{flowId}
|
||||
</where>
|
||||
ORDER BY sort_num
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -18,7 +18,7 @@ body {
|
|||
}
|
||||
|
||||
/**必填红点 */
|
||||
.splayui-form .layui-form-item > .sp-required:after {
|
||||
.splayui-form .layui-form-item .sp-required:after {
|
||||
content: "*";
|
||||
color: red;
|
||||
position: absolute;
|
||||
|
|
|
@ -65,26 +65,35 @@
|
|||
transfer = layui.transfer;
|
||||
var requestParmaArr = [];
|
||||
//模拟数据
|
||||
data2 = [];
|
||||
allOpers = [];
|
||||
currentOpers = [];
|
||||
//初始化全部工序
|
||||
<#list allOper as oper >
|
||||
oper = {};
|
||||
oper.value = '${oper.value}';
|
||||
oper.title = '${oper.title}';
|
||||
data2.push(oper);
|
||||
allOper = {};
|
||||
allOper.value = '${oper.value}';
|
||||
allOper.title = '${oper.title}';
|
||||
allOpers.push(allOper);
|
||||
</#list>
|
||||
//初始右侧数据
|
||||
//初始化当前流程下挂的工序
|
||||
if ('${flow.id}') {
|
||||
<#list currentOper as oper >
|
||||
currentOpers.push('${oper.value}');
|
||||
</#list>
|
||||
}
|
||||
|
||||
//初始穿梭框数据
|
||||
transfer.render({
|
||||
elem: '#js-shuttle',
|
||||
title: ['全部工序', '当前Flow下工序']
|
||||
, data: data2
|
||||
, value: ["1", "3", "5", "7", "9", "11"]
|
||||
, data: allOpers
|
||||
, value: currentOpers
|
||||
, id: 'keyFlow' //定义唯一索引
|
||||
});
|
||||
|
||||
//批量办法定事件
|
||||
//获取右侧数据
|
||||
util.event('lay-demoTransferActive', {
|
||||
getData: function (othis) {
|
||||
var getData = transfer.getData('keyFlow'); //获取右侧数据
|
||||
var getData = transfer.getData('keyFlow');
|
||||
requestParmaArr = getData;
|
||||
}
|
||||
, reload: function () {
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
{{# layui.each(d, function(index, item){ }}
|
||||
{{# if(item.mustFill === 'Y'){ }}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label sp-required">{{item.fieldDesc}}</label>
|
||||
<label class="layui-form-label sp-required">{{item.fieldDesc}}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input id="{{item.field}}" name="{{item.field}}" type="text" class="layui-input " lay-verify="required">
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue