add - 设备台账、设备参数、班组信息

master
yinq 1 year ago
parent 11f0166e46
commit 9108cc607d

@ -0,0 +1,103 @@
package com.aucma.base.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.aucma.common.utils.DateUtils;
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.aucma.common.annotation.Log;
import com.aucma.common.core.controller.BaseController;
import com.aucma.common.core.domain.AjaxResult;
import com.aucma.common.enums.BusinessType;
import com.aucma.base.domain.BaseDeviceLedger;
import com.aucma.base.service.IBaseDeviceLedgerService;
import com.aucma.common.utils.poi.ExcelUtil;
import com.aucma.common.core.page.TableDataInfo;
/**
* Controller
*
* @author Yinq
* @date 2023-09-19
*/
@RestController
@RequestMapping("/base/deviceLedger" )
public class BaseDeviceLedgerController extends BaseController {
@Autowired
private IBaseDeviceLedgerService baseDeviceLedgerService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:deviceLedger:list')" )
@GetMapping("/list" )
public TableDataInfo list(BaseDeviceLedger baseDeviceLedger) {
startPage();
List<BaseDeviceLedger> list = baseDeviceLedgerService.selectBaseDeviceLedgerList(baseDeviceLedger);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:deviceLedger:export')" )
@Log(title = "设备台账" , businessType = BusinessType.EXPORT)
@PostMapping("/export" )
public void export(HttpServletResponse response, BaseDeviceLedger baseDeviceLedger) {
List<BaseDeviceLedger> list = baseDeviceLedgerService.selectBaseDeviceLedgerList(baseDeviceLedger);
ExcelUtil<BaseDeviceLedger> util = new ExcelUtil<BaseDeviceLedger>(BaseDeviceLedger. class);
util.exportExcel(response, list, "设备台账数据" );
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:deviceLedger:query')" )
@GetMapping(value = "/{objId}" )
public AjaxResult getInfo(@PathVariable("objId" ) Long objId) {
return success(baseDeviceLedgerService.selectBaseDeviceLedgerByObjId(objId));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:deviceLedger:add')" )
@Log(title = "设备台账" , businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BaseDeviceLedger baseDeviceLedger) {
baseDeviceLedger.setCreatedBy(getUsername());
baseDeviceLedger.setCreatedTime(DateUtils.getNowDate());
return toAjax(baseDeviceLedgerService.insertBaseDeviceLedger(baseDeviceLedger));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:deviceLedger:edit')" )
@Log(title = "设备台账" , businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BaseDeviceLedger baseDeviceLedger) {
baseDeviceLedger.setUpdatedBy(getUsername());
baseDeviceLedger.setUpdatedTime(DateUtils.getNowDate());
return toAjax(baseDeviceLedgerService.updateBaseDeviceLedger(baseDeviceLedger));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:deviceLedger:remove')" )
@Log(title = "设备台账" , businessType = BusinessType.DELETE)
@DeleteMapping("/{objIds}" )
public AjaxResult remove(@PathVariable Long[] objIds) {
return toAjax(baseDeviceLedgerService.deleteBaseDeviceLedgerByObjIds(objIds));
}
}

@ -0,0 +1,103 @@
package com.aucma.base.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.aucma.common.utils.DateUtils;
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.aucma.common.annotation.Log;
import com.aucma.common.core.controller.BaseController;
import com.aucma.common.core.domain.AjaxResult;
import com.aucma.common.enums.BusinessType;
import com.aucma.base.domain.BaseDeviceParam;
import com.aucma.base.service.IBaseDeviceParamService;
import com.aucma.common.utils.poi.ExcelUtil;
import com.aucma.common.core.page.TableDataInfo;
/**
* Controller
*
* @author Yinq
* @date 2023-09-19
*/
@RestController
@RequestMapping("/base/deviceParam" )
public class BaseDeviceParamController extends BaseController {
@Autowired
private IBaseDeviceParamService baseDeviceParamService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:deviceParam:list')" )
@GetMapping("/list" )
public TableDataInfo list(BaseDeviceParam baseDeviceParam) {
startPage();
List<BaseDeviceParam> list = baseDeviceParamService.selectBaseDeviceParamList(baseDeviceParam);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:deviceParam:export')" )
@Log(title = "设备参数" , businessType = BusinessType.EXPORT)
@PostMapping("/export" )
public void export(HttpServletResponse response, BaseDeviceParam baseDeviceParam) {
List<BaseDeviceParam> list = baseDeviceParamService.selectBaseDeviceParamList(baseDeviceParam);
ExcelUtil<BaseDeviceParam> util = new ExcelUtil<BaseDeviceParam>(BaseDeviceParam. class);
util.exportExcel(response, list, "设备参数数据" );
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:deviceParam:query')" )
@GetMapping(value = "/{objId}" )
public AjaxResult getInfo(@PathVariable("objId" ) Long objId) {
return success(baseDeviceParamService.selectBaseDeviceParamByObjId(objId));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:deviceParam:add')" )
@Log(title = "设备参数" , businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BaseDeviceParam baseDeviceParam) {
baseDeviceParam.setCreatedBy(getUsername());
baseDeviceParam.setCreatedTime(DateUtils.getNowDate());
return toAjax(baseDeviceParamService.insertBaseDeviceParam(baseDeviceParam));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:deviceParam:edit')" )
@Log(title = "设备参数" , businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BaseDeviceParam baseDeviceParam) {
baseDeviceParam.setUpdatedBy(getUsername());
baseDeviceParam.setUpdatedTime(DateUtils.getNowDate());
return toAjax(baseDeviceParamService.updateBaseDeviceParam(baseDeviceParam));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:deviceParam:remove')" )
@Log(title = "设备参数" , businessType = BusinessType.DELETE)
@DeleteMapping("/{objIds}" )
public AjaxResult remove(@PathVariable Long[] objIds) {
return toAjax(baseDeviceParamService.deleteBaseDeviceParamByObjIds(objIds));
}
}

@ -0,0 +1,103 @@
package com.aucma.base.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.aucma.common.utils.DateUtils;
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.aucma.common.annotation.Log;
import com.aucma.common.core.controller.BaseController;
import com.aucma.common.core.domain.AjaxResult;
import com.aucma.common.enums.BusinessType;
import com.aucma.base.domain.BaseTeamMembers;
import com.aucma.base.service.IBaseTeamMembersService;
import com.aucma.common.utils.poi.ExcelUtil;
import com.aucma.common.core.page.TableDataInfo;
/**
* Controller
*
* @author Yinq
* @date 2023-09-19
*/
@RestController
@RequestMapping("/base/teamMembers" )
public class BaseTeamMembersController extends BaseController {
@Autowired
private IBaseTeamMembersService baseTeamMembersService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:teamMembers:list')" )
@GetMapping("/list" )
public TableDataInfo list(BaseTeamMembers baseTeamMembers) {
startPage();
List<BaseTeamMembers> list = baseTeamMembersService.selectBaseTeamMembersList(baseTeamMembers);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:teamMembers:export')" )
@Log(title = "班组信息" , businessType = BusinessType.EXPORT)
@PostMapping("/export" )
public void export(HttpServletResponse response, BaseTeamMembers baseTeamMembers) {
List<BaseTeamMembers> list = baseTeamMembersService.selectBaseTeamMembersList(baseTeamMembers);
ExcelUtil<BaseTeamMembers> util = new ExcelUtil<BaseTeamMembers>(BaseTeamMembers. class);
util.exportExcel(response, list, "班组信息数据" );
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:teamMembers:query')" )
@GetMapping(value = "/{objId}" )
public AjaxResult getInfo(@PathVariable("objId" ) Long objId) {
return success(baseTeamMembersService.selectBaseTeamMembersByObjId(objId));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:teamMembers:add')" )
@Log(title = "班组信息" , businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BaseTeamMembers baseTeamMembers) {
baseTeamMembers.setCreatedBy(getUsername());
baseTeamMembers.setCreatedTime(DateUtils.getNowDate());
return toAjax(baseTeamMembersService.insertBaseTeamMembers(baseTeamMembers));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:teamMembers:edit')" )
@Log(title = "班组信息" , businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BaseTeamMembers baseTeamMembers) {
baseTeamMembers.setUpdatedBy(getUsername());
baseTeamMembers.setUpdatedTime(DateUtils.getNowDate());
return toAjax(baseTeamMembersService.updateBaseTeamMembers(baseTeamMembers));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('base:teamMembers:remove')" )
@Log(title = "班组信息" , businessType = BusinessType.DELETE)
@DeleteMapping("/{objIds}" )
public AjaxResult remove(@PathVariable Long[] objIds) {
return toAjax(baseTeamMembersService.deleteBaseTeamMembersByObjIds(objIds));
}
}

@ -0,0 +1,236 @@
package com.aucma.base.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.aucma.common.annotation.Excel;
import com.aucma.common.core.domain.BaseEntity;
/**
* base_deviceledger
*
* @author Yinq
* @date 2023-09-19
*/
public class BaseDeviceLedger extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long objId;
/**
*
*/
@Excel(name = "设备编号")
private String deviceCode;
/**
*
*/
@Excel(name = "设备名称")
private String deviceName;
/**
*
*/
@Excel(name = "设备型号")
private String deviceModel;
/**
*
*/
@Excel(name = "设备类型")
private Long deviceType;
/**
*
*/
@Excel(name = "设备位置")
private String deviceAddress;
/**
*
*/
@Excel(name = "设备状态")
private Long deviceStatus;
/**
* 使
*/
@Excel(name = "使用部门")
private String usedDepartment;
/**
*
*/
@Excel(name = "所属工位")
private String productLineCode;
/**
*
*/
@Excel(name = "启用标识")
private Long isFlag;
/**
*
*/
@Excel(name = "创建人")
private String createdBy;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createdTime;
/**
*
*/
@Excel(name = "更新人")
private String updatedBy;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
public void setObjId(Long objId) {
this.objId = objId;
}
public Long getObjId() {
return objId;
}
public void setDeviceCode(String deviceCode) {
this.deviceCode = deviceCode;
}
public String getDeviceCode() {
return deviceCode;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public String getDeviceName() {
return deviceName;
}
public void setDeviceModel(String deviceModel) {
this.deviceModel = deviceModel;
}
public String getDeviceModel() {
return deviceModel;
}
public void setDeviceType(Long deviceType) {
this.deviceType = deviceType;
}
public Long getDeviceType() {
return deviceType;
}
public void setDeviceAddress(String deviceAddress) {
this.deviceAddress = deviceAddress;
}
public String getDeviceAddress() {
return deviceAddress;
}
public void setDeviceStatus(Long deviceStatus) {
this.deviceStatus = deviceStatus;
}
public Long getDeviceStatus() {
return deviceStatus;
}
public void setUsedDepartment(String usedDepartment) {
this.usedDepartment = usedDepartment;
}
public String getUsedDepartment() {
return usedDepartment;
}
public void setProductLineCode(String productLineCode) {
this.productLineCode = productLineCode;
}
public String getProductLineCode() {
return productLineCode;
}
public void setIsFlag(Long isFlag) {
this.isFlag = isFlag;
}
public Long getIsFlag() {
return isFlag;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Date getCreatedTime() {
return createdTime;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
}
public Date getUpdatedTime() {
return updatedTime;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("objId", getObjId())
.append("deviceCode", getDeviceCode())
.append("deviceName", getDeviceName())
.append("deviceModel", getDeviceModel())
.append("deviceType", getDeviceType())
.append("deviceAddress", getDeviceAddress())
.append("deviceStatus", getDeviceStatus())
.append("usedDepartment", getUsedDepartment())
.append("productLineCode", getProductLineCode())
.append("isFlag", getIsFlag())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updatedBy", getUpdatedBy())
.append("updatedTime", getUpdatedTime())
.toString();
}
}

@ -0,0 +1,221 @@
package com.aucma.base.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.aucma.common.annotation.Excel;
import com.aucma.common.core.domain.BaseEntity;
/**
* base_deviceparam
*
* @author Yinq
* @date 2023-09-19
*/
public class BaseDeviceParam extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long objId;
/**
*
*/
@Excel(name = "参数编号")
private String paramCode;
/**
*
*/
@Excel(name = "参数名称")
private String paramName;
/**
*
*/
@Excel(name = "网络地址")
private String paramNetwork;
/**
*
*/
@Excel(name = "参数地址")
private String paramAddress;
/**
*
*/
@Excel(name = "参数类型")
private String paramType;
/**
*
*/
@Excel(name = "设备编号")
private String deviceCode;
/**
*
*/
@Excel(name = "读取频率", readConverterExp = "毫=秒")
private Long readFrequency;
/**
*
*/
@Excel(name = "启用标识")
private Long isFlag;
/**
*
*/
@Excel(name = "创建人")
private String createdBy;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createdTime;
/**
*
*/
@Excel(name = "更新人")
private String updatedBy;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
public void setObjId(Long objId) {
this.objId = objId;
}
public Long getObjId() {
return objId;
}
public void setParamCode(String paramCode) {
this.paramCode = paramCode;
}
public String getParamCode() {
return paramCode;
}
public void setParamName(String paramName) {
this.paramName = paramName;
}
public String getParamName() {
return paramName;
}
public void setParamNetwork(String paramNetwork) {
this.paramNetwork = paramNetwork;
}
public String getParamNetwork() {
return paramNetwork;
}
public void setParamAddress(String paramAddress) {
this.paramAddress = paramAddress;
}
public String getParamAddress() {
return paramAddress;
}
public void setParamType(String paramType) {
this.paramType = paramType;
}
public String getParamType() {
return paramType;
}
public void setDeviceCode(String deviceCode) {
this.deviceCode = deviceCode;
}
public String getDeviceCode() {
return deviceCode;
}
public void setReadFrequency(Long readFrequency) {
this.readFrequency = readFrequency;
}
public Long getReadFrequency() {
return readFrequency;
}
public void setIsFlag(Long isFlag) {
this.isFlag = isFlag;
}
public Long getIsFlag() {
return isFlag;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Date getCreatedTime() {
return createdTime;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
}
public Date getUpdatedTime() {
return updatedTime;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("objId", getObjId())
.append("paramCode", getParamCode())
.append("paramName", getParamName())
.append("paramNetwork", getParamNetwork())
.append("paramAddress", getParamAddress())
.append("paramType", getParamType())
.append("deviceCode", getDeviceCode())
.append("readFrequency", getReadFrequency())
.append("isFlag", getIsFlag())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updatedBy", getUpdatedBy())
.append("updatedTime", getUpdatedTime())
.toString();
}
}

@ -0,0 +1,190 @@
package com.aucma.base.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.aucma.common.annotation.Excel;
import com.aucma.common.core.domain.BaseEntity;
/**
* base_teammembers
*
* @author Yinq
* @date 2023-09-19
*/
public class BaseTeamMembers extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long objId;
/**
*
*/
@Excel(name = "班组编号")
private String teamCode;
/**
*
*/
@Excel(name = "班组名称")
private String teamName;
/**
*
*/
@Excel(name = "班组负责人")
private String teamHead;
/**
* 线
*/
@Excel(name = "所属产线编号")
private String productLineCode;
/**
* 线
*/
@Excel(name = "产线名称")
private String productLineName;
/**
*
*/
@Excel(name = "启用标识")
private Long isFlag;
/**
*
*/
@Excel(name = "创建人")
private String createdBy;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createdTime;
/**
*
*/
@Excel(name = "更新人")
private String updatedBy;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
public String getProductLineName() {
return productLineName;
}
public void setProductLineName(String productLineName) {
this.productLineName = productLineName;
}
public void setObjId(Long objId) {
this.objId = objId;
}
public Long getObjId() {
return objId;
}
public void setTeamCode(String teamCode) {
this.teamCode = teamCode;
}
public String getTeamCode() {
return teamCode;
}
public void setTeamName(String teamName) {
this.teamName = teamName;
}
public String getTeamName() {
return teamName;
}
public void setTeamHead(String teamHead) {
this.teamHead = teamHead;
}
public String getTeamHead() {
return teamHead;
}
public void setProductLineCode(String productLineCode) {
this.productLineCode = productLineCode;
}
public String getProductLineCode() {
return productLineCode;
}
public void setIsFlag(Long isFlag) {
this.isFlag = isFlag;
}
public Long getIsFlag() {
return isFlag;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Date getCreatedTime() {
return createdTime;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
}
public Date getUpdatedTime() {
return updatedTime;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("objId", getObjId())
.append("teamCode", getTeamCode())
.append("teamName", getTeamName())
.append("teamHead", getTeamHead())
.append("productLineCode", getProductLineCode())
.append("isFlag", getIsFlag())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updatedBy", getUpdatedBy())
.append("updatedTime", getUpdatedTime())
.toString();
}
}

@ -0,0 +1,61 @@
package com.aucma.base.mapper;
import java.util.List;
import com.aucma.base.domain.BaseDeviceLedger;
/**
* Mapper
*
* @author Yinq
* @date 2023-09-19
*/
public interface BaseDeviceLedgerMapper
{
/**
*
*
* @param objId
* @return
*/
public BaseDeviceLedger selectBaseDeviceLedgerByObjId(Long objId);
/**
*
*
* @param baseDeviceLedger
* @return
*/
public List<BaseDeviceLedger> selectBaseDeviceLedgerList(BaseDeviceLedger baseDeviceLedger);
/**
*
*
* @param baseDeviceLedger
* @return
*/
public int insertBaseDeviceLedger(BaseDeviceLedger baseDeviceLedger);
/**
*
*
* @param baseDeviceLedger
* @return
*/
public int updateBaseDeviceLedger(BaseDeviceLedger baseDeviceLedger);
/**
*
*
* @param objId
* @return
*/
public int deleteBaseDeviceLedgerByObjId(Long objId);
/**
*
*
* @param objIds
* @return
*/
public int deleteBaseDeviceLedgerByObjIds(Long[] objIds);
}

@ -0,0 +1,61 @@
package com.aucma.base.mapper;
import java.util.List;
import com.aucma.base.domain.BaseDeviceParam;
/**
* Mapper
*
* @author Yinq
* @date 2023-09-19
*/
public interface BaseDeviceParamMapper
{
/**
*
*
* @param objId
* @return
*/
public BaseDeviceParam selectBaseDeviceParamByObjId(Long objId);
/**
*
*
* @param baseDeviceParam
* @return
*/
public List<BaseDeviceParam> selectBaseDeviceParamList(BaseDeviceParam baseDeviceParam);
/**
*
*
* @param baseDeviceParam
* @return
*/
public int insertBaseDeviceParam(BaseDeviceParam baseDeviceParam);
/**
*
*
* @param baseDeviceParam
* @return
*/
public int updateBaseDeviceParam(BaseDeviceParam baseDeviceParam);
/**
*
*
* @param objId
* @return
*/
public int deleteBaseDeviceParamByObjId(Long objId);
/**
*
*
* @param objIds
* @return
*/
public int deleteBaseDeviceParamByObjIds(Long[] objIds);
}

@ -0,0 +1,61 @@
package com.aucma.base.mapper;
import java.util.List;
import com.aucma.base.domain.BaseTeamMembers;
/**
* Mapper
*
* @author Yinq
* @date 2023-09-19
*/
public interface BaseTeamMembersMapper
{
/**
*
*
* @param objId
* @return
*/
public BaseTeamMembers selectBaseTeamMembersByObjId(Long objId);
/**
*
*
* @param baseTeamMembers
* @return
*/
public List<BaseTeamMembers> selectBaseTeamMembersList(BaseTeamMembers baseTeamMembers);
/**
*
*
* @param baseTeamMembers
* @return
*/
public int insertBaseTeamMembers(BaseTeamMembers baseTeamMembers);
/**
*
*
* @param baseTeamMembers
* @return
*/
public int updateBaseTeamMembers(BaseTeamMembers baseTeamMembers);
/**
*
*
* @param objId
* @return
*/
public int deleteBaseTeamMembersByObjId(Long objId);
/**
*
*
* @param objIds
* @return
*/
public int deleteBaseTeamMembersByObjIds(Long[] objIds);
}

@ -0,0 +1,61 @@
package com.aucma.base.service;
import java.util.List;
import com.aucma.base.domain.BaseDeviceLedger;
/**
* Service
*
* @author Yinq
* @date 2023-09-19
*/
public interface IBaseDeviceLedgerService
{
/**
*
*
* @param objId
* @return
*/
public BaseDeviceLedger selectBaseDeviceLedgerByObjId(Long objId);
/**
*
*
* @param baseDeviceLedger
* @return
*/
public List<BaseDeviceLedger> selectBaseDeviceLedgerList(BaseDeviceLedger baseDeviceLedger);
/**
*
*
* @param baseDeviceLedger
* @return
*/
public int insertBaseDeviceLedger(BaseDeviceLedger baseDeviceLedger);
/**
*
*
* @param baseDeviceLedger
* @return
*/
public int updateBaseDeviceLedger(BaseDeviceLedger baseDeviceLedger);
/**
*
*
* @param objIds
* @return
*/
public int deleteBaseDeviceLedgerByObjIds(Long[] objIds);
/**
*
*
* @param objId
* @return
*/
public int deleteBaseDeviceLedgerByObjId(Long objId);
}

@ -0,0 +1,61 @@
package com.aucma.base.service;
import java.util.List;
import com.aucma.base.domain.BaseDeviceParam;
/**
* Service
*
* @author Yinq
* @date 2023-09-19
*/
public interface IBaseDeviceParamService
{
/**
*
*
* @param objId
* @return
*/
public BaseDeviceParam selectBaseDeviceParamByObjId(Long objId);
/**
*
*
* @param baseDeviceParam
* @return
*/
public List<BaseDeviceParam> selectBaseDeviceParamList(BaseDeviceParam baseDeviceParam);
/**
*
*
* @param baseDeviceParam
* @return
*/
public int insertBaseDeviceParam(BaseDeviceParam baseDeviceParam);
/**
*
*
* @param baseDeviceParam
* @return
*/
public int updateBaseDeviceParam(BaseDeviceParam baseDeviceParam);
/**
*
*
* @param objIds
* @return
*/
public int deleteBaseDeviceParamByObjIds(Long[] objIds);
/**
*
*
* @param objId
* @return
*/
public int deleteBaseDeviceParamByObjId(Long objId);
}

@ -0,0 +1,61 @@
package com.aucma.base.service;
import java.util.List;
import com.aucma.base.domain.BaseTeamMembers;
/**
* Service
*
* @author Yinq
* @date 2023-09-19
*/
public interface IBaseTeamMembersService
{
/**
*
*
* @param objId
* @return
*/
public BaseTeamMembers selectBaseTeamMembersByObjId(Long objId);
/**
*
*
* @param baseTeamMembers
* @return
*/
public List<BaseTeamMembers> selectBaseTeamMembersList(BaseTeamMembers baseTeamMembers);
/**
*
*
* @param baseTeamMembers
* @return
*/
public int insertBaseTeamMembers(BaseTeamMembers baseTeamMembers);
/**
*
*
* @param baseTeamMembers
* @return
*/
public int updateBaseTeamMembers(BaseTeamMembers baseTeamMembers);
/**
*
*
* @param objIds
* @return
*/
public int deleteBaseTeamMembersByObjIds(Long[] objIds);
/**
*
*
* @param objId
* @return
*/
public int deleteBaseTeamMembersByObjId(Long objId);
}

@ -0,0 +1,93 @@
package com.aucma.base.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.aucma.base.mapper.BaseDeviceLedgerMapper;
import com.aucma.base.domain.BaseDeviceLedger;
import com.aucma.base.service.IBaseDeviceLedgerService;
/**
* Service
*
* @author Yinq
* @date 2023-09-19
*/
@Service
public class BaseDeviceLedgerServiceImpl implements IBaseDeviceLedgerService
{
@Autowired
private BaseDeviceLedgerMapper baseDeviceLedgerMapper;
/**
*
*
* @param objId
* @return
*/
@Override
public BaseDeviceLedger selectBaseDeviceLedgerByObjId(Long objId)
{
return baseDeviceLedgerMapper.selectBaseDeviceLedgerByObjId(objId);
}
/**
*
*
* @param baseDeviceLedger
* @return
*/
@Override
public List<BaseDeviceLedger> selectBaseDeviceLedgerList(BaseDeviceLedger baseDeviceLedger)
{
return baseDeviceLedgerMapper.selectBaseDeviceLedgerList(baseDeviceLedger);
}
/**
*
*
* @param baseDeviceLedger
* @return
*/
@Override
public int insertBaseDeviceLedger(BaseDeviceLedger baseDeviceLedger)
{
return baseDeviceLedgerMapper.insertBaseDeviceLedger(baseDeviceLedger);
}
/**
*
*
* @param baseDeviceLedger
* @return
*/
@Override
public int updateBaseDeviceLedger(BaseDeviceLedger baseDeviceLedger)
{
return baseDeviceLedgerMapper.updateBaseDeviceLedger(baseDeviceLedger);
}
/**
*
*
* @param objIds
* @return
*/
@Override
public int deleteBaseDeviceLedgerByObjIds(Long[] objIds)
{
return baseDeviceLedgerMapper.deleteBaseDeviceLedgerByObjIds(objIds);
}
/**
*
*
* @param objId
* @return
*/
@Override
public int deleteBaseDeviceLedgerByObjId(Long objId)
{
return baseDeviceLedgerMapper.deleteBaseDeviceLedgerByObjId(objId);
}
}

@ -0,0 +1,93 @@
package com.aucma.base.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.aucma.base.mapper.BaseDeviceParamMapper;
import com.aucma.base.domain.BaseDeviceParam;
import com.aucma.base.service.IBaseDeviceParamService;
/**
* Service
*
* @author Yinq
* @date 2023-09-19
*/
@Service
public class BaseDeviceParamServiceImpl implements IBaseDeviceParamService
{
@Autowired
private BaseDeviceParamMapper baseDeviceParamMapper;
/**
*
*
* @param objId
* @return
*/
@Override
public BaseDeviceParam selectBaseDeviceParamByObjId(Long objId)
{
return baseDeviceParamMapper.selectBaseDeviceParamByObjId(objId);
}
/**
*
*
* @param baseDeviceParam
* @return
*/
@Override
public List<BaseDeviceParam> selectBaseDeviceParamList(BaseDeviceParam baseDeviceParam)
{
return baseDeviceParamMapper.selectBaseDeviceParamList(baseDeviceParam);
}
/**
*
*
* @param baseDeviceParam
* @return
*/
@Override
public int insertBaseDeviceParam(BaseDeviceParam baseDeviceParam)
{
return baseDeviceParamMapper.insertBaseDeviceParam(baseDeviceParam);
}
/**
*
*
* @param baseDeviceParam
* @return
*/
@Override
public int updateBaseDeviceParam(BaseDeviceParam baseDeviceParam)
{
return baseDeviceParamMapper.updateBaseDeviceParam(baseDeviceParam);
}
/**
*
*
* @param objIds
* @return
*/
@Override
public int deleteBaseDeviceParamByObjIds(Long[] objIds)
{
return baseDeviceParamMapper.deleteBaseDeviceParamByObjIds(objIds);
}
/**
*
*
* @param objId
* @return
*/
@Override
public int deleteBaseDeviceParamByObjId(Long objId)
{
return baseDeviceParamMapper.deleteBaseDeviceParamByObjId(objId);
}
}

@ -0,0 +1,93 @@
package com.aucma.base.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.aucma.base.mapper.BaseTeamMembersMapper;
import com.aucma.base.domain.BaseTeamMembers;
import com.aucma.base.service.IBaseTeamMembersService;
/**
* Service
*
* @author Yinq
* @date 2023-09-19
*/
@Service
public class BaseTeamMembersServiceImpl implements IBaseTeamMembersService
{
@Autowired
private BaseTeamMembersMapper baseTeamMembersMapper;
/**
*
*
* @param objId
* @return
*/
@Override
public BaseTeamMembers selectBaseTeamMembersByObjId(Long objId)
{
return baseTeamMembersMapper.selectBaseTeamMembersByObjId(objId);
}
/**
*
*
* @param baseTeamMembers
* @return
*/
@Override
public List<BaseTeamMembers> selectBaseTeamMembersList(BaseTeamMembers baseTeamMembers)
{
return baseTeamMembersMapper.selectBaseTeamMembersList(baseTeamMembers);
}
/**
*
*
* @param baseTeamMembers
* @return
*/
@Override
public int insertBaseTeamMembers(BaseTeamMembers baseTeamMembers)
{
return baseTeamMembersMapper.insertBaseTeamMembers(baseTeamMembers);
}
/**
*
*
* @param baseTeamMembers
* @return
*/
@Override
public int updateBaseTeamMembers(BaseTeamMembers baseTeamMembers)
{
return baseTeamMembersMapper.updateBaseTeamMembers(baseTeamMembers);
}
/**
*
*
* @param objIds
* @return
*/
@Override
public int deleteBaseTeamMembersByObjIds(Long[] objIds)
{
return baseTeamMembersMapper.deleteBaseTeamMembersByObjIds(objIds);
}
/**
*
*
* @param objId
* @return
*/
@Override
public int deleteBaseTeamMembersByObjId(Long objId)
{
return baseTeamMembersMapper.deleteBaseTeamMembersByObjId(objId);
}
}

@ -0,0 +1,121 @@
<?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.aucma.base.mapper.BaseDeviceLedgerMapper">
<resultMap type="BaseDeviceLedger" id="BaseDeviceLedgerResult">
<result property="objId" column="obj_id" />
<result property="deviceCode" column="device_code" />
<result property="deviceName" column="device_name" />
<result property="deviceModel" column="device_model" />
<result property="deviceType" column="device_type" />
<result property="deviceAddress" column="device_address" />
<result property="deviceStatus" column="device_status" />
<result property="usedDepartment" column="used_department" />
<result property="productLineCode" column="product_line_code" />
<result property="isFlag" column="is_flag" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="updated_time" />
</resultMap>
<sql id="selectBaseDeviceLedgerVo">
select obj_id, device_code, device_name, device_model, device_type, device_address, device_status, used_department, product_line_code, is_flag, created_by, created_time, updated_by, updated_time from base_deviceledger
</sql>
<select id="selectBaseDeviceLedgerList" parameterType="BaseDeviceLedger" resultMap="BaseDeviceLedgerResult">
<include refid="selectBaseDeviceLedgerVo"/>
<where>
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat(concat('%', #{deviceName}), '%')</if>
<if test="deviceModel != null and deviceModel != ''"> and device_model = #{deviceModel}</if>
<if test="deviceType != null "> and device_type = #{deviceType}</if>
<if test="deviceAddress != null and deviceAddress != ''"> and device_address = #{deviceAddress}</if>
<if test="deviceStatus != null "> and device_status = #{deviceStatus}</if>
<if test="usedDepartment != null and usedDepartment != ''"> and used_department = #{usedDepartment}</if>
<if test="productLineCode != null and productLineCode != ''"> and product_line_code = #{productLineCode}</if>
<if test="isFlag != null "> and is_flag = #{isFlag}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if>
</where>
</select>
<select id="selectBaseDeviceLedgerByObjId" parameterType="Long" resultMap="BaseDeviceLedgerResult">
<include refid="selectBaseDeviceLedgerVo"/>
where obj_id = #{objId}
</select>
<insert id="insertBaseDeviceLedger" parameterType="BaseDeviceLedger">
<selectKey keyProperty="objId" resultType="long" order="BEFORE">
SELECT seq_base_deviceledger.NEXTVAL as objId FROM DUAL
</selectKey>
insert into base_deviceledger
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="objId != null">obj_id,</if>
<if test="deviceCode != null">device_code,</if>
<if test="deviceName != null">device_name,</if>
<if test="deviceModel != null">device_model,</if>
<if test="deviceType != null">device_type,</if>
<if test="deviceAddress != null">device_address,</if>
<if test="deviceStatus != null">device_status,</if>
<if test="usedDepartment != null">used_department,</if>
<if test="productLineCode != null">product_line_code,</if>
<if test="isFlag != null">is_flag,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objId != null">#{objId},</if>
<if test="deviceCode != null">#{deviceCode},</if>
<if test="deviceName != null">#{deviceName},</if>
<if test="deviceModel != null">#{deviceModel},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="deviceAddress != null">#{deviceAddress},</if>
<if test="deviceStatus != null">#{deviceStatus},</if>
<if test="usedDepartment != null">#{usedDepartment},</if>
<if test="productLineCode != null">#{productLineCode},</if>
<if test="isFlag != null">#{isFlag},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
</trim>
</insert>
<update id="updateBaseDeviceLedger" parameterType="BaseDeviceLedger">
update base_deviceledger
<trim prefix="SET" suffixOverrides=",">
<if test="deviceCode != null">device_code = #{deviceCode},</if>
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="deviceModel != null">device_model = #{deviceModel},</if>
<if test="deviceType != null">device_type = #{deviceType},</if>
<if test="deviceAddress != null">device_address = #{deviceAddress},</if>
<if test="deviceStatus != null">device_status = #{deviceStatus},</if>
<if test="usedDepartment != null">used_department = #{usedDepartment},</if>
<if test="productLineCode != null">product_line_code = #{productLineCode},</if>
<if test="isFlag != null">is_flag = #{isFlag},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
</trim>
where obj_id = #{objId}
</update>
<delete id="deleteBaseDeviceLedgerByObjId" parameterType="Long">
delete from base_deviceledger where obj_id = #{objId}
</delete>
<delete id="deleteBaseDeviceLedgerByObjIds" parameterType="String">
delete from base_deviceledger where obj_id in
<foreach item="objId" collection="array" open="(" separator="," close=")">
#{objId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,116 @@
<?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.aucma.base.mapper.BaseDeviceParamMapper">
<resultMap type="BaseDeviceParam" id="BaseDeviceParamResult">
<result property="objId" column="obj_id" />
<result property="paramCode" column="param_code" />
<result property="paramName" column="param_name" />
<result property="paramNetwork" column="param_network" />
<result property="paramAddress" column="param_address" />
<result property="paramType" column="param_type" />
<result property="deviceCode" column="device_code" />
<result property="readFrequency" column="read_frequency" />
<result property="isFlag" column="is_flag" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="updated_time" />
</resultMap>
<sql id="selectBaseDeviceParamVo">
select obj_id, param_code, param_name, param_network, param_address, param_type, device_code, read_frequency, is_flag, created_by, created_time, updated_by, updated_time from base_deviceparam
</sql>
<select id="selectBaseDeviceParamList" parameterType="BaseDeviceParam" resultMap="BaseDeviceParamResult">
<include refid="selectBaseDeviceParamVo"/>
<where>
<if test="paramCode != null and paramCode != ''"> and param_code = #{paramCode}</if>
<if test="paramName != null and paramName != ''"> and param_name like concat(concat('%', #{paramName}), '%')</if>
<if test="paramNetwork != null and paramNetwork != ''"> and param_network = #{paramNetwork}</if>
<if test="paramAddress != null and paramAddress != ''"> and param_address = #{paramAddress}</if>
<if test="paramType != null and paramType != ''"> and param_type = #{paramType}</if>
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
<if test="readFrequency != null "> and read_frequency = #{readFrequency}</if>
<if test="isFlag != null "> and is_flag = #{isFlag}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if>
</where>
</select>
<select id="selectBaseDeviceParamByObjId" parameterType="Long" resultMap="BaseDeviceParamResult">
<include refid="selectBaseDeviceParamVo"/>
where obj_id = #{objId}
</select>
<insert id="insertBaseDeviceParam" parameterType="BaseDeviceParam">
<selectKey keyProperty="objId" resultType="long" order="BEFORE">
SELECT seq_base_deviceparam.NEXTVAL as objId FROM DUAL
</selectKey>
insert into base_deviceparam
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="objId != null">obj_id,</if>
<if test="paramCode != null">param_code,</if>
<if test="paramName != null">param_name,</if>
<if test="paramNetwork != null">param_network,</if>
<if test="paramAddress != null">param_address,</if>
<if test="paramType != null">param_type,</if>
<if test="deviceCode != null">device_code,</if>
<if test="readFrequency != null">read_frequency,</if>
<if test="isFlag != null">is_flag,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objId != null">#{objId},</if>
<if test="paramCode != null">#{paramCode},</if>
<if test="paramName != null">#{paramName},</if>
<if test="paramNetwork != null">#{paramNetwork},</if>
<if test="paramAddress != null">#{paramAddress},</if>
<if test="paramType != null">#{paramType},</if>
<if test="deviceCode != null">#{deviceCode},</if>
<if test="readFrequency != null">#{readFrequency},</if>
<if test="isFlag != null">#{isFlag},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
</trim>
</insert>
<update id="updateBaseDeviceParam" parameterType="BaseDeviceParam">
update base_deviceparam
<trim prefix="SET" suffixOverrides=",">
<if test="paramCode != null">param_code = #{paramCode},</if>
<if test="paramName != null">param_name = #{paramName},</if>
<if test="paramNetwork != null">param_network = #{paramNetwork},</if>
<if test="paramAddress != null">param_address = #{paramAddress},</if>
<if test="paramType != null">param_type = #{paramType},</if>
<if test="deviceCode != null">device_code = #{deviceCode},</if>
<if test="readFrequency != null">read_frequency = #{readFrequency},</if>
<if test="isFlag != null">is_flag = #{isFlag},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
</trim>
where obj_id = #{objId}
</update>
<delete id="deleteBaseDeviceParamByObjId" parameterType="Long">
delete from base_deviceparam where obj_id = #{objId}
</delete>
<delete id="deleteBaseDeviceParamByObjIds" parameterType="String">
delete from base_deviceparam where obj_id in
<foreach item="objId" collection="array" open="(" separator="," close=")">
#{objId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,114 @@
<?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.aucma.base.mapper.BaseTeamMembersMapper">
<resultMap type="BaseTeamMembers" id="BaseTeamMembersResult">
<result property="objId" column="obj_id" />
<result property="teamCode" column="team_code" />
<result property="teamName" column="team_name" />
<result property="teamHead" column="team_head" />
<result property="productLineCode" column="product_line_code" />
<result property="productLineName" column="productLineName" />
<result property="isFlag" column="is_flag" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="updated_time" />
</resultMap>
<sql id="selectBaseTeamMembersVo">
select tm.obj_id,
tm.team_code,
tm.team_name,
tm.team_head,
tm.product_line_code,
bpl.PRODUCT_LINE_NAME productLineName,
tm.is_flag,
tm.created_by,
tm.created_time,
tm.updated_by,
tm.updated_time
from base_teammembers tm
left join base_productline bpl on bpl.PRODUCT_LINE_CODE = tm.PRODUCT_LINE_CODE
</sql>
<select id="selectBaseTeamMembersList" parameterType="BaseTeamMembers" resultMap="BaseTeamMembersResult">
<include refid="selectBaseTeamMembersVo"/>
<where>
<if test="teamCode != null and teamCode != ''"> and tm.team_code = #{teamCode}</if>
<if test="teamName != null and teamName != ''"> and tm.team_name like concat(concat('%', #{teamName}), '%')</if>
<if test="teamHead != null and teamHead != ''"> and tm.team_head = #{teamHead}</if>
<if test="productLineCode != null and productLineCode != ''"> and tm.product_line_code = #{productLineCode}</if>
<if test="isFlag != null "> and tm.is_flag = #{isFlag}</if>
<if test="createdBy != null and createdBy != ''"> and tm.created_by = #{createdBy}</if>
<if test="createdTime != null "> and tm.created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and tm.updated_by = #{updatedBy}</if>
<if test="updatedTime != null "> and tm.updated_time = #{updatedTime}</if>
</where>
</select>
<select id="selectBaseTeamMembersByObjId" parameterType="Long" resultMap="BaseTeamMembersResult">
<include refid="selectBaseTeamMembersVo"/>
where tm.obj_id = #{objId}
</select>
<insert id="insertBaseTeamMembers" parameterType="BaseTeamMembers">
<selectKey keyProperty="objId" resultType="long" order="BEFORE">
SELECT seq_base_teammembers.NEXTVAL as objId FROM DUAL
</selectKey>
insert into base_teammembers
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="objId != null">obj_id,</if>
<if test="teamCode != null">team_code,</if>
<if test="teamName != null">team_name,</if>
<if test="teamHead != null">team_head,</if>
<if test="productLineCode != null">product_line_code,</if>
<if test="isFlag != null">is_flag,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objId != null">#{objId},</if>
<if test="teamCode != null">#{teamCode},</if>
<if test="teamName != null">#{teamName},</if>
<if test="teamHead != null">#{teamHead},</if>
<if test="productLineCode != null">#{productLineCode},</if>
<if test="isFlag != null">#{isFlag},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
</trim>
</insert>
<update id="updateBaseTeamMembers" parameterType="BaseTeamMembers">
update base_teammembers
<trim prefix="SET" suffixOverrides=",">
<if test="teamCode != null">team_code = #{teamCode},</if>
<if test="teamName != null">team_name = #{teamName},</if>
<if test="teamHead != null">team_head = #{teamHead},</if>
<if test="productLineCode != null">product_line_code = #{productLineCode},</if>
<if test="isFlag != null">is_flag = #{isFlag},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
</trim>
where obj_id = #{objId}
</update>
<delete id="deleteBaseTeamMembersByObjId" parameterType="Long">
delete from base_teammembers where obj_id = #{objId}
</delete>
<delete id="deleteBaseTeamMembersByObjIds" parameterType="String">
delete from base_teammembers where obj_id in
<foreach item="objId" collection="array" open="(" separator="," close=")">
#{objId}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save