工作中心

highway
A0010407 1 year ago
parent b21be8e910
commit 2cbc14495f

@ -162,10 +162,21 @@ public class ProProcessController extends BaseController {
/** /**
* *
*/ */
@RequiresPermissions("mes:pro:process:list") // @RequiresPermissions("mes:pro:process:list")
@GetMapping("/selectSysFactoryList") // @GetMapping("/selectSysFactoryList")
public AjaxResult selectSysFactoryList(SysFactory sysFactory) { // public AjaxResult selectSysFactoryList(SysFactory sysFactory) {
List<SysFactory> list = proProcessService.selectSysFactoryList(sysFactory); // List<SysFactory> list = proProcessService.selectSysFactoryList(sysFactory);
return success(list); // return success(list);
// }
/**
*
*/
@RequiresPermissions("wms:factory:getWorkCenterList")
@GetMapping("/getWorkCenterList")
public TableDataInfo getWorkCenterList(SysFactory sysFactory) {
startPage();
List<SysFactory> list = proProcessService.getWorkCenterList(sysFactory);
return getDataTable(list);
} }
} }

@ -71,6 +71,9 @@ public interface ProProcessMapper
Equipment selectEquipmentByEquipmentId(Long equipmentId); Equipment selectEquipmentByEquipmentId(Long equipmentId);
List<BomComponent> selectBaseBomComponentList(BomComponent bomComponent); List<BomComponent> selectBaseBomComponentList(BomComponent bomComponent);
//查询工厂模型 //查询树形工厂模型
public List<SysFactory> selectSysFactoryList(SysFactory sysFactory); // public List<SysFactory> selectSysFactoryList(SysFactory sysFactory);
//查询下拉式工作中心
public List<SysFactory> getWorkCenterList(SysFactory sysFactory);
} }

@ -72,6 +72,9 @@ public interface IProProcessService
public List<BomComponent> selectBaseBomComponentList(BomComponent bomComponent); public List<BomComponent> selectBaseBomComponentList(BomComponent bomComponent);
//查询树形结构 //查询树形工作中心结构
public List<SysFactory> selectSysFactoryList(SysFactory sysFactory); //public List<SysFactory> selectSysFactoryList(SysFactory sysFactory);
//查询下拉式工作中心
List<SysFactory> getWorkCenterList(SysFactory sysFactory);
} }

@ -222,6 +222,18 @@ public class ProProcessServiceImpl implements IProProcessService {
return proProcessMapper.selectBaseBomComponentList(bomComponent); return proProcessMapper.selectBaseBomComponentList(bomComponent);
} }
// /**
// * 查询工厂模型列表
// *
// * @param sysFactory 工厂模型
// * @return 工厂模型
// */
// @Override
// @DS("#header.poolName")
// public List<SysFactory> selectSysFactoryList(SysFactory sysFactory) {
// return proProcessMapper.selectSysFactoryList(sysFactory);
// }
/** /**
* *
* *
@ -230,7 +242,7 @@ public class ProProcessServiceImpl implements IProProcessService {
*/ */
@Override @Override
@DS("#header.poolName") @DS("#header.poolName")
public List<SysFactory> selectSysFactoryList(SysFactory sysFactory) { public List<SysFactory> getWorkCenterList(SysFactory sysFactory) {
return proProcessMapper.selectSysFactoryList(sysFactory); return proProcessMapper.getWorkCenterList(sysFactory);
} }
} }

@ -318,4 +318,9 @@
<if test="bomCode != null and bomCode != ''"> and bom_code = #{bomCode}</if> <if test="bomCode != null and bomCode != ''"> and bom_code = #{bomCode}</if>
</select> </select>
<select id="getWorkCenterList" parameterType="SysFactory" resultMap="SysFactoryResult">
select factory_code,factory_name
from sys_factory
</select>
</mapper> </mapper>

@ -2,6 +2,8 @@ package com.op.wms.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.op.common.core.web.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
@ -92,4 +94,16 @@ public class SysFactoryController extends BaseController {
public AjaxResult remove(@PathVariable Long[] factoryIds) { public AjaxResult remove(@PathVariable Long[] factoryIds) {
return toAjax(sysFactoryService.deleteSysFactoryByFactoryIds(factoryIds)); return toAjax(sysFactoryService.deleteSysFactoryByFactoryIds(factoryIds));
} }
// 查询工作中心
/**
*
*/
@RequiresPermissions("wms:factory:getWorkCenterList")
@GetMapping("/getWorkCenterList")
public TableDataInfo getWorkCenterList(SysFactory sysFactory) {
startPage();
List<SysFactory> list = sysFactoryService.getWorkCenterList(sysFactory);
return getDataTable(list);
}
} }

@ -5,6 +5,9 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.op.common.core.annotation.Excel; import com.op.common.core.annotation.Excel;
import com.op.common.core.web.domain.TreeEntity; import com.op.common.core.web.domain.TreeEntity;
import java.util.List;
import java.util.Map;
/** /**
* sys_factory * sys_factory
* *
@ -44,6 +47,11 @@ public class SysFactory extends TreeEntity {
@Excel(name = "工厂编码") @Excel(name = "工厂编码")
private String factoryCode; private String factoryCode;
//虚拟字段
private List<Map<String,String>> workCenter;
private String value;
private String label;
public void setFactoryId(Long factoryId) { public void setFactoryId(Long factoryId) {
this.factoryId = factoryId; this.factoryId = factoryId;
} }
@ -103,6 +111,27 @@ public class SysFactory extends TreeEntity {
this.factoryCode = factoryCode; this.factoryCode = factoryCode;
} }
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public List<Map<String,String>> getWorkCenter() {
return workCenter;
}
public void setWorkCenter(List<Map<String,String>> workCenter) {
this.workCenter = workCenter;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -121,6 +150,8 @@ public class SysFactory extends TreeEntity {
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("factoryCode", getFactoryCode()) .append("factoryCode", getFactoryCode())
.append("value", getValue())
.append("label", getLabel())
.toString(); .toString();
} }
} }

@ -58,4 +58,6 @@ public interface SysFactoryMapper {
* @return * @return
*/ */
public int deleteSysFactoryByFactoryIds(Long[] factoryIds); public int deleteSysFactoryByFactoryIds(Long[] factoryIds);
public List<SysFactory> getWorkCenterList(SysFactory sysFactory);
} }

@ -57,4 +57,7 @@ public interface ISysFactoryService {
* @return * @return
*/ */
public int deleteSysFactoryByFactoryId(Long factoryId); public int deleteSysFactoryByFactoryId(Long factoryId);
//好
List<SysFactory> getWorkCenterList(SysFactory sysFactory);
} }

@ -97,4 +97,17 @@ public class SysFactoryServiceImpl implements ISysFactoryService {
public int deleteSysFactoryByFactoryId(Long factoryId) { public int deleteSysFactoryByFactoryId(Long factoryId) {
return sysFactoryMapper.deleteSysFactoryByFactoryId(factoryId); return sysFactoryMapper.deleteSysFactoryByFactoryId(factoryId);
} }
/**
*
*
* @param sysFactory
* @return
*/
@Override
@DS("#header.poolName")
public List<SysFactory> getWorkCenterList(SysFactory sysFactory) {
return sysFactoryMapper.getWorkCenterList(sysFactory);
}
} }

@ -112,4 +112,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{factoryId} #{factoryId}
</foreach> </foreach>
</delete> </delete>
<select id="getWorkCenterList" parameterType="SysFactory" resultType="SysFactoryResult">
select factory_code,factory_name
from sys_factory
</select>
</mapper> </mapper>
Loading…
Cancel
Save