diff --git a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/machinery/CqygMachineCodeInfoController.java b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/machinery/CqygMachineCodeInfoController.java new file mode 100644 index 00000000..f55fd6cc --- /dev/null +++ b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/machinery/CqygMachineCodeInfoController.java @@ -0,0 +1,98 @@ +package com.god.web.controller.machinery; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +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.god.common.annotation.Log; +import com.god.common.core.controller.BaseController; +import com.god.common.core.domain.AjaxResult; +import com.god.common.enums.BusinessType; +import com.god.passenger.machinery.domain.CqygMachineCodeInfo; +import com.god.passenger.machinery.service.ICqygMachineCodeInfoService; +import com.god.common.utils.poi.ExcelUtil; +import com.god.common.core.page.TableDataInfo; + +/** + * 数字农机编码管理Controller + * + * @author wangyan + * @date 2023-11-13 + */ +@RestController +@RequestMapping("/machinery/info") +public class CqygMachineCodeInfoController extends BaseController { + @Autowired + private ICqygMachineCodeInfoService cqygMachineCodeInfoService; + + /** + * 查询数字农机编码管理列表 + */ + @PreAuthorize("@ss.hasPermi('machinery:info:list')") + @GetMapping("/list") + public TableDataInfo list(CqygMachineCodeInfo cqygMachineCodeInfo) { + startPage(); + List list = cqygMachineCodeInfoService.selectCqygMachineCodeInfoList(cqygMachineCodeInfo); + return getDataTable(list); + } + + /** + * 导出数字农机编码管理列表 + */ + @PreAuthorize("@ss.hasPermi('machinery:info:export')") + @Log(title = "数字农机编码管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, CqygMachineCodeInfo cqygMachineCodeInfo) { + List list = cqygMachineCodeInfoService.selectCqygMachineCodeInfoList(cqygMachineCodeInfo); + ExcelUtil util = new ExcelUtil(CqygMachineCodeInfo.class); + util.exportExcel(response, list, "数字农机编码管理数据"); + } + + /** + * 获取数字农机编码管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('machinery:info:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) { + return success(cqygMachineCodeInfoService.selectCqygMachineCodeInfoById(id)); + } + + /** + * 新增数字农机编码管理 + */ + @PreAuthorize("@ss.hasPermi('machinery:info:add')") + @Log(title = "数字农机编码管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody CqygMachineCodeInfo cqygMachineCodeInfo) { + return toAjax(cqygMachineCodeInfoService.insertCqygMachineCodeInfo(cqygMachineCodeInfo)); + } + + /** + * 修改数字农机编码管理 + */ + @PreAuthorize("@ss.hasPermi('machinery:info:edit')") + @Log(title = "数字农机编码管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody CqygMachineCodeInfo cqygMachineCodeInfo) { + return toAjax(cqygMachineCodeInfoService.updateCqygMachineCodeInfo(cqygMachineCodeInfo)); + } + + /** + * 删除数字农机编码管理 + */ + @PreAuthorize("@ss.hasPermi('machinery:info:remove')") + @Log(title = "数字农机编码管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) { + return toAjax(cqygMachineCodeInfoService.deleteCqygMachineCodeInfoByIds(ids)); + } +} diff --git a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/machinery/domain/CqygMachineCodeInfo.java b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/machinery/domain/CqygMachineCodeInfo.java new file mode 100644 index 00000000..d905343a --- /dev/null +++ b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/machinery/domain/CqygMachineCodeInfo.java @@ -0,0 +1,122 @@ +package com.god.passenger.machinery.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.god.common.annotation.Excel; +import com.god.common.core.domain.BaseEntity; + +/** + * 数字农机编码管理对象 cqyg_machine_code_info + * + * @author wangyan + * @date 2023-11-13 + */ +public class CqygMachineCodeInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private String id; + + /** 机器编码 */ + @Excel(name = "机器编码") + private String machineCode; + + /** 出厂编号 */ + @Excel(name = "出厂编号") + private String factoryNumber; + + /** 农机型号 */ + @Excel(name = "农机型号") + private String machineModel; + + /** 农机名称 */ + @Excel(name = "农机名称") + private String machineName; + + /** 农机类型 */ + @Excel(name = "农机类型") + private String machineTypeCode; + + /** 发码时间 */ + @Excel(name = "发码时间") + private String codeSendTime; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + public void setMachineCode(String machineCode) + { + this.machineCode = machineCode; + } + + public String getMachineCode() + { + return machineCode; + } + public void setFactoryNumber(String factoryNumber) + { + this.factoryNumber = factoryNumber; + } + + public String getFactoryNumber() + { + return factoryNumber; + } + public void setMachineModel(String machineModel) + { + this.machineModel = machineModel; + } + + public String getMachineModel() + { + return machineModel; + } + public void setMachineName(String machineName) + { + this.machineName = machineName; + } + + public String getMachineName() + { + return machineName; + } + public void setMachineTypeCode(String machineTypeCode) + { + this.machineTypeCode = machineTypeCode; + } + + public String getMachineTypeCode() + { + return machineTypeCode; + } + public void setCodeSendTime(String codeSendTime) + { + this.codeSendTime = codeSendTime; + } + + public String getCodeSendTime() + { + return codeSendTime; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("machineCode", getMachineCode()) + .append("factoryNumber", getFactoryNumber()) + .append("machineModel", getMachineModel()) + .append("machineName", getMachineName()) + .append("machineTypeCode", getMachineTypeCode()) + .append("codeSendTime", getCodeSendTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/machinery/mapper/CqygMachineCodeInfoMapper.java b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/machinery/mapper/CqygMachineCodeInfoMapper.java new file mode 100644 index 00000000..b4438452 --- /dev/null +++ b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/machinery/mapper/CqygMachineCodeInfoMapper.java @@ -0,0 +1,61 @@ +package com.god.passenger.machinery.mapper; + +import java.util.List; +import com.god.passenger.machinery.domain.CqygMachineCodeInfo; + +/** + * 数字农机编码管理Mapper接口 + * + * @author wangyan + * @date 2023-11-13 + */ +public interface CqygMachineCodeInfoMapper +{ + /** + * 查询数字农机编码管理 + * + * @param id 数字农机编码管理主键 + * @return 数字农机编码管理 + */ + public CqygMachineCodeInfo selectCqygMachineCodeInfoById(String id); + + /** + * 查询数字农机编码管理列表 + * + * @param cqygMachineCodeInfo 数字农机编码管理 + * @return 数字农机编码管理集合 + */ + public List selectCqygMachineCodeInfoList(CqygMachineCodeInfo cqygMachineCodeInfo); + + /** + * 新增数字农机编码管理 + * + * @param cqygMachineCodeInfo 数字农机编码管理 + * @return 结果 + */ + public int insertCqygMachineCodeInfo(CqygMachineCodeInfo cqygMachineCodeInfo); + + /** + * 修改数字农机编码管理 + * + * @param cqygMachineCodeInfo 数字农机编码管理 + * @return 结果 + */ + public int updateCqygMachineCodeInfo(CqygMachineCodeInfo cqygMachineCodeInfo); + + /** + * 删除数字农机编码管理 + * + * @param id 数字农机编码管理主键 + * @return 结果 + */ + public int deleteCqygMachineCodeInfoById(String id); + + /** + * 批量删除数字农机编码管理 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteCqygMachineCodeInfoByIds(String[] ids); +} diff --git a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/machinery/service/ICqygMachineCodeInfoService.java b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/machinery/service/ICqygMachineCodeInfoService.java new file mode 100644 index 00000000..f159583d --- /dev/null +++ b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/machinery/service/ICqygMachineCodeInfoService.java @@ -0,0 +1,61 @@ +package com.god.passenger.machinery.service; + +import java.util.List; +import com.god.passenger.machinery.domain.CqygMachineCodeInfo; + +/** + * 数字农机编码管理Service接口 + * + * @author wangyan + * @date 2023-11-13 + */ +public interface ICqygMachineCodeInfoService +{ + /** + * 查询数字农机编码管理 + * + * @param id 数字农机编码管理主键 + * @return 数字农机编码管理 + */ + public CqygMachineCodeInfo selectCqygMachineCodeInfoById(String id); + + /** + * 查询数字农机编码管理列表 + * + * @param cqygMachineCodeInfo 数字农机编码管理 + * @return 数字农机编码管理集合 + */ + public List selectCqygMachineCodeInfoList(CqygMachineCodeInfo cqygMachineCodeInfo); + + /** + * 新增数字农机编码管理 + * + * @param cqygMachineCodeInfo 数字农机编码管理 + * @return 结果 + */ + public int insertCqygMachineCodeInfo(CqygMachineCodeInfo cqygMachineCodeInfo); + + /** + * 修改数字农机编码管理 + * + * @param cqygMachineCodeInfo 数字农机编码管理 + * @return 结果 + */ + public int updateCqygMachineCodeInfo(CqygMachineCodeInfo cqygMachineCodeInfo); + + /** + * 批量删除数字农机编码管理 + * + * @param ids 需要删除的数字农机编码管理主键集合 + * @return 结果 + */ + public int deleteCqygMachineCodeInfoByIds(String[] ids); + + /** + * 删除数字农机编码管理信息 + * + * @param id 数字农机编码管理主键 + * @return 结果 + */ + public int deleteCqygMachineCodeInfoById(String id); +} diff --git a/God-Vue-master/god-passenger/src/main/java/com/god/passenger/machinery/service/impl/CqygMachineCodeInfoServiceImpl.java b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/machinery/service/impl/CqygMachineCodeInfoServiceImpl.java new file mode 100644 index 00000000..a972b0ca --- /dev/null +++ b/God-Vue-master/god-passenger/src/main/java/com/god/passenger/machinery/service/impl/CqygMachineCodeInfoServiceImpl.java @@ -0,0 +1,92 @@ +package com.god.passenger.machinery.service.impl; + +import java.util.List; + +import com.god.common.utils.StringUtils; +import com.god.common.utils.uuid.IdUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.god.passenger.machinery.mapper.CqygMachineCodeInfoMapper; +import com.god.passenger.machinery.domain.CqygMachineCodeInfo; +import com.god.passenger.machinery.service.ICqygMachineCodeInfoService; + +/** + * 数字农机编码管理Service业务层处理 + * + * @author wangyan + * @date 2023-11-13 + */ +@Service +public class CqygMachineCodeInfoServiceImpl implements ICqygMachineCodeInfoService { + @Autowired + private CqygMachineCodeInfoMapper cqygMachineCodeInfoMapper; + + /** + * 查询数字农机编码管理 + * + * @param id 数字农机编码管理主键 + * @return 数字农机编码管理 + */ + @Override + public CqygMachineCodeInfo selectCqygMachineCodeInfoById(String id) { + return cqygMachineCodeInfoMapper.selectCqygMachineCodeInfoById(id); + } + + /** + * 查询数字农机编码管理列表 + * + * @param cqygMachineCodeInfo 数字农机编码管理 + * @return 数字农机编码管理 + */ + @Override + public List selectCqygMachineCodeInfoList(CqygMachineCodeInfo cqygMachineCodeInfo) { + return cqygMachineCodeInfoMapper.selectCqygMachineCodeInfoList(cqygMachineCodeInfo); + } + + /** + * 新增数字农机编码管理 + * + * @param cqygMachineCodeInfo 数字农机编码管理 + * @return 结果 + */ + @Override + public int insertCqygMachineCodeInfo(CqygMachineCodeInfo cqygMachineCodeInfo) { + if (StringUtils.isBlank(cqygMachineCodeInfo.getId())){ + cqygMachineCodeInfo.setId(IdUtils.fastSimpleUUID()); + } + return cqygMachineCodeInfoMapper.insertCqygMachineCodeInfo(cqygMachineCodeInfo); + } + + /** + * 修改数字农机编码管理 + * + * @param cqygMachineCodeInfo 数字农机编码管理 + * @return 结果 + */ + @Override + public int updateCqygMachineCodeInfo(CqygMachineCodeInfo cqygMachineCodeInfo) { + return cqygMachineCodeInfoMapper.updateCqygMachineCodeInfo(cqygMachineCodeInfo); + } + + /** + * 批量删除数字农机编码管理 + * + * @param ids 需要删除的数字农机编码管理主键 + * @return 结果 + */ + @Override + public int deleteCqygMachineCodeInfoByIds(String[] ids) { + return cqygMachineCodeInfoMapper.deleteCqygMachineCodeInfoByIds(ids); + } + + /** + * 删除数字农机编码管理信息 + * + * @param id 数字农机编码管理主键 + * @return 结果 + */ + @Override + public int deleteCqygMachineCodeInfoById(String id) { + return cqygMachineCodeInfoMapper.deleteCqygMachineCodeInfoById(id); + } +} diff --git a/God-Vue-master/god-passenger/src/main/resources/mapper/machinery/CqygMachineCodeInfoMapper.xml b/God-Vue-master/god-passenger/src/main/resources/mapper/machinery/CqygMachineCodeInfoMapper.xml new file mode 100644 index 00000000..6682e983 --- /dev/null +++ b/God-Vue-master/god-passenger/src/main/resources/mapper/machinery/CqygMachineCodeInfoMapper.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + select id, machine_code, factory_number, machine_model, machine_name, machine_type_code, code_send_time, remark from cqyg_machine_code_info + + + + + + + + insert into cqyg_machine_code_info + + id, + machine_code, + factory_number, + machine_model, + machine_name, + machine_type_code, + code_send_time, + remark, + + + #{id}, + #{machineCode}, + #{factoryNumber}, + #{machineModel}, + #{machineName}, + #{machineTypeCode}, + #{codeSendTime}, + #{remark}, + + + + + update cqyg_machine_code_info + + machine_code = #{machineCode}, + factory_number = #{factoryNumber}, + machine_model = #{machineModel}, + machine_name = #{machineName}, + machine_type_code = #{machineTypeCode}, + code_send_time = #{codeSendTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from cqyg_machine_code_info where id = #{id} + + + + delete from cqyg_machine_code_info where id in + + #{id} + + + \ No newline at end of file diff --git a/god-ui/src/api/machinery/info.js b/god-ui/src/api/machinery/info.js new file mode 100644 index 00000000..5f523df4 --- /dev/null +++ b/god-ui/src/api/machinery/info.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询数字农机编码管理列表 +export function listInfo(query) { + return request({ + url: '/machinery/info/list', + method: 'get', + params: query + }) +} + +// 查询数字农机编码管理详细 +export function getInfo(id) { + return request({ + url: '/machinery/info/' + id, + method: 'get' + }) +} + +// 新增数字农机编码管理 +export function addInfo(data) { + return request({ + url: '/machinery/info', + method: 'post', + data: data + }) +} + +// 修改数字农机编码管理 +export function updateInfo(data) { + return request({ + url: '/machinery/info', + method: 'put', + data: data + }) +} + +// 删除数字农机编码管理 +export function delInfo(id) { + return request({ + url: '/machinery/info/' + id, + method: 'delete' + }) +} diff --git a/god-ui/src/views/machinery/info/index.vue b/god-ui/src/views/machinery/info/index.vue new file mode 100644 index 00000000..6982c422 --- /dev/null +++ b/god-ui/src/views/machinery/info/index.vue @@ -0,0 +1,339 @@ + + + diff --git a/god-ui/src/views/machinery/rule/index.vue b/god-ui/src/views/machinery/rule/index.vue index 56d8e11c..c9a328bf 100644 --- a/god-ui/src/views/machinery/rule/index.vue +++ b/god-ui/src/views/machinery/rule/index.vue @@ -109,7 +109,7 @@ - + @@ -252,12 +252,12 @@ export default { } // 当上一条数据等于下一条数据, //row.ownerCode === prevRow.ownerCode用来限定合并依据需要加上合同编号判断 - if (prevRow && prevRow[column.property] == cellValue && row.largeCategoryCode === prevRow.largeCategoryCode) { + if (prevRow && prevRow[column.property] == cellValue && row.codeInfo === prevRow.codeInfo) { return {rowspan: 0, colspan: 0} } else { let rowspan = 1 //row.ownerCode === prevRow.ownerCode用来限定合并依据需要加上合同编号判断 - while (nextRow && nextRow[column.property] == cellValue && row.largeCategoryCode === nextRow.largeCategoryCode) { + while (nextRow && nextRow[column.property] == cellValue && row.codeInfo === nextRow.codeInfo) { rowspan++ nextRow = dataProvider[rowspan + rowIndex]