实现工厂建模接口
This commit is contained in:
parent
b0ac0030b2
commit
143adbc822
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
28
.idea/compiler.xml
generated
Normal file
28
.idea/compiler.xml
generated
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="true" />
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="neu-carbon-bid" />
|
||||
<module name="neu-carbon-scm" />
|
||||
<module name="neu-carbon-wms" />
|
||||
<module name="neu-admin" />
|
||||
<module name="neu-carbon-mes" />
|
||||
<module name="neu-generator" />
|
||||
<module name="neu-quartz" />
|
||||
<module name="neu-carbon-footprint" />
|
||||
<module name="neu-common-biz" />
|
||||
<module name="neu-framework" />
|
||||
<module name="neu-system" />
|
||||
<module name="neu-carbon-report" />
|
||||
<module name="neu-common" />
|
||||
<module name="neu-carbon-mapper" />
|
||||
<module name="neu-carbon-service" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
||||
12
.idea/dataSources.xml
generated
Normal file
12
.idea/dataSources.xml
generated
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="carbon@localhost" uuid="a584d99b-5513-4f63-b629-399a6af8f85b">
|
||||
<driver-ref>mysql.8</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:mysql://localhost:3306/carbon</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
||||
37
.idea/encodings.xml
generated
Normal file
37
.idea/encodings.xml
generated
Normal file
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/neu-admin/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-admin/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-bid/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-bid/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-footprint/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-footprint/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-mapper/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-mapper/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-mes/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-mes/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-report/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-report/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-scm/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-scm/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-service/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-service/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-wms/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-wms/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-common-biz/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-common-biz/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-common/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-common/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-framework/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-framework/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-generator/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-generator/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-quartz/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-quartz/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-system/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/neu-system/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
25
.idea/jarRepositories.xml
generated
Normal file
25
.idea/jarRepositories.xml
generated
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="public" />
|
||||
<option name="name" value="aliyun nexus" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
12
.idea/misc.xml
generated
Normal file
12
.idea/misc.xml
generated
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
</project>
|
||||
7
.idea/sqldialects.xml
generated
Normal file
7
.idea/sqldialects.xml
generated
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="file://$PROJECT_DIR$/neu-carbon-mes/src/main/resources/mapper/mes/MesFactoryModelMapper.xml" dialect="GenericSQL" />
|
||||
<file url="PROJECT" dialect="MySQL" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,121 @@
|
||||
package com.neu.carbon.footprint.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.neu.common.annotation.Excel;
|
||||
import com.neu.common.core.domain.BaseEntity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* 能效检测点对象 cf_electric_checkpoint
|
||||
*
|
||||
* @author neuedu
|
||||
* @date 2024-11-16
|
||||
*/
|
||||
@ApiModel("能效检测点")
|
||||
public class CfElectricCheckpoint extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
@ApiModelProperty("编号")
|
||||
@Excel(name = "编号")
|
||||
private Long id;
|
||||
|
||||
/** 站点名称 */
|
||||
@ApiModelProperty("站点名称")
|
||||
@Excel(name = "站点名称")
|
||||
private String name;
|
||||
|
||||
/** 站点地址 */
|
||||
@ApiModelProperty("站点地址")
|
||||
@Excel(name = "站点地址")
|
||||
private String address;
|
||||
|
||||
/** 实时功率 */
|
||||
@ApiModelProperty("实时功率")
|
||||
@Excel(name = "实时功率")
|
||||
private Long rtPower;
|
||||
|
||||
/** 实时电压 */
|
||||
@ApiModelProperty("实时电压")
|
||||
@Excel(name = "实时电压")
|
||||
private Long rtVoltage;
|
||||
|
||||
/** 状态 0未过载 1已过载 */
|
||||
@ApiModelProperty("状态 0未过载 1已过载")
|
||||
@Excel(name = "状态 0未过载 1已过载")
|
||||
private String status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return address;
|
||||
}
|
||||
public void setRtPower(Long rtPower)
|
||||
{
|
||||
this.rtPower = rtPower;
|
||||
}
|
||||
|
||||
public Long getRtPower()
|
||||
{
|
||||
return rtPower;
|
||||
}
|
||||
public void setRtVoltage(Long rtVoltage)
|
||||
{
|
||||
this.rtVoltage = rtVoltage;
|
||||
}
|
||||
|
||||
public Long getRtVoltage()
|
||||
{
|
||||
return rtVoltage;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("address", getAddress())
|
||||
.append("rtPower", getRtPower())
|
||||
.append("rtVoltage", getRtVoltage())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.neu.carbon.footprint.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.neu.carbon.footprint.domain.CfElectricCheckpoint;
|
||||
|
||||
/**
|
||||
* 能效检测点Mapper接口
|
||||
*
|
||||
* @author neuedu
|
||||
* @date 2024-11-16
|
||||
*/
|
||||
public interface CfElectricCheckpointMapper
|
||||
{
|
||||
/**
|
||||
* 查询能效检测点
|
||||
*
|
||||
* @param id 能效检测点ID
|
||||
* @return 能效检测点
|
||||
*/
|
||||
public CfElectricCheckpoint selectCfElectricCheckpointById(Long id);
|
||||
|
||||
/**
|
||||
* 查询能效检测点列表
|
||||
*
|
||||
* @param cfElectricCheckpoint 能效检测点
|
||||
* @return 能效检测点集合
|
||||
*/
|
||||
public List<CfElectricCheckpoint> selectCfElectricCheckpointList(CfElectricCheckpoint cfElectricCheckpoint);
|
||||
|
||||
/**
|
||||
* 新增能效检测点
|
||||
*
|
||||
* @param cfElectricCheckpoint 能效检测点
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCfElectricCheckpoint(CfElectricCheckpoint cfElectricCheckpoint);
|
||||
|
||||
/**
|
||||
* 修改能效检测点
|
||||
*
|
||||
* @param cfElectricCheckpoint 能效检测点
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCfElectricCheckpoint(CfElectricCheckpoint cfElectricCheckpoint);
|
||||
|
||||
/**
|
||||
* 删除能效检测点
|
||||
*
|
||||
* @param id 能效检测点ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCfElectricCheckpointById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除能效检测点
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCfElectricCheckpointByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.neu.carbon.footprint.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.neu.carbon.footprint.domain.CfElectricCheckpoint;
|
||||
|
||||
/**
|
||||
* 能效检测点Service接口
|
||||
*
|
||||
* @author neuedu
|
||||
* @date 2024-11-16
|
||||
*/
|
||||
public interface ICfElectricCheckpointService
|
||||
{
|
||||
/**
|
||||
* 查询能效检测点
|
||||
*
|
||||
* @param id 能效检测点ID
|
||||
* @return 能效检测点
|
||||
*/
|
||||
public CfElectricCheckpoint selectCfElectricCheckpointById(Long id);
|
||||
|
||||
/**
|
||||
* 查询能效检测点列表
|
||||
*
|
||||
* @param cfElectricCheckpoint 能效检测点
|
||||
* @return 能效检测点集合
|
||||
*/
|
||||
public List<CfElectricCheckpoint> selectCfElectricCheckpointList(CfElectricCheckpoint cfElectricCheckpoint);
|
||||
|
||||
/**
|
||||
* 新增能效检测点
|
||||
*
|
||||
* @param cfElectricCheckpoint 能效检测点
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCfElectricCheckpoint(CfElectricCheckpoint cfElectricCheckpoint);
|
||||
|
||||
/**
|
||||
* 修改能效检测点
|
||||
*
|
||||
* @param cfElectricCheckpoint 能效检测点
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCfElectricCheckpoint(CfElectricCheckpoint cfElectricCheckpoint);
|
||||
|
||||
/**
|
||||
* 批量删除能效检测点
|
||||
*
|
||||
* @param ids 需要删除的能效检测点ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCfElectricCheckpointByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除能效检测点信息
|
||||
*
|
||||
* @param id 能效检测点ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCfElectricCheckpointById(Long id);
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
package com.neu.carbon.footprint.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.neu.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.neu.carbon.footprint.mapper.CfElectricCheckpointMapper;
|
||||
import com.neu.carbon.footprint.domain.CfElectricCheckpoint;
|
||||
import com.neu.carbon.footprint.service.ICfElectricCheckpointService;
|
||||
|
||||
/**
|
||||
* 能效检测点Service业务层处理
|
||||
*
|
||||
* @author neuedu
|
||||
* @date 2024-11-16
|
||||
*/
|
||||
@Service
|
||||
public class CfElectricCheckpointServiceImpl implements ICfElectricCheckpointService
|
||||
{
|
||||
@Autowired
|
||||
private CfElectricCheckpointMapper cfElectricCheckpointMapper;
|
||||
|
||||
/**
|
||||
* 查询能效检测点
|
||||
*
|
||||
* @param id 能效检测点ID
|
||||
* @return 能效检测点
|
||||
*/
|
||||
@Override
|
||||
public CfElectricCheckpoint selectCfElectricCheckpointById(Long id)
|
||||
{
|
||||
return cfElectricCheckpointMapper.selectCfElectricCheckpointById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询能效检测点列表
|
||||
*
|
||||
* @param cfElectricCheckpoint 能效检测点
|
||||
* @return 能效检测点
|
||||
*/
|
||||
@Override
|
||||
public List<CfElectricCheckpoint> selectCfElectricCheckpointList(CfElectricCheckpoint cfElectricCheckpoint)
|
||||
{
|
||||
return cfElectricCheckpointMapper.selectCfElectricCheckpointList(cfElectricCheckpoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增能效检测点
|
||||
*
|
||||
* @param cfElectricCheckpoint 能效检测点
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCfElectricCheckpoint(CfElectricCheckpoint cfElectricCheckpoint)
|
||||
{
|
||||
cfElectricCheckpoint.setCreateTime(DateUtils.getNowDate());
|
||||
return cfElectricCheckpointMapper.insertCfElectricCheckpoint(cfElectricCheckpoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改能效检测点
|
||||
*
|
||||
* @param cfElectricCheckpoint 能效检测点
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCfElectricCheckpoint(CfElectricCheckpoint cfElectricCheckpoint)
|
||||
{
|
||||
return cfElectricCheckpointMapper.updateCfElectricCheckpoint(cfElectricCheckpoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除能效检测点
|
||||
*
|
||||
* @param ids 需要删除的能效检测点ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCfElectricCheckpointByIds(Long[] ids)
|
||||
{
|
||||
return cfElectricCheckpointMapper.deleteCfElectricCheckpointByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除能效检测点信息
|
||||
*
|
||||
* @param id 能效检测点ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCfElectricCheckpointById(Long id)
|
||||
{
|
||||
return cfElectricCheckpointMapper.deleteCfElectricCheckpointById(id);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,149 @@
|
||||
package com.neu.carbon.mes.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.neu.carbon.wms.domain.WmsMaterialInfo;
|
||||
import com.neu.carbon.wms.service.IWmsMaterialInfoService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.neu.common.annotation.Log;
|
||||
import com.neu.common.core.controller.BaseController;
|
||||
import com.neu.common.core.domain.AjaxResult;
|
||||
import com.neu.common.enums.BusinessType;
|
||||
import com.neu.carbon.mes.domain.MesFactoryModel;
|
||||
import com.neu.carbon.mes.service.IMesFactoryModelService;
|
||||
import com.neu.common.utils.poi.ExcelUtil;
|
||||
import com.neu.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 工厂建模Controller
|
||||
*
|
||||
* @author neuedu
|
||||
* @date 2024-11-16
|
||||
*/
|
||||
@Api(tags = {"工厂建模"})
|
||||
@RestController
|
||||
@RequestMapping("/mes/model")
|
||||
public class MesFactoryModelController extends BaseController {
|
||||
@Autowired
|
||||
private IMesFactoryModelService mesFactoryModelService;
|
||||
|
||||
@Autowired
|
||||
private IWmsMaterialInfoService wmsMaterialInfoService;
|
||||
|
||||
/**
|
||||
* 查询工厂建模列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询工厂建模列表")
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(name = "total", value = "总记录数"),
|
||||
@DynamicParameter(name = "code", value = "状态码,200正确,其他错误"),
|
||||
@DynamicParameter(name = "rows", value = "返回业务数据(数组类型)", dataTypeClass = MesFactoryModel.class),
|
||||
@DynamicParameter(name = "msg", value = "返回消息内容")
|
||||
})
|
||||
public TableDataInfo list(MesFactoryModel mesFactoryModel) {
|
||||
startPage();
|
||||
List<MesFactoryModel> list = mesFactoryModelService.selectMesFactoryModelList(mesFactoryModel);
|
||||
list.forEach(materia -> {
|
||||
WmsMaterialInfo wmsMaterialInfo = wmsMaterialInfoService.selectWmsMaterialInfoById(materia.getMaterialId());
|
||||
if (wmsMaterialInfo != null) {
|
||||
materia.setMaterialName(wmsMaterialInfo.getName());
|
||||
}
|
||||
});
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出工厂建模列表
|
||||
*/
|
||||
@ApiOperation("导出工厂建模列表")
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(name = "code", value = "状态码,200正确,其他错误"),
|
||||
@DynamicParameter(name = "msg", value = "文件名")
|
||||
})
|
||||
@PreAuthorize("@ss.hasPermi('mes:model:export')")
|
||||
@Log(title = "工厂建模", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(MesFactoryModel mesFactoryModel) {
|
||||
List<MesFactoryModel> list = mesFactoryModelService.selectMesFactoryModelList(mesFactoryModel);
|
||||
ExcelUtil<MesFactoryModel> util = new ExcelUtil<MesFactoryModel>(MesFactoryModel.class);
|
||||
return util.exportExcel(list, "model");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工厂建模详细信息
|
||||
*/
|
||||
@ApiOperation("获取工厂建模详细信息")
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(name = "code", value = "状态码,200正确,其他错误"),
|
||||
@DynamicParameter(name = "data", value = "返回业务数据", dataTypeClass = MesFactoryModel.class),
|
||||
@DynamicParameter(name = "msg", value = "返回消息内容")
|
||||
})
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
MesFactoryModel mesFactoryModel = mesFactoryModelService.selectMesFactoryModelById(id);
|
||||
WmsMaterialInfo wmsMaterialInfo = wmsMaterialInfoService.selectWmsMaterialInfoById(mesFactoryModel.getMaterialId());
|
||||
mesFactoryModel.setMesFactoryModelDetailList(wmsMaterialInfo);
|
||||
return AjaxResult.success(mesFactoryModel);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工厂建模
|
||||
*/
|
||||
@ApiOperation("新增工厂建模")
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(name = "code", value = "状态码,200正确,其他错误"),
|
||||
@DynamicParameter(name = "msg", value = "返回消息内容")
|
||||
})
|
||||
@PreAuthorize("@ss.hasPermi('mes:model:add')")
|
||||
@Log(title = "工厂建模", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MesFactoryModel mesFactoryModel) {
|
||||
return toAjax(mesFactoryModelService.insertMesFactoryModel(mesFactoryModel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工厂建模
|
||||
*/
|
||||
@ApiOperation("修改工厂建模")
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(name = "code", value = "状态码,200正确,其他错误"),
|
||||
@DynamicParameter(name = "msg", value = "返回消息内容")
|
||||
})
|
||||
@PreAuthorize("@ss.hasPermi('mes:model:edit')")
|
||||
@Log(title = "工厂建模", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MesFactoryModel mesFactoryModel) {
|
||||
return toAjax(mesFactoryModelService.updateMesFactoryModel(mesFactoryModel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工厂建模
|
||||
*/
|
||||
@ApiOperation("删除工厂建模")
|
||||
@DynamicResponseParameters(properties = {
|
||||
@DynamicParameter(name = "code", value = "状态码,200正确,其他错误"),
|
||||
@DynamicParameter(name = "msg", value = "返回消息内容")
|
||||
})
|
||||
@PreAuthorize("@ss.hasPermi('mes:model:remove')")
|
||||
@Log(title = "工厂建模", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(mesFactoryModelService.deleteMesFactoryModelByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
package com.neu.carbon.mes.domain;
|
||||
|
||||
import com.neu.carbon.wms.domain.WmsMaterialInfo;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.neu.common.annotation.Excel;
|
||||
import com.neu.common.core.domain.BaseEntity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工厂建模对象 mes_factory_model
|
||||
*
|
||||
* @author neuedu
|
||||
* @date 2024-11-16
|
||||
*/
|
||||
@ApiModel("工厂建模")
|
||||
public class MesFactoryModel extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 物料档案编号
|
||||
*/
|
||||
@ApiModelProperty("物料档案编号")
|
||||
@Excel(name = "物料档案编号")
|
||||
private Long materialId;
|
||||
|
||||
/**
|
||||
* 生产线名称
|
||||
*/
|
||||
@ApiModelProperty("生产线名称")
|
||||
@Excel(name = "生产线名称")
|
||||
private String productLineName;
|
||||
|
||||
public WmsMaterialInfo mesFactoryModelDetailList;
|
||||
|
||||
private String materialName;
|
||||
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public WmsMaterialInfo getMesFactoryModelDetailList() {
|
||||
return mesFactoryModelDetailList;
|
||||
}
|
||||
|
||||
public void setMesFactoryModelDetailList(WmsMaterialInfo mesFactoryModelDetailList) {
|
||||
this.mesFactoryModelDetailList = mesFactoryModelDetailList;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setMaterialId(Long materialId) {
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public Long getMaterialId() {
|
||||
return materialId;
|
||||
}
|
||||
|
||||
public void setProductLineName(String productLineName) {
|
||||
this.productLineName = productLineName;
|
||||
}
|
||||
|
||||
public String getProductLineName() {
|
||||
return productLineName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("productLineName", getProductLineName())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,136 @@
|
||||
package com.neu.carbon.mes.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.neu.common.annotation.Excel;
|
||||
import com.neu.common.core.domain.BaseEntity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* 项目维护对象 mes_project
|
||||
*
|
||||
* @author neuedu
|
||||
* @date 2024-11-16
|
||||
*/
|
||||
@ApiModel("项目维护")
|
||||
public class MesProject extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
@ApiModelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
/** 项目名 */
|
||||
@ApiModelProperty("项目名")
|
||||
@Excel(name = "项目名")
|
||||
private String name;
|
||||
|
||||
/** 负责人 */
|
||||
@ApiModelProperty("负责人")
|
||||
@Excel(name = "负责人")
|
||||
private String leader;
|
||||
|
||||
/** 开始日期 */
|
||||
@ApiModelProperty(value="开始日期",example = "2021-09-10")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "开始日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date startDate;
|
||||
|
||||
/** 结束日期 */
|
||||
@ApiModelProperty(value="结束日期",example = "2021-09-10")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date endDate;
|
||||
|
||||
/** 项目介绍 */
|
||||
@ApiModelProperty("项目介绍")
|
||||
@Excel(name = "项目介绍")
|
||||
private String description;
|
||||
|
||||
/** 项目状态 */
|
||||
@ApiModelProperty("项目状态")
|
||||
@Excel(name = "项目状态")
|
||||
private String status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setLeader(String leader)
|
||||
{
|
||||
this.leader = leader;
|
||||
}
|
||||
|
||||
public String getLeader()
|
||||
{
|
||||
return leader;
|
||||
}
|
||||
public void setStartDate(Date startDate)
|
||||
{
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public Date getStartDate()
|
||||
{
|
||||
return startDate;
|
||||
}
|
||||
public void setEndDate(Date endDate)
|
||||
{
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public Date getEndDate()
|
||||
{
|
||||
return endDate;
|
||||
}
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("leader", getLeader())
|
||||
.append("startDate", getStartDate())
|
||||
.append("endDate", getEndDate())
|
||||
.append("description", getDescription())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package com.neu.carbon.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.neu.carbon.mes.domain.MesFactoryModel;
|
||||
import com.neu.carbon.mes.domain.MesFactoryModelDetail;
|
||||
|
||||
/**
|
||||
* 工厂建模Mapper接口
|
||||
*
|
||||
* @author neuedu
|
||||
* @date 2024-11-16
|
||||
*/
|
||||
public interface MesFactoryModelMapper
|
||||
{
|
||||
/**
|
||||
* 查询工厂建模
|
||||
*
|
||||
* @param id 工厂建模ID
|
||||
* @return 工厂建模
|
||||
*/
|
||||
public MesFactoryModel selectMesFactoryModelById(Long id);
|
||||
|
||||
/**
|
||||
* 查询工厂建模列表
|
||||
*
|
||||
* @param mesFactoryModel 工厂建模
|
||||
* @return 工厂建模集合
|
||||
*/
|
||||
public List<MesFactoryModel> selectMesFactoryModelList(MesFactoryModel mesFactoryModel);
|
||||
|
||||
/**
|
||||
* 新增工厂建模
|
||||
*
|
||||
* @param mesFactoryModel 工厂建模
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesFactoryModel(MesFactoryModel mesFactoryModel);
|
||||
|
||||
/**
|
||||
* 修改工厂建模
|
||||
*
|
||||
* @param mesFactoryModel 工厂建模
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesFactoryModel(MesFactoryModel mesFactoryModel);
|
||||
|
||||
/**
|
||||
* 删除工厂建模
|
||||
*
|
||||
* @param id 工厂建模ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesFactoryModelById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除工厂建模
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesFactoryModelByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增工厂建模明细
|
||||
* @param mesFactoryModelDetailList list
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchMesFactoryModelDetail(List<MesFactoryModelDetail> mesFactoryModelDetailList);
|
||||
|
||||
/**
|
||||
* 批量删除工厂建模明细
|
||||
* @param ids id
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesFactoryModelDetailByProductLineIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 通过id删除工厂建模明细
|
||||
* @param ids id
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesFactoryModelDetailByProductLineId(Long id);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.neu.carbon.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.neu.carbon.mes.domain.MesProject;
|
||||
|
||||
/**
|
||||
* 项目维护Mapper接口
|
||||
*
|
||||
* @author neuedu
|
||||
* @date 2024-11-16
|
||||
*/
|
||||
public interface MesProjectMapper
|
||||
{
|
||||
/**
|
||||
* 查询项目维护
|
||||
*
|
||||
* @param id 项目维护ID
|
||||
* @return 项目维护
|
||||
*/
|
||||
public MesProject selectMesProjectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询项目维护列表
|
||||
*
|
||||
* @param mesProject 项目维护
|
||||
* @return 项目维护集合
|
||||
*/
|
||||
public List<MesProject> selectMesProjectList(MesProject mesProject);
|
||||
|
||||
/**
|
||||
* 新增项目维护
|
||||
*
|
||||
* @param mesProject 项目维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesProject(MesProject mesProject);
|
||||
|
||||
/**
|
||||
* 修改项目维护
|
||||
*
|
||||
* @param mesProject 项目维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesProject(MesProject mesProject);
|
||||
|
||||
/**
|
||||
* 删除项目维护
|
||||
*
|
||||
* @param id 项目维护ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesProjectById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除项目维护
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesProjectByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.neu.carbon.mes.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.neu.carbon.mes.domain.MesFactoryModel;
|
||||
|
||||
/**
|
||||
* 工厂建模Service接口
|
||||
*
|
||||
* @author neuedu
|
||||
* @date 2024-11-16
|
||||
*/
|
||||
public interface IMesFactoryModelService
|
||||
{
|
||||
/**
|
||||
* 查询工厂建模
|
||||
*
|
||||
* @param id 工厂建模ID
|
||||
* @return 工厂建模
|
||||
*/
|
||||
public MesFactoryModel selectMesFactoryModelById(Long id);
|
||||
|
||||
/**
|
||||
* 查询工厂建模列表
|
||||
*
|
||||
* @param mesFactoryModel 工厂建模
|
||||
* @return 工厂建模集合
|
||||
*/
|
||||
public List<MesFactoryModel> selectMesFactoryModelList(MesFactoryModel mesFactoryModel);
|
||||
|
||||
/**
|
||||
* 新增工厂建模
|
||||
*
|
||||
* @param mesFactoryModel 工厂建模
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesFactoryModel(MesFactoryModel mesFactoryModel);
|
||||
|
||||
/**
|
||||
* 修改工厂建模
|
||||
*
|
||||
* @param mesFactoryModel 工厂建模
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesFactoryModel(MesFactoryModel mesFactoryModel);
|
||||
|
||||
/**
|
||||
* 批量删除工厂建模
|
||||
*
|
||||
* @param ids 需要删除的工厂建模ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesFactoryModelByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除工厂建模信息
|
||||
*
|
||||
* @param id 工厂建模ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesFactoryModelById(Long id);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.neu.carbon.mes.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.neu.carbon.mes.domain.MesProject;
|
||||
|
||||
/**
|
||||
* 项目维护Service接口
|
||||
*
|
||||
* @author neuedu
|
||||
* @date 2024-11-16
|
||||
*/
|
||||
public interface IMesProjectService
|
||||
{
|
||||
/**
|
||||
* 查询项目维护
|
||||
*
|
||||
* @param id 项目维护ID
|
||||
* @return 项目维护
|
||||
*/
|
||||
public MesProject selectMesProjectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询项目维护列表
|
||||
*
|
||||
* @param mesProject 项目维护
|
||||
* @return 项目维护集合
|
||||
*/
|
||||
public List<MesProject> selectMesProjectList(MesProject mesProject);
|
||||
|
||||
/**
|
||||
* 新增项目维护
|
||||
*
|
||||
* @param mesProject 项目维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesProject(MesProject mesProject);
|
||||
|
||||
/**
|
||||
* 修改项目维护
|
||||
*
|
||||
* @param mesProject 项目维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesProject(MesProject mesProject);
|
||||
|
||||
/**
|
||||
* 批量删除项目维护
|
||||
*
|
||||
* @param ids 需要删除的项目维护ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesProjectByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除项目维护信息
|
||||
*
|
||||
* @param id 项目维护ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesProjectById(Long id);
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package com.neu.carbon.mes.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.neu.carbon.mes.domain.MesFactoryModelDetail;
|
||||
import com.neu.common.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.neu.carbon.mes.mapper.MesFactoryModelMapper;
|
||||
import com.neu.carbon.mes.domain.MesFactoryModel;
|
||||
import com.neu.carbon.mes.service.IMesFactoryModelService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 工厂建模Service业务层处理
|
||||
*
|
||||
* @author neuedu
|
||||
* @date 2024-11-16
|
||||
*/
|
||||
@Service
|
||||
public class MesFactoryModelServiceImpl implements IMesFactoryModelService
|
||||
{
|
||||
@Autowired
|
||||
@Resource
|
||||
private MesFactoryModelMapper mesFactoryModelMapper;
|
||||
|
||||
/**
|
||||
* 查询工厂建模
|
||||
*
|
||||
* @param id 工厂建模ID
|
||||
* @return 工厂建模
|
||||
*/
|
||||
@Override
|
||||
public MesFactoryModel selectMesFactoryModelById(Long id)
|
||||
{
|
||||
return mesFactoryModelMapper.selectMesFactoryModelById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工厂建模列表
|
||||
*
|
||||
* @param mesFactoryModel 工厂建模
|
||||
* @return 工厂建模
|
||||
*/
|
||||
@Override
|
||||
public List<MesFactoryModel> selectMesFactoryModelList(MesFactoryModel mesFactoryModel)
|
||||
{
|
||||
return mesFactoryModelMapper.selectMesFactoryModelList(mesFactoryModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工厂建模
|
||||
*
|
||||
* @param mesFactoryModel 工厂建模
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMesFactoryModel(MesFactoryModel mesFactoryModel)
|
||||
{
|
||||
return mesFactoryModelMapper.insertMesFactoryModel(mesFactoryModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工厂建模
|
||||
*
|
||||
* @param mesFactoryModel 工厂建模
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMesFactoryModel(MesFactoryModel mesFactoryModel)
|
||||
{
|
||||
return mesFactoryModelMapper.updateMesFactoryModel(mesFactoryModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除工厂建模
|
||||
*
|
||||
* @param ids 需要删除的工厂建模ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesFactoryModelByIds(Long[] ids)
|
||||
{
|
||||
mesFactoryModelMapper.deleteMesFactoryModelDetailByProductLineIds(ids);
|
||||
return mesFactoryModelMapper.deleteMesFactoryModelByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工厂建模信息
|
||||
*
|
||||
* @param id 工厂建模ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesFactoryModelById(Long id)
|
||||
{
|
||||
mesFactoryModelMapper.deleteMesFactoryModelDetailByProductLineId(id);
|
||||
return mesFactoryModelMapper.deleteMesFactoryModelById(id);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.neu.carbon.mes.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.neu.carbon.mes.mapper.MesProjectMapper;
|
||||
import com.neu.carbon.mes.domain.MesProject;
|
||||
import com.neu.carbon.mes.service.IMesProjectService;
|
||||
|
||||
/**
|
||||
* 项目维护Service业务层处理
|
||||
*
|
||||
* @author neuedu
|
||||
* @date 2024-11-16
|
||||
*/
|
||||
@Service
|
||||
public class MesProjectServiceImpl implements IMesProjectService
|
||||
{
|
||||
@Autowired
|
||||
private MesProjectMapper mesProjectMapper;
|
||||
|
||||
/**
|
||||
* 查询项目维护
|
||||
*
|
||||
* @param id 项目维护ID
|
||||
* @return 项目维护
|
||||
*/
|
||||
@Override
|
||||
public MesProject selectMesProjectById(Long id)
|
||||
{
|
||||
return mesProjectMapper.selectMesProjectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目维护列表
|
||||
*
|
||||
* @param mesProject 项目维护
|
||||
* @return 项目维护
|
||||
*/
|
||||
@Override
|
||||
public List<MesProject> selectMesProjectList(MesProject mesProject)
|
||||
{
|
||||
return mesProjectMapper.selectMesProjectList(mesProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目维护
|
||||
*
|
||||
* @param mesProject 项目维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMesProject(MesProject mesProject)
|
||||
{
|
||||
return mesProjectMapper.insertMesProject(mesProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目维护
|
||||
*
|
||||
* @param mesProject 项目维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMesProject(MesProject mesProject)
|
||||
{
|
||||
return mesProjectMapper.updateMesProject(mesProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目维护
|
||||
*
|
||||
* @param ids 需要删除的项目维护ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesProjectByIds(Long[] ids)
|
||||
{
|
||||
return mesProjectMapper.deleteMesProjectByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目维护信息
|
||||
*
|
||||
* @param id 项目维护ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesProjectById(Long id)
|
||||
{
|
||||
return mesProjectMapper.deleteMesProjectById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.neu.carbon.mes.mapper.MesFactoryModelMapper">
|
||||
|
||||
<resultMap type="MesFactoryModel" id="MesFactoryModelResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="productLineName" column="product_line_name" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesFactoryModelVo">
|
||||
select id, material_id, product_line_name, remark from mes_factory_model
|
||||
</sql>
|
||||
|
||||
<select id="selectMesFactoryModelList" parameterType="MesFactoryModel" resultMap="MesFactoryModelResult">
|
||||
<include refid="selectMesFactoryModelVo"/>
|
||||
<where>
|
||||
<if test="materialId != null "> and material_id = #{materialId}</if>
|
||||
<if test="productLineName != null and productLineName != ''"> and product_line_name like concat('%', #{productLineName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesFactoryModelById" parameterType="Long" resultMap="MesFactoryModelResult">
|
||||
<include refid="selectMesFactoryModelVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesFactoryModel" parameterType="MesFactoryModel" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into mes_factory_model
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="productLineName != null">product_line_name,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="productLineName != null">#{productLineName},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesFactoryModel" parameterType="MesFactoryModel">
|
||||
update mes_factory_model
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="productLineName != null">product_line_name = #{productLineName},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesFactoryModelById" parameterType="Long">
|
||||
delete from mes_factory_model where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesFactoryModelByIds" parameterType="String">
|
||||
delete from mes_factory_model where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchMesFactoryModelDetail">
|
||||
insert into mes_factory_model_detail(product_line_id,equipment_id) values
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(#{item.productLineId},#{item.equipmentId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteMesFactoryModelDetailByProductLineIds">
|
||||
delete from mes_factory_model_detail where product_line_id in
|
||||
<foreach collection="array" item="id" index="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesFactoryModelDetailByProductLineId" parameterType="Long">
|
||||
delete from mes_factory_model_detail where product_line_id = #{productLineId}
|
||||
</delete>
|
||||
</mapper>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.neu.carbon.mes.mapper.MesFactoryModelMapper">
|
||||
|
||||
<resultMap type="MesFactoryModel" id="MesFactoryModelResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="productLineName" column="product_line_name" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesFactoryModelVo">
|
||||
select id, material_id, product_line_name, remark from mes_factory_model
|
||||
</sql>
|
||||
|
||||
<select id="selectMesFactoryModelList" parameterType="MesFactoryModel" resultMap="MesFactoryModelResult">
|
||||
<include refid="selectMesFactoryModelVo"/>
|
||||
<where>
|
||||
<if test="materialId != null "> and material_id = #{materialId}</if>
|
||||
<if test="productLineName != null and productLineName != ''"> and product_line_name like concat('%', #{productLineName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesFactoryModelById" parameterType="Long" resultMap="MesFactoryModelResult">
|
||||
<include refid="selectMesFactoryModelVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesFactoryModel" parameterType="MesFactoryModel" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into mes_factory_model
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="productLineName != null">product_line_name,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="productLineName != null">#{productLineName},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesFactoryModel" parameterType="MesFactoryModel">
|
||||
update mes_factory_model
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="productLineName != null">product_line_name = #{productLineName},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesFactoryModelById" parameterType="Long">
|
||||
delete from mes_factory_model where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesFactoryModelByIds" parameterType="String">
|
||||
delete from mes_factory_model where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchMesFactoryModelDetail">
|
||||
insert into mes_factory_model_detail(product_line_id,equipment_id) values
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(#{item.productLineId},#{item.equipmentId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteMesFactoryModelDetailByProductLineIds">
|
||||
delete from mes_factory_model_detail where product_line_id in
|
||||
<foreach collection="array" item="id" index="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesFactoryModelDetailByProductLineId" parameterType="Long">
|
||||
delete from mes_factory_model_detail where product_line_id = #{productLineId}
|
||||
</delete>
|
||||
</mapper>
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user