diff --git a/ruoyi-admin/src/main/java/com/ruoyi/stock/domain/StockInfo.java b/ruoyi-admin/src/main/java/com/ruoyi/stock/domain/StockInfo.java index 95dbce5b..63010d31 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/stock/domain/StockInfo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/stock/domain/StockInfo.java @@ -1,6 +1,7 @@ package com.ruoyi.stock.domain; import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.FieldCompare; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -22,30 +23,31 @@ public class StockInfo extends BaseEntity private Long stockId; /** 仓库编号 */ + @FieldCompare(chineseName = "仓库编号") @Excel(name = "仓库编号") private String stockNO; /** 仓库名 */ + @FieldCompare(chineseName = "仓库名") @Excel(name = "仓库名") private String stockName; /** 仓库地址 */ + @FieldCompare(chineseName = "仓库地址") @Excel(name = "仓库地址") private String stockAddr; /** 仓库管理人 */ + @FieldCompare(chineseName = "仓库管理人") @Excel(name = "仓库管理人") private String stockManager; - @Excel(name = "仓库管理人电话") - private String stockManagerPhone; /** 仓库备注 */ + @FieldCompare(chineseName = "仓库备注") @Excel(name = "仓库备注") private String stockMemo; - /** */ - private String defaltItemclass; /** 录入时间 */ @Excel(name = "录入时间",dateFormat = "yyyy-MM-dd HH:mm:ss") @@ -105,16 +107,6 @@ public class StockInfo extends BaseEntity this.stockMemo = stockMemo; } - public void setDefaltItemclass(String defaltItemclass) - { - this.defaltItemclass = defaltItemclass; - } - - public String getDefaltItemclass() - { - return defaltItemclass; - } - public Date getFirstAddTime() { return firstAddTime; } @@ -131,13 +123,6 @@ public class StockInfo extends BaseEntity this.updateInfoTime = updateInfoTime; } - public String getStockManagerPhone() { - return stockManagerPhone; - } - - public void setStockManagerPhone(String stockManagerPhone) { - this.stockManagerPhone = stockManagerPhone; - } @Override public String toString() { @@ -146,10 +131,8 @@ public class StockInfo extends BaseEntity .append("stockNO", getStockNO()) .append("stockName", getStockName()) .append("stockAddr", getStockAddr()) - .append("stockmanager", getStockManager()) - .append("stockManagerPhone", getStockManagerPhone()) + .append("stockManager", getStockManager()) .append("stockmemo", getStockMemo()) - .append("defaltItemclass", getDefaltItemclass()) .append("firstAddTime", getFirstAddTime()) .append("updateInfoTime", getUpdateInfoTime()) .toString(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/stock/service/impl/StockInfoServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/stock/service/impl/StockInfoServiceImpl.java index 3b5c2019..b31c5a40 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/stock/service/impl/StockInfoServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/stock/service/impl/StockInfoServiceImpl.java @@ -1,13 +1,23 @@ package com.ruoyi.stock.service.impl; +import com.ruoyi.common.constant.BusinessKeysConstants; +import com.ruoyi.common.core.domain.entity.SysFieldDifferent; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.exception.BusinessException; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.FieldCompareUtil; +import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.stock.domain.StockInfo; import com.ruoyi.stock.mapper.StockInfoMapper; import com.ruoyi.stock.service.IStockInfoService; +import com.ruoyi.system.domain.SysDiffLog; +import com.ruoyi.system.service.ISysDiffLogService; +import lombok.SneakyThrows; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import java.util.List; @@ -23,6 +33,9 @@ public class StockInfoServiceImpl implements IStockInfoService @Autowired private StockInfoMapper stockInfoMapper; + @Autowired + private ISysDiffLogService diffLogService; + @Autowired private RedisCache redisCache; @@ -56,11 +69,22 @@ public class StockInfoServiceImpl implements IStockInfoService * @param stockInfo 仓库信息 * @return 结果 */ + @Transactional(rollbackFor = Exception.class) @Override public int insertStockInfo(StockInfo stockInfo) { + + SysDiffLog sysDiffLog = new SysDiffLog(); stockInfo.setFirstAddTime(DateUtils.getNowDate()); - return stockInfoMapper.insertStockInfo(stockInfo); + int insertStockInfo = stockInfoMapper.insertStockInfo(stockInfo); + Long stockId = stockInfo.getStockId(); + sysDiffLog.setBusinessId(stockId); + sysDiffLog.setBusinessKey(BusinessKeysConstants.STOCK_INFO); + int insertSysDiffLog = diffLogService.insertSysDiffLog(sysDiffLog); + if (insertSysDiffLog <= 0){ + throw new BusinessException("新增仓库信息数据修改记录失败"); + } + return insertStockInfo; } /** @@ -69,10 +93,24 @@ public class StockInfoServiceImpl implements IStockInfoService * @param stockInfo 仓库信息 * @return 结果 */ + @SneakyThrows + @Transactional(rollbackFor = Exception.class) @Override public int updateStockInfo(StockInfo stockInfo) { stockInfo.setUpdateInfoTime(DateUtils.getNowDate()); + Long stockId = stockInfo.getStockId(); + StockInfo oldStockInfo = stockInfoMapper.selectStockInfoById(stockId); + if (oldStockInfo == null){ + throw new RuntimeException("仓库信息数据不存在"); + } + List compare = FieldCompareUtil.compare(StockInfo.class, stockInfo, oldStockInfo); + if (!CollectionUtils.isEmpty(compare)){ + int updateSysDiffLog = diffLogService.updateSysDiffLogByBusiness(stockId,BusinessKeysConstants.STOCK_INFO,compare); + if (updateSysDiffLog <= 0){ + throw new RuntimeException("修改仓库信息数据修改记录失败"); + } + } return stockInfoMapper.updateStockInfo(stockInfo); } @@ -82,10 +120,20 @@ public class StockInfoServiceImpl implements IStockInfoService * @param ids 需要删除的数据ID * @return 结果 */ + @Transactional(rollbackFor = Exception.class) @Override public int deleteStockInfoByIds(String ids) { - return stockInfoMapper.deleteStockInfoByIds(Convert.toStrArray(ids)); + SysDiffLog sysDiffLog = new SysDiffLog(); + sysDiffLog.setBusinessId(Long.valueOf(ids)); + sysDiffLog.setBusinessKey(BusinessKeysConstants.STOCK_INFO); + int deleteSysDiffLogByBusiness = diffLogService.deleteSysDiffLogByBusiness(sysDiffLog); + if (deleteSysDiffLogByBusiness <= 0){ + throw new RuntimeException("删除仓库信息数据修改记录失败"); + } + + int result = stockInfoMapper.deleteStockInfoByIds(Convert.toStrArray(ids)); + return result; } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysUnitConvertController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysUnitConvertController.java deleted file mode 100644 index b17cbb60..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysUnitConvertController.java +++ /dev/null @@ -1,129 +0,0 @@ -package com.ruoyi.system.controller; - -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.system.domain.SysUnitConvert; -import com.ruoyi.system.service.ISysUnitConvertService; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 单位换算Controller - * - * @author sunzhenhu - * @date 2021-06-16 - */ -@Controller -@RequestMapping("/unitConvert/unitConvert") -public class SysUnitConvertController extends BaseController -{ - private String prefix = "unitConvert/unitConvert"; - - @Autowired - private ISysUnitConvertService sysUnitConvertService; - - @RequiresPermissions("unitConvert:unitConvert:view") - @GetMapping() - public String unitConvert() - { - return prefix + "/unitConvert"; - } - - /** - * 查询单位换算列表 - */ - @RequiresPermissions("unitConvert:unitConvert:list") - @PostMapping("/list") - @ResponseBody - public TableDataInfo list(SysUnitConvert sysUnitConvert) - { - startPage(); - List list = sysUnitConvertService.selectSysUnitConvertList(sysUnitConvert); - return getDataTable(list); - } - - /** - * 导出单位换算列表 - */ - @RequiresPermissions("unitConvert:unitConvert:export") - @Log(title = "单位换算", businessType = BusinessType.EXPORT) - @PostMapping("/export") - @ResponseBody - public AjaxResult export(SysUnitConvert sysUnitConvert) - { - List list = sysUnitConvertService.selectSysUnitConvertList(sysUnitConvert); - ExcelUtil util = new ExcelUtil(SysUnitConvert.class); - return util.exportExcel(list, "单位换算数据"); - } - - /** - * 新增单位换算 - */ - @GetMapping("/add") - public String add() - { - return prefix + "/add"; - } - - /** - * 新增保存单位换算 - */ - @RequiresPermissions("unitConvert:unitConvert:add") - @Log(title = "单位换算", businessType = BusinessType.INSERT) - @PostMapping("/add") - @ResponseBody - public AjaxResult addSave(SysUnitConvert sysUnitConvert) - { - int i=sysUnitConvertService.insertSysUnitConvert(sysUnitConvert); - if (i<0){ - AjaxResult result=AjaxResult.error("数据重复", null); - return result; - - } - return toAjax(i); - } - - /** - * 修改单位换算 - */ - @GetMapping("/edit/{id}") - public String edit(@PathVariable("id") Integer id, ModelMap mmap) - { - SysUnitConvert sysUnitConvert = sysUnitConvertService.selectSysUnitConvertById(id); - mmap.put("sysUnitConvert", sysUnitConvert); - return prefix + "/edit"; - } - - /** - * 修改保存单位换算 - */ - @RequiresPermissions("unitConvert:unitConvert:edit") - @Log(title = "单位换算", businessType = BusinessType.UPDATE) - @PostMapping("/edit") - @ResponseBody - public AjaxResult editSave(SysUnitConvert sysUnitConvert) - { - return toAjax(sysUnitConvertService.updateSysUnitConvert(sysUnitConvert)); - } - - /** - * 删除单位换算 - */ - @RequiresPermissions("unitConvert:unitConvert:remove") - @Log(title = "单位换算", businessType = BusinessType.DELETE) - @PostMapping( "/remove") - @ResponseBody - public AjaxResult remove(String ids) - { - return toAjax(sysUnitConvertService.deleteSysUnitConvertByIds(ids)); - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysUnitConvert.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysUnitConvert.java deleted file mode 100644 index 3c8b5d54..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysUnitConvert.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.ruoyi.system.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 单位换算对象 sys_unit_convert - * - * @author sunzhenhu - * @date 2021-06-16 - */ -public class SysUnitConvert extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** */ - private Integer id; - - /** 换算起始值 */ - @Excel(name = "换算起始值") - private String convertStartValue; - - /** 换算起始单位 */ - @Excel(name = "换算起始单位") - private String convertStartUnit; - - /** 换算结尾值 */ - @Excel(name = "换算结尾值") - private String convertEndValue; - - /** 换算结尾单位 */ - @Excel(name = "换算结尾单位") - private String convertEndUnit; - - public void setId(Integer id) - { - this.id = id; - } - - public Integer getId() - { - return id; - } - public void setConvertStartValue(String convertStartValue) - { - this.convertStartValue = convertStartValue; - } - - public String getConvertStartValue() - { - return convertStartValue; - } - public void setConvertStartUnit(String convertStartUnit) - { - this.convertStartUnit = convertStartUnit; - } - - public String getConvertStartUnit() - { - return convertStartUnit; - } - public void setConvertEndValue(String convertEndValue) - { - this.convertEndValue = convertEndValue; - } - - public String getConvertEndValue() - { - return convertEndValue; - } - public void setConvertEndUnit(String convertEndUnit) - { - this.convertEndUnit = convertEndUnit; - } - - public String getConvertEndUnit() - { - return convertEndUnit; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("convertStartValue", getConvertStartValue()) - .append("convertStartUnit", getConvertStartUnit()) - .append("convertEndValue", getConvertEndValue()) - .append("convertEndUnit", getConvertEndUnit()) - .toString(); - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysDiffLogMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysDiffLogMapper.java index 5178dab7..19363369 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysDiffLogMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysDiffLogMapper.java @@ -67,6 +67,16 @@ public interface SysDiffLogMapper */ public int deleteSysDiffLogByIds(String[] diffIds); + + + /** + * 删除数据修改记录日志通过业务信息 + * + * @param sysDiffLog 数据修改记录日志 + * @return 结果 + */ + public int deleteSysDiffLogByBusiness(SysDiffLog sysDiffLog); + /** * 作废数据修改记录日志 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysUnitConvertMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysUnitConvertMapper.java deleted file mode 100644 index fef2c1ed..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysUnitConvertMapper.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; -import com.ruoyi.system.domain.SysUnitConvert; - -/** - * 单位换算Mapper接口 - * - * @author sunzhenhu - * @date 2021-06-16 - */ -public interface SysUnitConvertMapper -{ - /** - * 查询单位换算 - * - * @param id 单位换算ID - * @return 单位换算 - */ - public SysUnitConvert selectSysUnitConvertById(Integer id); - - /** - * 查询单位换算列表 - * - * @param sysUnitConvert 单位换算 - * @return 单位换算集合 - */ - public List selectSysUnitConvertList(SysUnitConvert sysUnitConvert); - - /** - * 新增单位换算 - * - * @param sysUnitConvert 单位换算 - * @return 结果 - */ - public int insertSysUnitConvert(SysUnitConvert sysUnitConvert); - - /** - * 修改单位换算 - * - * @param sysUnitConvert 单位换算 - * @return 结果 - */ - public int updateSysUnitConvert(SysUnitConvert sysUnitConvert); - - /** - * 删除单位换算 - * - * @param id 单位换算ID - * @return 结果 - */ - public int deleteSysUnitConvertById(Integer id); - - /** - * 批量删除单位换算 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteSysUnitConvertByIds(String[] ids); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysDiffLogService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysDiffLogService.java index bed7a500..9522e693 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysDiffLogService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysDiffLogService.java @@ -78,6 +78,15 @@ public interface ISysDiffLogService */ public int deleteSysDiffLogById(Long diffId); + + /** + * 删除数据修改记录日志通过业务信息 + * + * @param sysDiffLog 数据修改记录日志 + * @return 结果 + */ + public int deleteSysDiffLogByBusiness(SysDiffLog sysDiffLog); + /** * 作废数据修改记录日志 * @param diffId 数据修改记录日志ID diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysUnitConvertService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysUnitConvertService.java deleted file mode 100644 index 9009e56b..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysUnitConvertService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; -import com.ruoyi.system.domain.SysUnitConvert; - -/** - * 单位换算Service接口 - * - * @author sunzhenhu - * @date 2021-06-16 - */ -public interface ISysUnitConvertService -{ - /** - * 查询单位换算 - * - * @param id 单位换算ID - * @return 单位换算 - */ - public SysUnitConvert selectSysUnitConvertById(Integer id); - - /** - * 查询单位换算列表 - * - * @param sysUnitConvert 单位换算 - * @return 单位换算集合 - */ - public List selectSysUnitConvertList(SysUnitConvert sysUnitConvert); - - /** - * 新增单位换算 - * - * @param sysUnitConvert 单位换算 - * @return 结果 - */ - public int insertSysUnitConvert(SysUnitConvert sysUnitConvert); - - /** - * 修改单位换算 - * - * @param sysUnitConvert 单位换算 - * @return 结果 - */ - public int updateSysUnitConvert(SysUnitConvert sysUnitConvert); - - /** - * 批量删除单位换算 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteSysUnitConvertByIds(String ids); - - /** - * 删除单位换算信息 - * - * @param id 单位换算ID - * @return 结果 - */ - public int deleteSysUnitConvertById(Integer id); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysDiffLogServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysDiffLogServiceImpl.java index 57f4a140..ec954202 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysDiffLogServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysDiffLogServiceImpl.java @@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.ruoyi.common.constant.BusinessKeysConstants; import com.ruoyi.common.core.domain.entity.SysFieldDifferent; +import com.ruoyi.common.exception.BusinessException; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.system.domain.Vo.SysDiffLogVo; @@ -81,6 +82,14 @@ public class SysDiffLogServiceImpl implements ISysDiffLogService String loginName = ShiroUtils.getLoginName(); sysDiffLog.setCreateBy(loginName); sysDiffLog.setCreateTime(DateUtils.getNowDate()); + Long businessId = sysDiffLog.getBusinessId(); + String businessKey = sysDiffLog.getBusinessKey(); + if (businessId == null) { + throw new BusinessException("业务ID不能为空"); + } + if (businessKey == null) { + throw new BusinessException("业务Key不能为空"); + } return sysDiffLogMapper.insertSysDiffLog(sysDiffLog); } @@ -161,6 +170,18 @@ public class SysDiffLogServiceImpl implements ISysDiffLogService return sysDiffLogMapper.deleteSysDiffLogById(diffId); } + + /** + * 删除数据修改记录日志通过业务信息 + * + * @param sysDiffLog 数据修改记录日志 + * @return 结果 + */ + @Override + public int deleteSysDiffLogByBusiness(SysDiffLog sysDiffLog) { + return sysDiffLogMapper.deleteSysDiffLogByBusiness(sysDiffLog); + } + /** * 作废数据修改记录日志 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysUnitConvertServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysUnitConvertServiceImpl.java deleted file mode 100644 index 32519753..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysUnitConvertServiceImpl.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.ruoyi.system.service.impl; - -import com.ruoyi.common.core.text.Convert; -import com.ruoyi.system.domain.SysUnitConvert; -import com.ruoyi.system.mapper.SysUnitConvertMapper; -import com.ruoyi.system.service.ISysUnitConvertService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.List; - -/** - * 单位换算Service业务层处理 - * - * @author sunzhenhu - * @date 2021-06-16 - */ -@Service -public class SysUnitConvertServiceImpl implements ISysUnitConvertService -{ - @Autowired - private SysUnitConvertMapper sysUnitConvertMapper; - - /** - * 查询单位换算 - * - * @param id 单位换算ID - * @return 单位换算 - */ - @Override - public SysUnitConvert selectSysUnitConvertById(Integer id) - { - return sysUnitConvertMapper.selectSysUnitConvertById(id); - } - - /** - * 查询单位换算列表 - * - * @param sysUnitConvert 单位换算 - * @return 单位换算 - */ - @Override - public List selectSysUnitConvertList(SysUnitConvert sysUnitConvert) - { - return sysUnitConvertMapper.selectSysUnitConvertList(sysUnitConvert); - } - - /** - * 新增单位换算 - * - * @param sysUnitConvert 单位换算 - * @return 结果 - */ - @Override - public int insertSysUnitConvert(SysUnitConvert sysUnitConvert) - { - SysUnitConvert temp=new SysUnitConvert(); - temp.setConvertStartUnit(sysUnitConvert.getConvertStartUnit()); - temp.setConvertEndUnit(sysUnitConvert.getConvertEndUnit()); - List sysUnitConverts = new ArrayList<>(sysUnitConvertMapper.selectSysUnitConvertList(temp)); - if (sysUnitConverts.size()>0){ - return -1; - } - return sysUnitConvertMapper.insertSysUnitConvert(sysUnitConvert); - } - - /** - * 修改单位换算 - * - * @param sysUnitConvert 单位换算 - * @return 结果 - */ - @Override - public int updateSysUnitConvert(SysUnitConvert sysUnitConvert) - { - return sysUnitConvertMapper.updateSysUnitConvert(sysUnitConvert); - } - - /** - * 删除单位换算对象 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - @Override - public int deleteSysUnitConvertByIds(String ids) - { - return sysUnitConvertMapper.deleteSysUnitConvertByIds(Convert.toStrArray(ids)); - } - - /** - * 删除单位换算信息 - * - * @param id 单位换算ID - * @return 结果 - */ - @Override - public int deleteSysUnitConvertById(Integer id) - { - return sysUnitConvertMapper.deleteSysUnitConvertById(id); - } -} diff --git a/ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml b/ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml index bae74704..30f8c187 100644 --- a/ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/stock/StockInfoMapper.xml @@ -11,15 +11,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - - select stock_id,StockNo, Stockname, stockAddr, stockmanager,stock_manager_phone, stockmemo, - defalt_itemclass, first_add_time, update_info_time from stock_info + select stock_id, + StockNo, + Stockname, + stockAddr, + stockmanager, + stockmemo, + first_add_time, + update_info_time + from stock_info - + insert into stock_info StockNO, Stockname, stockAddr, stockmanager, - stock_manager_phone, stockmemo, - defalt_itemclass, first_add_time, #{stockNO}, #{stockName}, #{stockAddr}, - #{stockmanager}, - #{stockManagerPhone}, + #{stockManager}, #{stockMemo}, - #{defaltItemclass}, #{firstAddTime}, @@ -79,9 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" Stockname = #{stockName}, StockAddr = #{stockAddr}, stockmanager = #{stockManager}, - stock_manager_phone = #{stockManagerPhone}, stockmemo = #{stockMemo}, - defalt_itemclass = #{defaltItemclass}, update_info_time = #{updateInfoTime}, where stock_id = #{stockId} diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysDiffLogMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysDiffLogMapper.xml index 9e4cc6f4..eb9f0081 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/SysDiffLogMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/SysDiffLogMapper.xml @@ -89,6 +89,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + delete from sys_diff_log where business_id = #{businessId} + and business_key = #{businessKey} + + update sys_diff_log set del_flag = '1' where diff_id = #{diffId} diff --git a/ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/add.html b/ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/add.html deleted file mode 100644 index fc6bf28f..00000000 --- a/ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/add.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - - - - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/edit.html b/ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/edit.html deleted file mode 100644 index d6e4bd0c..00000000 --- a/ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/edit.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - - - - -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/qualitySupplierDeduction.html b/ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/qualitySupplierDeduction.html deleted file mode 100644 index 7bb5bbb7..00000000 --- a/ruoyi-admin/src/main/resources/templates/quality/qualitySupplierDeduction/qualitySupplierDeduction.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - -
-
-
-
-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • -  搜索 -  重置 -
  • -
-
-
-
- - -
-
-
-
-
- - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/add.html b/ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/add.html deleted file mode 100644 index 9c2a26dd..00000000 --- a/ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/add.html +++ /dev/null @@ -1,1085 +0,0 @@ - - - - - - - - - - - -
-
-
- -
- -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- - -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
- - - - - - - - - - - - - - - - - - -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- - - - - -
-
- - - - - - - - - - - - - - - - -
- -
- -
-
- - - - - - - - - - - - - - -
-
- -
-
-

-

产品信息

 选择产品 -
-
-
-
- -
- - - - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/edit.html b/ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/edit.html deleted file mode 100644 index 0ad6740d..00000000 --- a/ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/edit.html +++ /dev/null @@ -1,1065 +0,0 @@ - - - - - - - - - - - -
-
- -
- -
- -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
- - - - - - - - - - - - - - - - - - -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- - -
- -
- -
-
- - - - - - - - - - - - -
-
-
-
-

-

产品信息

-  选择成品 -  删除成品 -
-
-
-
- -
- - - - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/returnGoodsOrder.html b/ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/returnGoodsOrder.html deleted file mode 100644 index 3071e160..00000000 --- a/ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/returnGoodsOrder.html +++ /dev/null @@ -1,955 +0,0 @@ - - - - - - - - - -
-
-
-
-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • - - - - -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • -  搜索 -  重置 -
  • -
-
-
-
- - -
-
-
-
-
- - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/stock/stockInfo/stockInfo.html b/ruoyi-admin/src/main/resources/templates/stock/stockInfo/stockInfo.html index f6246ea8..24248056 100644 --- a/ruoyi-admin/src/main/resources/templates/stock/stockInfo/stockInfo.html +++ b/ruoyi-admin/src/main/resources/templates/stock/stockInfo/stockInfo.html @@ -39,13 +39,13 @@ 添加 - - 修改 - - - 删除 - - + + + + + + + 导出 @@ -69,41 +69,59 @@ exportUrl: prefix + "/export", clickToSelect: true, modalName: "仓库信息", + onDblClickCell: function (field, value, row, $element) { + var businessId = row.stockId; + var businessKey = "2"; + if (field == "updateInfoTime"){ + var url = ctx + "system/diffLog/getDiffDataList/" + businessId + "/" + businessKey; + $.modal.open("数据修改记录", url); + } + }, columns: [ {checkbox: true}, {title: '仓库id',field: 'stockId',visible: false}, - {title: '仓库编号',field: 'stockNO',}, - {title: '仓库名',field: 'stockName',}, - {title: '仓库地址',field: 'stockAddr',}, - {title: '仓库管理人',field: 'stockManager',}, - {title: '仓库管理人电话',field: 'stockManagerPhone',}, - {title: '仓库备注',field: 'stockMemo',}, - {title: '录入时间',field: 'firstAddTime', + {title: '仓库编号',field: 'stockNO', align: 'center',}, + {title: '仓库名',field: 'stockName',align: 'center',}, + {title: '仓库地址',field: 'stockAddr',align: 'center', + formatter: function (value, row, index) { + return $.table.tooltip(value,5,"open"); + } + }, + {title: '仓库管理人',field: 'stockManager',align: 'center',}, + // {title: '仓库管理人电话',field: 'stockManagerPhone',align: 'center',}, + {title: '仓库备注',field: 'stockMemo',align: 'center', + formatter: function (value, row, index){ + return $.table.tooltip(value,5,"open") + } + }, + {title: '录入时间',field: 'firstAddTime',align: 'center', + // formatter: function (value, row, index) { + // // console.log(row) + // if (value == null) {return " ";} + // else {return value;} + // } + }, + {title: '上次修改时间',field: 'updateInfoTime',align: 'center', + formatter: function (value, row, index) { - // console.log(row) - if (value == null) {return " ";} - else {return value;} - } + if (value){ + return '' + value + ''; + } else { + return value; + } + } }, - {title: '上次修改时间',field: 'updateInfoTime', - formatter: function (value, row, index) { - if (value == null) {return " ";} - else { - var vArr = value.split(',') - return vArr[0]; - } - } + { + title: '操作', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + actions.push('编辑 '); + actions.push('删除'); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); + } } - // { - // title: '操作', - // align: 'center', - // formatter: function(value, row, index) { - // var actions = []; - // actions.push('编辑 '); - // actions.push('删除'); - // return actions.join(''); - // } - // } ] }; $.table.init(options); diff --git a/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/add.html b/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/add.html deleted file mode 100644 index ae61fb80..00000000 --- a/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/add.html +++ /dev/null @@ -1,455 +0,0 @@ - - - - - - - - - - - -
-
-
- -
- -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- -
-
-
-
-

-

材料信息

-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/edit.html b/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/edit.html deleted file mode 100644 index 12b45018..00000000 --- a/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/edit.html +++ /dev/null @@ -1,416 +0,0 @@ - - - - - - - - - - - -
-
- -
- -
- -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
-
-
-

-

材料信息

-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/warehousingInRawMaterial.html b/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/warehousingInRawMaterial.html deleted file mode 100644 index 6642d84d..00000000 --- a/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInRawMaterial/warehousingInRawMaterial.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - -
-
-
-
-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - - - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • -  搜索 -  重置 -
  • -
-
-
-
- - -
-
-
-
-
- - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/add.html b/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/add.html deleted file mode 100644 index d14800ae..00000000 --- a/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/add.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - - - - - -
-
-
- -
- -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
-
-
-

-

材料信息

-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/edit.html b/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/edit.html deleted file mode 100644 index 5062ed32..00000000 --- a/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/edit.html +++ /dev/null @@ -1,415 +0,0 @@ - - - - - - - - - - - -
-
- -
- -
- -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
-
-
-

-

材料信息

-
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/warehousingInSubsidiary.html b/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/warehousingInSubsidiary.html deleted file mode 100644 index 2369c38b..00000000 --- a/ruoyi-admin/src/main/resources/templates/storehouse/warehousingInSubsidiary/warehousingInSubsidiary.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - -
-
-
-
-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - - - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • -  搜索 -  重置 -
  • -
-
-
-
- - -
-
-
-
-
- - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html b/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html index 86a2a2f9..5fdb6869 100644 --- a/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html +++ b/ruoyi-admin/src/main/resources/templates/system/baseEvectionForm/baseEvectionForm.html @@ -146,8 +146,16 @@ {title: '出差人',field: 'evectionBy',align: 'center',visible: false,}, {title: '同行人',field: 'partnerBy',align: 'center',}, {title: '出差地',field: 'evectionAddr',align: 'center',}, - {title: '出差详细地址',field: 'evectionDetailAddr',align: 'center',}, - {title: '出差事由',field: 'evectionCauses',align: 'center',}, + {title: '出差详细地址',field: 'evectionDetailAddr',align: 'center', + formatter: function(value, row, index) { + return $.table.tooltip(value,5,"open"); + } + }, + {title: '出差事由',field: 'evectionCauses',align: 'center', + formatter: function(value, row, index) { + return $.table.tooltip(value,5,"open"); + } + }, {title: '出差起始时间',field: 'evectionBeginTime',align: 'center',visible: false,}, {title: '出差结束时间',field: 'evectionEndTime',align: 'center',visible: false,}, {title: '出差时间',field: 'evectionTime',align: 'center', diff --git a/ruoyi-admin/src/main/resources/templates/system/baseExpense/add.html b/ruoyi-admin/src/main/resources/templates/system/baseExpense/add.html index 09a2bcb5..43ae2231 100644 --- a/ruoyi-admin/src/main/resources/templates/system/baseExpense/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/baseExpense/add.html @@ -9,36 +9,44 @@
-
-
- -
- -
+ + +
+ +
+
-
- -
- -
+
+ +
+ +
+
-
- -
- -
+
+
+ +
+
-
-
- -
- -
+
+ +
+ +
+
+ + +
+ +
+
+ -
-
- -
- -
-
-
@@ -116,9 +116,7 @@ getSelections(); var options = { id:'bootstrap-sub-table-expense', - pagination: false, - showToggle: false, - showColumns: false, + showSearch: false, showFooter: true, model: "报销单数据", columns: [ diff --git a/ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html b/ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html index 7c6dfc65..1a3dfaa9 100644 --- a/ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html +++ b/ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html @@ -128,8 +128,6 @@ exportUrl: prefix + "/export", detailUrl: prefix + "/detail/{id}", modalName: "报销单", - height: 800, - // pageSize: 10, sortable: true, // 是否启用排序 sortStable: true, // 设置为 true 将获得稳定的排序 fixedColumns: true, // 启用冻结列 @@ -198,13 +196,13 @@ formatter: function (value, row, index) { var actions = []; if(row.auditStatus=="1" && row.useStatus=="1") { - actions.push(' 作废'); + actions.push(' 作废'); }if(row.attrs == "2"){ - actions.push(' 编辑 '); + actions.push(' 编辑 '); } // 有流程实例id if(row.useStatus=="2" ){ - actions.push(' 恢复 '); + actions.push(' 恢复 '); } // 有流程实例id if (row.instanceId) { @@ -213,21 +211,22 @@ var todoUserIdList = row.todoUserId.split(","); if(todoUserIdList.includes(loginName)){ var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; - actions.push(' '+nodeName+' '); + actions.push(' '+nodeName+' '); } } - actions.push(' 审批历史 '); - actions.push(' 进度查看 '); + actions.push(' 审批历史 '); + actions.push(' 进度查看 '); } if(row.auditStatus=="1" && row.managerAuditStatus=="1") { - actions.push(' 导出 '); + actions.push(' 导出 '); } if(row.auditStatus=="1" && row.financeAuditStatus=="3" && row.managerAuditStatus=="1") { - actions.push(' 确认打款'); + actions.push(' 确认打款'); } // 详情 - actions.push(' 详情 '); - return actions.join(''); + actions.push(' 详情 '); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } } ], diff --git a/ruoyi-admin/src/main/resources/templates/system/companyInformation/companyInformation.html b/ruoyi-admin/src/main/resources/templates/system/companyInformation/companyInformation.html index 55817818..1b28a25c 100644 --- a/ruoyi-admin/src/main/resources/templates/system/companyInformation/companyInformation.html +++ b/ruoyi-admin/src/main/resources/templates/system/companyInformation/companyInformation.html @@ -23,13 +23,13 @@
-
+ - - 修改 - + + + @@ -39,9 +39,9 @@ -
+
-
+
@@ -66,6 +66,8 @@ importUrl: prefix + "/importData", importTemplateUrl: prefix + "/importTemplate", clickToSelect: true, + fixedColumns:true, + fixedRightNumber:1, modalName: "公司信息", columns: [{ checkbox: true @@ -216,18 +218,18 @@ return vArr[0]; } } - } + }, - // { - // title: '操作', - // align: 'center', - // formatter: function(value, row, index) { - // var actions = []; - // actions.push('编辑 '); - // actions.push('删除'); - // return actions.join(''); - // } - // } + { + title: '操作', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + actions.push('编辑 '); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); + } + } ] }; $.table.init(options); diff --git a/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/add.html b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/add.html index aac80f42..71570720 100644 --- a/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/add.html @@ -81,6 +81,7 @@ id:'bootstrap-sub-table-empRequisitionChild', pagination: false, sidePagination: "client", + showSearch:false, model: "物料信息", columns: [ {checkbox: true}, diff --git a/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/empRequisiteOrder.html b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/empRequisiteOrder.html index 4fa21085..848c533c 100644 --- a/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/empRequisiteOrder.html +++ b/ruoyi-admin/src/main/resources/templates/system/empRequisiteOrder/empRequisiteOrder.html @@ -11,11 +11,11 @@
  • - +
  • - +
  • @@ -41,7 +41,7 @@ 添加 - + 导出
@@ -110,6 +110,16 @@ title: '流程实例类型', visible: false }, + { + field: 'taskId', + title: '当前任务ID', + visible: false + }, + { + field: 'todoUserId', + title: '待办用户ID', + visible: false + }, { field: 'applyUser', title: '申请人ID', @@ -120,6 +130,9 @@ title: '当前任务名称', visible: false }, + {title: '审核状态',field: 'auditStatus',visible: false, + formatter: function(value, row, index) {return $.table.selectDictLabel(auditStatusDatas, value);} + }, { field: 'taskStatus', title: '当前状态', @@ -167,19 +180,6 @@ title: '申请时间', align: 'center', }, - { - field: 'taskId', - title: '当前任务ID', - visible: false - }, - { - field: 'todoUserId', - title: '待办用户ID', - visible: false - }, - {title: '审核状态',field: 'auditStatus',visible: false, - formatter: function(value, row, index) {return $.table.selectDictLabel(auditStatusDatas, value);} - }, {title: '领料员',field: 'createBy',align: 'center',}, {title: '不含税总价(RMB)',field: 'noRmbSum',visible: false}, {title: '含税总价(RMB)',field: 'rmbSum',visible: false}, @@ -203,19 +203,20 @@ var todoUserIdList = row.todoUserId.split(","); if(todoUserIdList.includes(loginName) || loginName == 'admin'){ var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; - actions.push(' '+nodeName+' '); + actions.push(' '+nodeName+' '); } } // 审批历史 - actions.push(' 审批历史 '); + actions.push(' 审批历史 '); // 进度查看 - actions.push(' 进度查看 '); - } - else if(row.auditStatus === "2"){ - actions.push('编辑 '); + actions.push(' 进度查看 '); } - actions.push('详情 '); - return actions.join(''); + // else if(row.auditStatus === "2"){ + // actions.push('编辑 '); + // } + actions.push('详情 '); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } } ], diff --git a/ruoyi-admin/src/main/resources/templates/system/requisitioning/add.html b/ruoyi-admin/src/main/resources/templates/system/requisitioning/add.html index 8d6b0536..d920189a 100644 --- a/ruoyi-admin/src/main/resources/templates/system/requisitioning/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/requisitioning/add.html @@ -68,6 +68,7 @@ pagination: false, sidePagination: "client", showColumns: false, + showSearch: false, model: "请购物料信息", columns: [ {checkbox: true}, diff --git a/ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html b/ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html index 3b4bbfa0..04c1d4f1 100644 --- a/ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html +++ b/ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html @@ -67,7 +67,7 @@ 添加
-
+
@@ -77,8 +77,6 @@ - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/edit.html b/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/edit.html deleted file mode 100644 index 2fd60d83..00000000 --- a/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/edit.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/unitConvert.html b/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/unitConvert.html deleted file mode 100644 index 98cd198e..00000000 --- a/ruoyi-admin/src/main/resources/templates/unitConvert/unitConvert/unitConvert.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - -
-
-
-
-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • -  搜索 -  重置 -
  • -
-
-
-
- - -
-
-
-
-
- - - - \ No newline at end of file diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/BusinessKeysConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/BusinessKeysConstants.java index 9c77c563..84d2a34f 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/constant/BusinessKeysConstants.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/BusinessKeysConstants.java @@ -13,4 +13,7 @@ public class BusinessKeysConstants { /** 测试产品型号管理 */ public static final String PRODUCT_MODEL = "1"; + + /** 仓库信息 */ + public static final String STOCK_INFO = "2"; } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java index 64a7ef43..9407df63 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java @@ -17,6 +17,8 @@ import com.ruoyi.common.exception.DemoModeException; import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.security.PermissionUtils; +import java.sql.SQLException; + /** * 全局异常处理器 * @@ -127,4 +129,26 @@ public class GlobalExceptionHandler log.error(e.getMessage(), e); return AjaxResult.error("请正确使用审批流程上的角色进行操作"); } + + + /** + * SQL不能为空异常 + * */ + @ExceptionHandler(SQLException.class) + public AjaxResult sqlException(SQLException e) + { + //记录异常信息 + log.error("SQL 发生异常:",e); + //提取错误信息 + String errorMessage = e.getMessage(); + int startIndex = errorMessage.indexOf("doesn't have a default value"); + if (startIndex != -1){ + String fieldName = errorMessage.substring(0,startIndex).trim(); + return AjaxResult.error("字段:"+fieldName+"不能为空,请确保提供了改字段的值。"); + }else { + return AjaxResult.error("数据库操作失败:"+errorMessage); + } + + } + }