Commit eac39b97 authored by 鲁鑫's avatar 鲁鑫

工艺设置(不包含工序物料)

parent 4b8b8f8b
var processGridManager = null;
$(document).ready(function () {
loadProcessListGrid();
bindQueryEvent();
});
function loadProcessListGrid(){
var toolbarOptions = UICtrl.getDefaultToolbarOptions({
......@@ -13,7 +14,7 @@ function loadProcessListGrid(){
action: 'technologyProcess/deleteTechnologyProcess.ajax',
param: {},
gridManager: _grid,
idFieldName: 'technologyId',
idFieldName: 'technologyProcessId',
onSuccess: function () {
reloadGrid();
}
......@@ -52,24 +53,47 @@ function loadProcessListGrid(){
type: 'text'
}
},
{display: '资源', name: "resourceName", width: 180, align: "left", type: "string",
editor: {
required: true, type: "select",
data: {
type: 'system',
name: "resourceNameGroup",
getParam: function (item) {
return {paramValue: item.processType}
},
back: {
gxmc: "resourceName",
id: "resourceId"
}
},
}
},
],
dataAction: "server",
url: web_app.name + '/technologyProcess/slicedTechnologyProcessList.ajax',
param:{technologyId:$("#technologyId").val()},
parms:{technologyId:$("#technologyId").val()},
pageSize: 20,
usePager: true,
toolbar: toolbarOptions,
enabledEdit: true,
width: "100%",
width: "98%",
height: 500,
heightDiff: -8,
checkbox: true,
fixedCellHeight: true,
selectRowButtonOnly: true,
onDblClickRow : function(data, rowindex, rowobj) {
updateHandler(data.id);
}
});
UICtrl.setSearchAreaToggle(processGridManager);
}
function bindQueryEvent() {
$('#productName').searchbox({
type: "product", name: "productCode",
onChange: function (value, data) {
$('#productId').val(data.productId);
$('#productName').val(data.productName);
}
});
}
......@@ -10,6 +10,7 @@
<div class="hg-form-row">
<x:inputC name="technologyName" required="true" label="工艺路线名称" labelCol="2" maxLength="64" fieldCol="4" />
<x:selectC name="technologyType" required="true" label="工艺类型" labelCol="2" dictionary="technologyType" fieldCol="4" />
<x:inputC name="productName" required="true" label="产品" wrapper="select" labelCol="2" maxLength="64" fieldCol="4" />
<x:inputC name="technologyVersion" required="false" readonly="true" label="工艺版本" labelCol="2" maxLength="32" fieldCol="4" />
</div>
<div class="blank_div clearfix"></div>
......
......@@ -62,10 +62,13 @@ function addHandler(){
UICtrl.showAjaxDialog({
url: web_app.name + '/technology/addTechnologyDetail.load',
title: "新增工艺设置",
width: 800,
width: 1000,
ok: function(div){
var _self=this;
$('#submitForm',div).ajaxSubmit({url: web_app.name + '/technology/saveTechnology.ajax',
param: {
processList: getProcessList(),
},
success : function() {
_self.close();
reloadGrid();
......@@ -75,19 +78,20 @@ function addHandler(){
});
}
function updateHandler(technologyId){
if(!technologyId){
var technologyId = DataUtil.getUpdateRowId(gridManager);
if (!technologyId){ return; }
}
function updateHandler(){
var technology = DataUtil.getUpdateRow(gridManager);
if (!technology){ return; }
UICtrl.showAjaxDialog({
url: web_app.name + '/technology/showTechnologyDetail.load',
title: "修改工艺设置",
width: 1000,
param:{technologyId:technologyId},
param:{technologyId:technology.technologyId},
ok: function(div){
var _self=this;
$('#submitForm',div).ajaxSubmit({url: web_app.name + '/technology/updateTechnology.ajax',
param: {
processList: getProcessList(),
},
success : function() {
_self.close();
reloadGrid();
......@@ -108,3 +112,16 @@ function deleteHandler() {
});
}
function getProcessList(){
var processList = null;
var processManager = UICtrl.getGridManager('#processListGrid');
if (processManager) {
processList = DataUtil.getGridData({
gridManager: processManager,
isAllData: true
});
processList = Public.encodeJSONURI(processList);
}
return processList;
}
package com.huigou.topsun.easySearch.controller;
import com.huigou.topsun.resource.service.ResourceFiledService;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.bmp.common.easysearch.EasySearch;
import com.huigou.uasp.bmp.common.easysearch.domain.model.EasySearchParse;
import com.huigou.uasp.bmp.common.easysearch.domain.model.QuerySchemeField;
import com.huigou.uasp.bmp.opm.application.MemEasySearcher;
import com.huigou.uasp.bmp.opm.application.impl.MemEasySearcherImpl;
import com.huigou.util.SDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Controller;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @Auther: xin.lu
* @Date: 2023/11/24/10:07
* @Description:
*/
@Controller
@ControllerMapping("/resourceNameGroup")
public class ResourceSearchController {
@Resource
private ResourceFiledService resourceFiledService;
@EasySearch(queryName = "resourceNameGroup")
public Map<String, Object> queryResourceNameGroup(SDO sdo){
Integer intPage = sdo.getInteger("intPage", 1);
Integer pageSize = sdo.getInteger("pageSize",10);
PageRequest pageRequest = new PageRequest(intPage - 1, pageSize);
List<QuerySchemeField> fields =
Arrays.asList(new QuerySchemeField("id", "id", "hidden"),
new QuerySchemeField("资源名称", "gxmc", "string", 200L),
new QuerySchemeField("资源编码", "gxbm", "string", 100L),
new QuerySchemeField("单位", "dw", "string", 100L),
new QuerySchemeField("用量", "yl", "string", 100L),
new QuerySchemeField("工作中心", "gzzx", "string", 100L));
EasySearchParse easySearchParse = new EasySearchParse();
easySearchParse.setFields(fields);
easySearchParse.setWidth(450L);
String processType = sdo.getString("paramValue");
List<Map<String, Object>> mapList = resourceFiledService.getResourceFieldValueListByProcess(processType);
MemEasySearcher<Map<String, Object>> memEasySearcher = new MemEasySearcherImpl<>();
Map<String, Object> model = memEasySearcher.search(mapList, easySearchParse, pageRequest, null);
return model;
}
}
package com.huigou.topsun.proofing.application.impl;
import com.huigou.topsun.product.application.ProductLookedService;
import com.huigou.topsun.product.domain.ProductLooked;
import com.huigou.topsun.product.repository.ProductLookedRepository;
import com.huigou.topsun.proofing.application.ProofingApplyApplication;
......
......@@ -42,6 +42,8 @@ public interface ResourceFiledService extends IService<ResourceFiled> {
List<Map<String, Object>> getResourceFieldValueList(String resourceTypeId);
List<Map<String, Object>> getResourceFieldValueListByProcess(String processType);
int deleteResourceFieldValue(String resourceTypeId, String id);
List<ResourceFiledVo> findFieldValueByResourceTypeIdAndId(String resourceTypeId, String id);
......
......@@ -200,6 +200,13 @@ public class ResourceFiledServiceImpl extends ServiceImpl<ResourceFiledMapper, R
}
}
@Override
public List<Map<String, Object>> getResourceFieldValueListByProcess(String processType) {
String tableName = DictUtil.getDictionaryDetailValue("processResourceMapping", processType);
List<Map<String, Object>> maps = resourceFiledMapper.selectDataList(tableName);
return maps;
}
@Override
public int deleteResourceFieldValue(String resourceTypeId, String id){
ResourceType resourceType = resourceTypeMapper.selectById(resourceTypeId);
......
package com.huigou.topsun.technology.application;
import java.util.Map;
import com.huigou.topsun.technology.vo.ProcessVo;
import java.util.List;
/**
* @author 16508
......@@ -11,4 +13,8 @@ import java.util.Map;
public interface ProcessApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/technology/process.xml";
ProcessVo saveProcess(ProcessVo processVo);
void deleteProcessByProcessId(String processId);
}
package com.huigou.topsun.technology.application;
import com.huigou.topsun.technology.domain.model.ProcessResource;
import java.util.List;
/**
* @author 16508
* @description 针对表【process_resource(工序资源)】的数据库操作Service
......@@ -8,4 +12,8 @@ package com.huigou.topsun.technology.application;
*/
public interface ProcessResourceApplication {
ProcessResource saveProcessResource(ProcessResource processResource);
void deleteByTechnologyProcessId(String technologyProcessId);
}
package com.huigou.topsun.technology.application;
import com.huigou.topsun.technology.domain.model.TechnologyProcess;
import com.huigou.topsun.technology.domain.query.TechnologyProcessQueryRequest;
import com.huigou.topsun.technology.vo.TechnologyProcessVo;
import java.util.List;
import java.util.Map;
/**
......@@ -12,6 +15,13 @@ import java.util.Map;
*/
public interface TechnologyProcessApplication {
public static final String QUERY_XML_FILE_PATH = "config/topsun/technology/technologyProcess.xml";
Map<String,Object> slicedTechnologyProcessList(TechnologyProcessQueryRequest queryRequest);
List<Map<String, Object>> slicedTechnologyProcessList(String technologyId);
void saveTechnologyProcessVoList(String technologyId, List<TechnologyProcessVo> technologyProcessList);
void updateTechnologyProcessVoList(String technologyId, List<TechnologyProcessVo> processList);
List<TechnologyProcess> findByTechnologyId(String technologyId);
void deleteByTechnologyProcessIds(List<String> technologyProcessIds);
}
package com.huigou.topsun.technology.application.impl;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.topsun.technology.application.ProcessApplication;
import com.huigou.topsun.technology.domain.query.TechnologyQueryRequest;
import com.huigou.topsun.technology.domain.model.Process;
import com.huigou.topsun.technology.repository.ProcessRepository;
import com.huigou.topsun.technology.vo.ProcessVo;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
......@@ -17,6 +18,21 @@ import java.util.Map;
*/
@Service
public class ProcessApplicationImpl extends BaseApplication implements ProcessApplication {
@Resource
private ProcessRepository processRepository;
@Override
public ProcessVo saveProcess(ProcessVo processVo) {
Process process = ProcessVo.getProcess(processVo);
process = processRepository.saveAndFlush(process);
processVo.setProcessId(process.getProcessId());
return processVo;
}
@Override
public void deleteProcessByProcessId(String processId) {
processRepository.delete(processId);
}
}
......
package com.huigou.topsun.technology.application.impl;
import com.huigou.topsun.technology.application.ProcessResourceApplication;
import com.huigou.topsun.technology.domain.model.ProcessResource;
import com.huigou.topsun.technology.repository.ProcessResourceRepository;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* @author 16508
* @description 针对表【process_resource(工序资源)】的数据库操作Service实现
......@@ -10,7 +15,19 @@ import org.springframework.stereotype.Service;
*/
@Service
public class ProcessResourceApplicationImpl implements ProcessResourceApplication {
@Resource
private ProcessResourceRepository processResourceRepository;
@Override
public ProcessResource saveProcessResource(ProcessResource processResource) {
return processResourceRepository.saveAndFlush(processResource);
}
@Override
public void deleteByTechnologyProcessId(String technologyProcessId) {
List<ProcessResource> processResourceList = processResourceRepository.findByTechnologyProcessId(technologyProcessId);
processResourceRepository.delete(processResourceList);
}
}
......
......@@ -4,7 +4,9 @@ import com.huigou.cache.DictUtil;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.technology.application.TechnologyApplication;
import com.huigou.topsun.technology.application.TechnologyProcessApplication;
import com.huigou.topsun.technology.domain.model.Technology;
import com.huigou.topsun.technology.domain.model.TechnologyProcess;
import com.huigou.topsun.technology.domain.query.TechnologyQueryRequest;
import com.huigou.topsun.technology.repository.TechnologyRepository;
import com.huigou.topsun.technology.vo.TechnologyVo;
......@@ -12,7 +14,9 @@ import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author 16508
......@@ -24,6 +28,8 @@ public class TechnologyApplicationImpl extends BaseApplication implements Techno
@Resource
private TechnologyRepository technologyRepository;
@Resource
private TechnologyProcessApplication technologyProcessApplication;
@Override
public Map<String, Object> slicedTechnologyList(TechnologyQueryRequest queryRequest) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "technology");
......@@ -42,11 +48,19 @@ public class TechnologyApplicationImpl extends BaseApplication implements Techno
@Override
public TechnologyVo updateTechnologyVo(TechnologyVo technologyVo) {
return null;
return this.saveTechnology(technologyVo);
}
@Override
public void deleteTechnologyVo(String id) {
List<TechnologyProcess> technologyProcessList = technologyProcessApplication.findByTechnologyId(id);
List<String> technologyProcessIds = technologyProcessList
.stream()
.map(TechnologyProcess::getTechnologyProcessId)
.collect(Collectors.toList());
//删除工艺工序关系表
technologyProcessApplication.deleteByTechnologyProcessIds(technologyProcessIds);
//删除工艺表
technologyRepository.delete(id);
}
......
package com.huigou.topsun.technology.application.impl;
import cn.hutool.core.bean.BeanUtil;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.topsun.technology.application.ProcessApplication;
import com.huigou.topsun.technology.application.ProcessResourceApplication;
import com.huigou.topsun.technology.application.TechnologyProcessApplication;
import com.huigou.topsun.technology.domain.query.TechnologyProcessQueryRequest;
import com.huigou.topsun.technology.domain.model.ProcessResource;
import com.huigou.topsun.technology.domain.model.TechnologyProcess;
import com.huigou.topsun.technology.repository.TechnologyProcessRepository;
import com.huigou.topsun.technology.vo.ProcessVo;
import com.huigou.topsun.technology.vo.TechnologyProcessVo;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import org.springframework.stereotype.Service;
import java.util.Map;
import javax.annotation.Resource;
import java.util.*;
/**
* @author 16508
......@@ -15,11 +23,72 @@ import java.util.Map;
*/
@Service
public class TechnologyProcessApplicationImpl extends BaseApplication implements TechnologyProcessApplication {
@Resource
private TechnologyProcessRepository technologyProcessRepository;
@Resource
private ProcessApplication processApplication;
@Resource
private ProcessResourceApplication processResourceApplication;
@Override
public Map<String, Object> slicedTechnologyProcessList(TechnologyProcessQueryRequest queryRequest) {
public List<Map<String, Object>> slicedTechnologyProcessList(String technologyId) {
QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "slicedTechnologyProcessList");
return this.sqlExecutorDao.executeSlicedQuery(queryDescriptor,queryRequest);
String sql = queryDescriptor.getSql();
return this.sqlExecutorDao.queryToListMap(sql,technologyId);
}
@Override
public void saveTechnologyProcessVoList(String technologyId, List<TechnologyProcessVo> technologyProcessList) {
technologyProcessList.forEach(technologyProcessVo -> {
//保存工序
ProcessVo processVo = new ProcessVo();
BeanUtil.copyProperties(technologyProcessVo,processVo);
processVo = processApplication.saveProcess(processVo);
//保存工艺工序关系
TechnologyProcess technologyProcess = new TechnologyProcess();
technologyProcess.setTechnologyId(technologyId);
technologyProcess.setProcessId(processVo.getProcessId());
technologyProcessRepository.saveAndFlush(technologyProcess);
//保存工序资源
ProcessResource processResource = new ProcessResource();
processResource.setTechnologyProcessId(technologyProcess.getTechnologyProcessId());
processResource.setResourceId(technologyProcessVo.getResourceId());
processResourceApplication.saveProcessResource(processResource);
});
}
@Override
public void updateTechnologyProcessVoList(String technologyId, List<TechnologyProcessVo> processList) {
//先删除再保存
List<TechnologyProcess> technologyProcessList = technologyProcessRepository.findByTechnologyId(technologyId);
this.deleteTechnologyProcessIds(technologyProcessList);
this.saveTechnologyProcessVoList(technologyId,processList);
}
@Override
public List<TechnologyProcess> findByTechnologyId(String technologyId) {
return technologyProcessRepository.findByTechnologyId(technologyId);
}
@Override
public void deleteByTechnologyProcessIds(List<String> technologyProcessIds) {
List<TechnologyProcess> technologyProcessList = technologyProcessRepository.findAll(technologyProcessIds);
this.deleteTechnologyProcessIds(technologyProcessList);
}
public void deleteTechnologyProcessIds(List<TechnologyProcess> technologyProcessList){
technologyProcessList.forEach(technologyProcess -> {
//删除工序资源
processResourceApplication.deleteByTechnologyProcessId(technologyProcess.getTechnologyProcessId());
//删除工序
processApplication.deleteProcessByProcessId(technologyProcess.getProcessId());
});
//删除工艺工序关系表
technologyProcessRepository.delete(technologyProcessList);
}
}
......
......@@ -2,7 +2,9 @@ package com.huigou.topsun.technology.controller;
import com.huigou.cache.DictUtil;
import com.huigou.topsun.technology.application.TechnologyApplication;
import com.huigou.topsun.technology.application.TechnologyProcessApplication;
import com.huigou.topsun.technology.domain.query.TechnologyQueryRequest;
import com.huigou.topsun.technology.vo.TechnologyProcessVo;
import com.huigou.topsun.technology.vo.TechnologyVo;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.client.CommonController;
......@@ -10,6 +12,7 @@ import com.huigou.util.SDO;
import org.springframework.stereotype.Controller;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
......@@ -23,6 +26,8 @@ public class TechnologyController extends CommonController {
@Resource
private TechnologyApplication technologyApplication;
@Resource
private TechnologyProcessApplication technologyProcessApplication;
protected String getPagePath() {
return "/biz/topsun/technology/";
......@@ -56,7 +61,9 @@ public class TechnologyController extends CommonController {
public String saveTechnology(){
SDO sdo = this.getSDO();
TechnologyVo technologyVo = sdo.toObject(TechnologyVo.class);
technologyApplication.saveTechnology(technologyVo);
List<TechnologyProcessVo> processList = sdo.getList("processList", TechnologyProcessVo.class);
technologyVo = technologyApplication.saveTechnology(technologyVo);
technologyProcessApplication.saveTechnologyProcessVoList(technologyVo.getTechnologyId(),processList);
return success(technologyVo);
}
......@@ -68,6 +75,8 @@ public class TechnologyController extends CommonController {
SDO sdo = this.getSDO();
TechnologyVo technologyVo = sdo.toObject(TechnologyVo.class);
technologyApplication.updateTechnologyVo(technologyVo);
List<TechnologyProcessVo> processList = sdo.getList("processList", TechnologyProcessVo.class);
technologyProcessApplication.updateTechnologyProcessVoList(technologyVo.getTechnologyId(),processList);
return success(technologyVo);
}
......@@ -97,6 +106,7 @@ public class TechnologyController extends CommonController {
public String showTechnologyDetail(){
SDO sdo = this.getSDO();
String technologyId = sdo.getString("technologyId");
this.putAttribute("productName","1");
TechnologyVo technologyVo = technologyApplication.findTechnologyByTechnologyIdId(technologyId);
return forward("technologyDetail",technologyVo);
}
......
......@@ -24,8 +24,8 @@ public class TechnologyProcessController extends CommonController {
public String slicedTechnologyProcessList(){
SDO sdo = this.getSDO();
TechnologyProcessQueryRequest queryRequest = sdo.toQueryRequest(TechnologyProcessQueryRequest.class);
return toResult(technologyProcessApplication.slicedTechnologyProcessList(queryRequest));
String technologyId = sdo.getString("technologyId");
return packGridDataAndResult(technologyProcessApplication.slicedTechnologyProcessList(technologyId));
}
public String deleteTechnologyProcess(){
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import javax.persistence.*;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
/**
* 工序
......@@ -17,6 +18,8 @@ public class Process implements Serializable {
* 工序ID
*/
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "guid")
@Column(name = "process_id")
private String processId;
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import javax.persistence.*;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
/**
* 工序资源
......@@ -17,6 +18,8 @@ public class ProcessResource implements Serializable {
* ID
*/
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "guid")
@Column(name = "process_resource_id")
private String processResourceId;
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import javax.persistence.*;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
/**
* 工艺
......@@ -17,6 +18,8 @@ public class Technology implements Serializable {
* 工艺路线ID
*/
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "guid")
@Column(name = "technology_id")
private String technologyId;
......
......@@ -4,6 +4,7 @@ import java.io.Serializable;
import javax.persistence.*;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
/**
* 工艺工序关系表
......@@ -17,6 +18,8 @@ public class TechnologyProcess implements Serializable {
* 工艺节点条目ID
*/
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "guid")
@Column(name = "technology_process_id")
private String technologyProcessId;
......
......@@ -3,10 +3,13 @@ package com.huigou.topsun.technology.repository;
import com.huigou.topsun.technology.domain.model.ProcessResource;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
/**
* @Auther: xin.lu
* @Date: 2023/11/22/11:12
* @Description:
*/
public interface ProcessResourceRepository extends JpaRepository<ProcessResource,String> {
List<ProcessResource> findByTechnologyProcessId(String technologyProcessId);
}
......@@ -3,10 +3,15 @@ package com.huigou.topsun.technology.repository;
import com.huigou.topsun.technology.domain.model.TechnologyProcess;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
/**
* @Auther: xin.lu
* @Date: 2023/11/22/11:12
* @Description:
*/
public interface TechnologyProcessRepository extends JpaRepository<TechnologyProcess,String> {
List<TechnologyProcess> findByTechnologyId(String technologyId);
void deleteByTechnologyId(String technologyId);
}
package com.huigou.topsun.technology.vo;
import com.alibaba.fastjson.JSON;
import com.huigou.topsun.technology.domain.model.Process;
import lombok.Data;
import java.io.Serializable;
/**
* 工序
* @TableName process
*/
@Data
public class ProcessVo implements Serializable {
/**
* 工序ID
*/
private String processId;
/**
* 工序名称
*/
private String processName;
/**
* 工序说明
*/
private String processRemark;
/**
* 工时
*/
private Double workHours;
/**
* 工序类别(process_type)
*/
private String processType;
/**
* 工序内容
*/
private String processContent;
public static Process getProcess(ProcessVo processVo){
return JSON.parseObject(JSON.toJSONString(processVo),Process.class);
}
public static ProcessVo getProcessVo(Process process){
return JSON.parseObject(JSON.toJSONString(process), ProcessVo.class);
}
}
\ No newline at end of file
......@@ -28,6 +28,11 @@ public class TechnologyProcessVo implements Serializable {
*/
private String processId;
/**
* 资源id
*/
private String resourceId;
/**
* 条目序号
*/
......
......@@ -3,8 +3,8 @@
<easy-search name="productCode" desc="产品">
<sql>select product_id,product_name from product</sql>
<field name="productId" title="产品编码" code="productId" width="200" />
<field name="productName" title="产品编码" code="productName" width="200" />
<field name="产品id" title="产品id" code="productId" width="200" />
<field name="产品名称" title="产品名称" code="productName" width="200" />
</easy-search>
<!-- <easy-search name="productType" desc="产品状态" >-->
......
......@@ -12,13 +12,16 @@
p.process_content,
p.process_type,
p.process_remark,
p.work_hours
p.work_hours,
pr.resource_id,
CASE WHEN p.process_type = 'cropping' THEN
( SELECT gxmc FROM res_cj t WHERE t.id = pr.resource_id ) ELSE '' end AS resource_name
FROM
technology_process tp
LEFT JOIN process p ON tp.process_id = p.process_id
WHERE 1 =1
LEFT JOIN process_resource pr ON pr.technology_process_id = tp.technology_process_id
WHERE tp.technology_id = ?
</sql-query>
<condition column="technology_id" name="technologyId" type="java.lang.String" symbol="=" alias="tp"/>
</query>
</query-mappings>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment