供应计划,仓库映射接口开发
This commit is contained in:
@@ -114,6 +114,8 @@ public class SecurityConfig
|
||||
requests.antMatchers("/login",
|
||||
"/register",
|
||||
"/captchaImage",
|
||||
"/user/**",
|
||||
"/query/jh/**",
|
||||
"/AutoInventory/**",
|
||||
"/ws/**",
|
||||
"/information/device/**",
|
||||
|
||||
@@ -178,4 +178,28 @@ public class SysLoginService
|
||||
sysUser.setLoginDate(DateUtils.getNowDate());
|
||||
userService.updateUserProfile(sysUser);
|
||||
}
|
||||
|
||||
public LoginUser loginWithoutCaptcha(String username, String password) {
|
||||
loginPreCheck(username, password);
|
||||
|
||||
Authentication authentication;
|
||||
|
||||
try {
|
||||
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(username, password);
|
||||
|
||||
AuthenticationContextHolder.setContext(token);
|
||||
|
||||
authentication = authenticationManager.authenticate(token);
|
||||
}catch (Exception e){
|
||||
throw new ServiceException("登录失败");
|
||||
}finally {
|
||||
AuthenticationContextHolder.clearContext();
|
||||
}
|
||||
|
||||
LoginUser loginUser = (LoginUser) authentication.getPrincipal();
|
||||
|
||||
recordLoginInfo(loginUser.getUserId());
|
||||
|
||||
return loginUser;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.zg.project.Information.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zg.project.Information.domain.SceneMapping;
|
||||
import com.zg.project.Information.service.ISceneMappingService;
|
||||
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.zg.framework.aspectj.lang.annotation.Log;
|
||||
import com.zg.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.zg.framework.web.controller.BaseController;
|
||||
import com.zg.framework.web.domain.AjaxResult;
|
||||
import com.zg.common.utils.poi.ExcelUtil;
|
||||
import com.zg.framework.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 场景编号Controller
|
||||
*
|
||||
* @author zg
|
||||
* @date 2025-05-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/information/scene")
|
||||
public class SceneMappingController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISceneMappingService sceneMappingService;
|
||||
|
||||
/**
|
||||
* 查询场景编号列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('information:scene:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SceneMapping sceneMapping)
|
||||
{
|
||||
startPage();
|
||||
List<SceneMapping> list = sceneMappingService.selectSceneMappingList(sceneMapping);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出场景编号列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('information:scene:export')")
|
||||
@Log(title = "场景编号", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SceneMapping sceneMapping)
|
||||
{
|
||||
List<SceneMapping> list = sceneMappingService.selectSceneMappingList(sceneMapping);
|
||||
ExcelUtil<SceneMapping> util = new ExcelUtil<SceneMapping>(SceneMapping.class);
|
||||
util.exportExcel(response, list, "场景编号数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取场景编号详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('information:scene:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(sceneMappingService.selectSceneMappingById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增场景编号
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('information:scene:add')")
|
||||
@Log(title = "场景编号", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SceneMapping sceneMapping)
|
||||
{
|
||||
return toAjax(sceneMappingService.insertSceneMapping(sceneMapping));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改场景编号
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('information:scene:edit')")
|
||||
@Log(title = "场景编号", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SceneMapping sceneMapping)
|
||||
{
|
||||
return toAjax(sceneMappingService.updateSceneMapping(sceneMapping));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除场景编号
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('information:scene:remove')")
|
||||
@Log(title = "场景编号", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(sceneMappingService.deleteSceneMappingByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.zg.project.Information.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zg.framework.aspectj.lang.annotation.Excel;
|
||||
import com.zg.framework.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 场景编号对象 scene_mapping
|
||||
*
|
||||
* @author zg
|
||||
* @date 2025-05-24
|
||||
*/
|
||||
public class SceneMapping extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键 */
|
||||
private Long id;
|
||||
|
||||
/** 场景编号 */
|
||||
@Excel(name = "场景编号")
|
||||
private String sceneCode;
|
||||
|
||||
/** 场景名称 */
|
||||
@Excel(name = "场景名称")
|
||||
private String sceneName;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSceneCode(String sceneCode)
|
||||
{
|
||||
this.sceneCode = sceneCode;
|
||||
}
|
||||
|
||||
public String getSceneCode()
|
||||
{
|
||||
return sceneCode;
|
||||
}
|
||||
|
||||
public void setSceneName(String sceneName)
|
||||
{
|
||||
this.sceneName = sceneName;
|
||||
}
|
||||
|
||||
public String getSceneName()
|
||||
{
|
||||
return sceneName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sceneCode", getSceneCode())
|
||||
.append("sceneName", getSceneName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
132
src/main/java/com/zg/project/Information/domain/StockInType.java
Normal file
132
src/main/java/com/zg/project/Information/domain/StockInType.java
Normal file
@@ -0,0 +1,132 @@
|
||||
package com.zg.project.Information.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.zg.framework.aspectj.lang.annotation.Excel;
|
||||
import com.zg.framework.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 入库类型对象 stock_in_type
|
||||
*
|
||||
* @author zg
|
||||
* @date 2025-05-24
|
||||
*/
|
||||
public class StockInType extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 入库类型编码 */
|
||||
@Excel(name = "入库类型编码")
|
||||
private String typeCode;
|
||||
|
||||
/** 入库类型名称 */
|
||||
@Excel(name = "入库类型名称")
|
||||
private String typeName;
|
||||
|
||||
/** 状态(1=启用,0=禁用) */
|
||||
@Excel(name = "状态", readConverterExp = "1==启用,0=禁用")
|
||||
private Long status;
|
||||
|
||||
/** 排序值 */
|
||||
@Excel(name = "排序值")
|
||||
private Long sort;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setTypeCode(String typeCode)
|
||||
{
|
||||
this.typeCode = typeCode;
|
||||
}
|
||||
|
||||
public String getTypeCode()
|
||||
{
|
||||
return typeCode;
|
||||
}
|
||||
|
||||
public void setTypeName(String typeName)
|
||||
{
|
||||
this.typeName = typeName;
|
||||
}
|
||||
|
||||
public String getTypeName()
|
||||
{
|
||||
return typeName;
|
||||
}
|
||||
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setSort(Long sort)
|
||||
{
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public Long getSort()
|
||||
{
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("typeCode", getTypeCode())
|
||||
.append("typeName", getTypeName())
|
||||
.append("status", getStatus())
|
||||
.append("sort", getSort())
|
||||
.append("remark", getRemark())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
package com.zg.project.Information.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.zg.framework.aspectj.lang.annotation.Excel;
|
||||
import com.zg.framework.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 仓库信息对象 warehouse_info
|
||||
*
|
||||
* @author zg
|
||||
* @date 2025-05-24
|
||||
*/
|
||||
public class WarehouseInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 仓库编码 */
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
/** 仓库名称 */
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
/** 仓库地址 */
|
||||
@Excel(name = "仓库地址")
|
||||
private String address;
|
||||
|
||||
/** 状态(1=启用,0=禁用) */
|
||||
@Excel(name = "状态", readConverterExp = "1==启用,0=禁用")
|
||||
private Long status;
|
||||
|
||||
/** 排序值 */
|
||||
@Excel(name = "排序值")
|
||||
private Long sort;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setWarehouseCode(String warehouseCode)
|
||||
{
|
||||
this.warehouseCode = warehouseCode;
|
||||
}
|
||||
|
||||
public String getWarehouseCode()
|
||||
{
|
||||
return warehouseCode;
|
||||
}
|
||||
|
||||
public void setWarehouseName(String warehouseName)
|
||||
{
|
||||
this.warehouseName = warehouseName;
|
||||
}
|
||||
|
||||
public String getWarehouseName()
|
||||
{
|
||||
return warehouseName;
|
||||
}
|
||||
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setSort(Long sort)
|
||||
{
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public Long getSort()
|
||||
{
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("warehouseCode", getWarehouseCode())
|
||||
.append("warehouseName", getWarehouseName())
|
||||
.append("address", getAddress())
|
||||
.append("status", getStatus())
|
||||
.append("sort", getSort())
|
||||
.append("remark", getRemark())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.zg.project.Information.mapper;
|
||||
|
||||
import com.zg.project.Information.domain.SceneMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 场景编号Mapper接口
|
||||
*
|
||||
* @author zg
|
||||
* @date 2025-05-24
|
||||
*/
|
||||
public interface SceneMappingMapper
|
||||
{
|
||||
/**
|
||||
* 查询场景编号
|
||||
*
|
||||
* @param id 场景编号主键
|
||||
* @return 场景编号
|
||||
*/
|
||||
public SceneMapping selectSceneMappingById(Long id);
|
||||
|
||||
/**
|
||||
* 查询场景编号列表
|
||||
*
|
||||
* @param sceneMapping 场景编号
|
||||
* @return 场景编号集合
|
||||
*/
|
||||
public List<SceneMapping> selectSceneMappingList(SceneMapping sceneMapping);
|
||||
|
||||
/**
|
||||
* 新增场景编号
|
||||
*
|
||||
* @param sceneMapping 场景编号
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSceneMapping(SceneMapping sceneMapping);
|
||||
|
||||
/**
|
||||
* 修改场景编号
|
||||
*
|
||||
* @param sceneMapping 场景编号
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSceneMapping(SceneMapping sceneMapping);
|
||||
|
||||
/**
|
||||
* 删除场景编号
|
||||
*
|
||||
* @param id 场景编号主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSceneMappingById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除场景编号
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSceneMappingByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.zg.project.Information.service;
|
||||
|
||||
import com.zg.project.Information.domain.SceneMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 场景编号Service接口
|
||||
*
|
||||
* @author zg
|
||||
* @date 2025-05-24
|
||||
*/
|
||||
public interface ISceneMappingService
|
||||
{
|
||||
/**
|
||||
* 查询场景编号
|
||||
*
|
||||
* @param id 场景编号主键
|
||||
* @return 场景编号
|
||||
*/
|
||||
public SceneMapping selectSceneMappingById(Long id);
|
||||
|
||||
/**
|
||||
* 查询场景编号列表
|
||||
*
|
||||
* @param sceneMapping 场景编号
|
||||
* @return 场景编号集合
|
||||
*/
|
||||
public List<SceneMapping> selectSceneMappingList(SceneMapping sceneMapping);
|
||||
|
||||
/**
|
||||
* 新增场景编号
|
||||
*
|
||||
* @param sceneMapping 场景编号
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSceneMapping(SceneMapping sceneMapping);
|
||||
|
||||
/**
|
||||
* 修改场景编号
|
||||
*
|
||||
* @param sceneMapping 场景编号
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSceneMapping(SceneMapping sceneMapping);
|
||||
|
||||
/**
|
||||
* 批量删除场景编号
|
||||
*
|
||||
* @param ids 需要删除的场景编号主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSceneMappingByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除场景编号信息
|
||||
*
|
||||
* @param id 场景编号主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSceneMappingById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.zg.project.Information.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zg.project.Information.domain.SceneMapping;
|
||||
import com.zg.project.Information.mapper.SceneMappingMapper;
|
||||
import com.zg.project.Information.service.ISceneMappingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 场景编号Service业务层处理
|
||||
*
|
||||
* @author zg
|
||||
* @date 2025-05-24
|
||||
*/
|
||||
@Service
|
||||
public class SceneMappingServiceImpl implements ISceneMappingService
|
||||
{
|
||||
@Autowired
|
||||
private SceneMappingMapper sceneMappingMapper;
|
||||
|
||||
/**
|
||||
* 查询场景编号
|
||||
*
|
||||
* @param id 场景编号主键
|
||||
* @return 场景编号
|
||||
*/
|
||||
@Override
|
||||
public SceneMapping selectSceneMappingById(Long id)
|
||||
{
|
||||
return sceneMappingMapper.selectSceneMappingById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询场景编号列表
|
||||
*
|
||||
* @param sceneMapping 场景编号
|
||||
* @return 场景编号
|
||||
*/
|
||||
@Override
|
||||
public List<SceneMapping> selectSceneMappingList(SceneMapping sceneMapping)
|
||||
{
|
||||
return sceneMappingMapper.selectSceneMappingList(sceneMapping);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增场景编号
|
||||
*
|
||||
* @param sceneMapping 场景编号
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSceneMapping(SceneMapping sceneMapping)
|
||||
{
|
||||
return sceneMappingMapper.insertSceneMapping(sceneMapping);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改场景编号
|
||||
*
|
||||
* @param sceneMapping 场景编号
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSceneMapping(SceneMapping sceneMapping)
|
||||
{
|
||||
return sceneMappingMapper.updateSceneMapping(sceneMapping);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除场景编号
|
||||
*
|
||||
* @param ids 需要删除的场景编号主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSceneMappingByIds(Long[] ids)
|
||||
{
|
||||
return sceneMappingMapper.deleteSceneMappingByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除场景编号信息
|
||||
*
|
||||
* @param id 场景编号主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSceneMappingById(Long id)
|
||||
{
|
||||
return sceneMappingMapper.deleteSceneMappingById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.zg.project.wisdom.login;
|
||||
|
||||
import com.zg.common.constant.Constants;
|
||||
import com.zg.framework.security.LoginBody;
|
||||
import com.zg.framework.security.LoginUser;
|
||||
import com.zg.framework.security.service.SysLoginService;
|
||||
import com.zg.framework.security.service.TokenService;
|
||||
import com.zg.framework.web.domain.AjaxResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/user")
|
||||
public class LoginController {
|
||||
|
||||
@Autowired
|
||||
private SysLoginService loginService;
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
/**
|
||||
* 登录方法
|
||||
*
|
||||
* @param loginBody 登录信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/login")
|
||||
public AjaxResult login(@RequestBody LoginBody loginBody) {
|
||||
String username = loginBody.getUsername();
|
||||
String password = loginBody.getPassword();
|
||||
|
||||
LoginUser loginUser = loginService.loginWithoutCaptcha(username, password);
|
||||
|
||||
String token = tokenService.createToken(loginUser);
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("token", token);
|
||||
data.put("user", loginUser.getUser());
|
||||
|
||||
return AjaxResult.success(data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.zg.project.wisdom.plan.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zg.framework.aspectj.lang.annotation.Log;
|
||||
import com.zg.framework.aspectj.lang.enums.BusinessType;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.zg.project.wisdom.plan.domain.GysJh;
|
||||
import com.zg.project.wisdom.plan.service.IGysJhService;
|
||||
import com.zg.framework.web.controller.BaseController;
|
||||
import com.zg.framework.web.domain.AjaxResult;
|
||||
import com.zg.common.utils.poi.ExcelUtil;
|
||||
import com.zg.framework.web.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 供应计划Controller
|
||||
*
|
||||
* @author zg
|
||||
* @date 2025-05-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/plan/jh")
|
||||
public class GysJhController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IGysJhService gysJhService;
|
||||
|
||||
/**
|
||||
* 查询供应计划列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('query:jh:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(GysJh gysJh) {
|
||||
|
||||
startPage();
|
||||
List<GysJh> list = gysJhService.selectGysJhList(gysJh);
|
||||
return getDataTable(list);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出供应计划列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('query:jh:export')")
|
||||
@Log(title = "供应计划", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, GysJh gysJh) {
|
||||
|
||||
List<GysJh> list = gysJhService.selectGysJhList(gysJh);
|
||||
ExcelUtil<GysJh> util = new ExcelUtil<GysJh>(GysJh.class);
|
||||
util.exportExcel(response, list, "供应计划数据");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取供应计划详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('query:jh:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
|
||||
return success(gysJhService.selectGysJhById(id));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增供应计划
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('query:jh:add')")
|
||||
@Log(title = "供应计划", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody GysJh gysJh) {
|
||||
|
||||
return toAjax(gysJhService.insertGysJh(gysJh));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 供应计划导入
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('query:jh:import')")
|
||||
@Log(title = "供应计划", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/import")
|
||||
public AjaxResult importData(@RequestParam("file") MultipartFile file, boolean updateSupport) throws IOException {
|
||||
|
||||
ExcelUtil<GysJh> util = new ExcelUtil<>(GysJh.class);
|
||||
List<GysJh> list = util.importExcel(file.getInputStream());
|
||||
String operator = getUsername();
|
||||
String message = gysJhService.importGysJh(list, updateSupport, "zhangsan");
|
||||
|
||||
return AjaxResult.success(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改供应计划
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('query:jh:edit')")
|
||||
@Log(title = "供应计划", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/update")
|
||||
public AjaxResult edit(@RequestBody GysJh gysJh) {
|
||||
|
||||
return toAjax(gysJhService.updateGysJh(gysJh));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除供应计划
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('query:jh:remove')")
|
||||
@Log(title = "供应计划", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
|
||||
return toAjax(gysJhService.deleteGysJhByIds(ids));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
295
src/main/java/com/zg/project/wisdom/plan/domain/GysJh.java
Normal file
295
src/main/java/com/zg/project/wisdom/plan/domain/GysJh.java
Normal file
@@ -0,0 +1,295 @@
|
||||
package com.zg.project.wisdom.plan.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zg.framework.aspectj.lang.annotation.Excel;
|
||||
import com.zg.framework.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 供应计划对象 gys_jh
|
||||
*
|
||||
* @author zg
|
||||
* @date 2025-05-12
|
||||
*/
|
||||
public class GysJh extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 县局 */
|
||||
@Excel(name = "县局")
|
||||
private String xj;
|
||||
|
||||
/** 项目号 */
|
||||
@Excel(name = "项目号")
|
||||
private String xmNo;
|
||||
|
||||
/** 项目描述 */
|
||||
@Excel(name = "项目描述")
|
||||
private String xmMs;
|
||||
|
||||
/** 物料号 */
|
||||
@Excel(name = "物料号")
|
||||
private String wlNo;
|
||||
|
||||
/** 物料描述 */
|
||||
@Excel(name = "物料描述")
|
||||
private String wlMs;
|
||||
|
||||
/** 供应商编码 */
|
||||
@Excel(name = "供应商编码")
|
||||
private String gysNo;
|
||||
|
||||
/** 供应商名称 */
|
||||
@Excel(name = "供应商名称")
|
||||
private String gysMc;
|
||||
|
||||
/** 计划交货金额 */
|
||||
@Excel(name = "计划交货金额")
|
||||
private BigDecimal jhAmt;
|
||||
|
||||
/** 合同单价 */
|
||||
@Excel(name = "合同单价")
|
||||
private BigDecimal htDj;
|
||||
|
||||
/** SAP订单编号 */
|
||||
@Excel(name = "SAP订单编号")
|
||||
private String sapNo;
|
||||
|
||||
/** 行号 */
|
||||
@Excel(name = "行号")
|
||||
private String xh;
|
||||
|
||||
/** 计划交货数量 */
|
||||
@Excel(name = "计划交货数量")
|
||||
private Long jhQty;
|
||||
|
||||
/** 合同数量 */
|
||||
@Excel(name = "合同数量")
|
||||
private Long htQty;
|
||||
|
||||
/** 计量单位 */
|
||||
@Excel(name = "计量单位")
|
||||
private String dw;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
@Excel(name = "状态", readConverterExp = "0:未到货,1:已入库")
|
||||
private String status;
|
||||
|
||||
/** 是否删除(0正常 1删除) */
|
||||
@Excel(name = "是否删除", readConverterExp = "0=正常,1=删除")
|
||||
private String isDelete;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setXj(String xj)
|
||||
{
|
||||
this.xj = xj;
|
||||
}
|
||||
|
||||
public String getXj()
|
||||
{
|
||||
return xj;
|
||||
}
|
||||
|
||||
public void setXmNo(String xmNo)
|
||||
{
|
||||
this.xmNo = xmNo;
|
||||
}
|
||||
|
||||
public String getXmNo()
|
||||
{
|
||||
return xmNo;
|
||||
}
|
||||
|
||||
public void setXmMs(String xmMs)
|
||||
{
|
||||
this.xmMs = xmMs;
|
||||
}
|
||||
|
||||
public String getXmMs()
|
||||
{
|
||||
return xmMs;
|
||||
}
|
||||
|
||||
public void setWlNo(String wlNo)
|
||||
{
|
||||
this.wlNo = wlNo;
|
||||
}
|
||||
|
||||
public String getWlNo()
|
||||
{
|
||||
return wlNo;
|
||||
}
|
||||
|
||||
public void setWlMs(String wlMs)
|
||||
{
|
||||
this.wlMs = wlMs;
|
||||
}
|
||||
|
||||
public String getWlMs()
|
||||
{
|
||||
return wlMs;
|
||||
}
|
||||
|
||||
public void setGysNo(String gysNo)
|
||||
{
|
||||
this.gysNo = gysNo;
|
||||
}
|
||||
|
||||
public String getGysNo()
|
||||
{
|
||||
return gysNo;
|
||||
}
|
||||
|
||||
public void setGysMc(String gysMc)
|
||||
{
|
||||
this.gysMc = gysMc;
|
||||
}
|
||||
|
||||
public String getGysMc()
|
||||
{
|
||||
return gysMc;
|
||||
}
|
||||
|
||||
public void setJhAmt(BigDecimal jhAmt)
|
||||
{
|
||||
this.jhAmt = jhAmt;
|
||||
}
|
||||
|
||||
public BigDecimal getJhAmt()
|
||||
{
|
||||
return jhAmt;
|
||||
}
|
||||
|
||||
public void setHtDj(BigDecimal htDj)
|
||||
{
|
||||
this.htDj = htDj;
|
||||
}
|
||||
|
||||
public BigDecimal getHtDj()
|
||||
{
|
||||
return htDj;
|
||||
}
|
||||
|
||||
public void setSapNo(String sapNo)
|
||||
{
|
||||
this.sapNo = sapNo;
|
||||
}
|
||||
|
||||
public String getSapNo()
|
||||
{
|
||||
return sapNo;
|
||||
}
|
||||
|
||||
public void setXh(String xh)
|
||||
{
|
||||
this.xh = xh;
|
||||
}
|
||||
|
||||
public String getXh()
|
||||
{
|
||||
return xh;
|
||||
}
|
||||
|
||||
public void setJhQty(Long jhQty)
|
||||
{
|
||||
this.jhQty = jhQty;
|
||||
}
|
||||
|
||||
public Long getJhQty()
|
||||
{
|
||||
return jhQty;
|
||||
}
|
||||
|
||||
public void setHtQty(Long htQty)
|
||||
{
|
||||
this.htQty = htQty;
|
||||
}
|
||||
|
||||
public Long getHtQty()
|
||||
{
|
||||
return htQty;
|
||||
}
|
||||
|
||||
public void setDw(String dw)
|
||||
{
|
||||
this.dw = dw;
|
||||
}
|
||||
|
||||
public String getDw()
|
||||
{
|
||||
return dw;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setIsDelete(String isDelete)
|
||||
{
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
public String getIsDelete()
|
||||
{
|
||||
return isDelete;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("xj", getXj())
|
||||
.append("xmNo", getXmNo())
|
||||
.append("xmMs", getXmMs())
|
||||
.append("wlNo", getWlNo())
|
||||
.append("wlMs", getWlMs())
|
||||
.append("gysNo", getGysNo())
|
||||
.append("gysMc", getGysMc())
|
||||
.append("jhAmt", getJhAmt())
|
||||
.append("htDj", getHtDj())
|
||||
.append("sapNo", getSapNo())
|
||||
.append("xh", getXh())
|
||||
.append("jhQty", getJhQty())
|
||||
.append("htQty", getHtQty())
|
||||
.append("dw", getDw())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("isDelete", getIsDelete())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.zg.project.wisdom.plan.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zg.project.wisdom.plan.domain.GysJh;
|
||||
|
||||
/**
|
||||
* 供应计划Mapper接口
|
||||
*
|
||||
* @author zg
|
||||
* @date 2025-05-12
|
||||
*/
|
||||
public interface GysJhMapper
|
||||
{
|
||||
/**
|
||||
* 查询供应计划
|
||||
*
|
||||
* @param id 供应计划主键
|
||||
* @return 供应计划
|
||||
*/
|
||||
public GysJh selectGysJhById(Long id);
|
||||
|
||||
/**
|
||||
* 查询供应计划列表
|
||||
*
|
||||
* @param gysJh 供应计划
|
||||
* @return 供应计划集合
|
||||
*/
|
||||
public List<GysJh> selectGysJhList(GysJh gysJh);
|
||||
|
||||
/**
|
||||
* 新增供应计划
|
||||
*
|
||||
* @param gysJh 供应计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGysJh(GysJh gysJh);
|
||||
|
||||
/**
|
||||
* 修改供应计划
|
||||
*
|
||||
* @param gysJh 供应计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGysJh(GysJh gysJh);
|
||||
|
||||
/**
|
||||
* 删除供应计划
|
||||
*
|
||||
* @param id 供应计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGysJhById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除供应计划
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGysJhByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据订单号查询是否已存在
|
||||
* @param sapNo
|
||||
* @param xh
|
||||
* @return
|
||||
*/
|
||||
GysJh selectExistByKey(String sapNo, String xh);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.zg.project.wisdom.plan.service;
|
||||
|
||||
import java.rmi.ServerException;
|
||||
import java.util.List;
|
||||
import com.zg.project.wisdom.plan.domain.GysJh;
|
||||
|
||||
/**
|
||||
* 供应计划Service接口
|
||||
*
|
||||
* @author zg
|
||||
* @date 2025-05-12
|
||||
*/
|
||||
public interface IGysJhService
|
||||
{
|
||||
/**
|
||||
* 查询供应计划
|
||||
*
|
||||
* @param id 供应计划主键
|
||||
* @return 供应计划
|
||||
*/
|
||||
public GysJh selectGysJhById(Long id);
|
||||
|
||||
/**
|
||||
* 查询供应计划列表
|
||||
*
|
||||
* @param gysJh 供应计划
|
||||
* @return 供应计划集合
|
||||
*/
|
||||
public List<GysJh> selectGysJhList(GysJh gysJh);
|
||||
|
||||
/**
|
||||
* 新增供应计划
|
||||
*
|
||||
* @param gysJh 供应计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertGysJh(GysJh gysJh);
|
||||
|
||||
/**
|
||||
* 修改供应计划
|
||||
*
|
||||
* @param gysJh 供应计划
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGysJh(GysJh gysJh);
|
||||
|
||||
/**
|
||||
* 批量删除供应计划
|
||||
*
|
||||
* @param ids 需要删除的供应计划主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGysJhByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除供应计划信息
|
||||
*
|
||||
* @param id 供应计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGysJhById(Long id);
|
||||
|
||||
/**
|
||||
* 供应计划导入
|
||||
* @param list
|
||||
* @param updateSupport
|
||||
* @param operator
|
||||
* @return
|
||||
*/
|
||||
String importGysJh(List<GysJh> list, boolean updateSupport, String operator) throws ServerException;
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.zg.project.wisdom.plan.service.impl;
|
||||
|
||||
import java.rmi.ServerException;
|
||||
import java.util.List;
|
||||
import com.zg.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zg.project.wisdom.plan.mapper.GysJhMapper;
|
||||
import com.zg.project.wisdom.plan.domain.GysJh;
|
||||
import com.zg.project.wisdom.plan.service.IGysJhService;
|
||||
|
||||
/**
|
||||
* 供应计划Service业务层处理
|
||||
*
|
||||
* @author zg
|
||||
* @date 2025-05-12
|
||||
*/
|
||||
@Service
|
||||
public class GysJhServiceImpl implements IGysJhService
|
||||
{
|
||||
@Autowired
|
||||
private GysJhMapper gysJhMapper;
|
||||
|
||||
/**
|
||||
* 查询供应计划
|
||||
*
|
||||
* @param id 供应计划主键
|
||||
* @return 供应计划
|
||||
*/
|
||||
@Override
|
||||
public GysJh selectGysJhById(Long id)
|
||||
{
|
||||
return gysJhMapper.selectGysJhById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应计划列表
|
||||
*
|
||||
* @param gysJh 供应计划
|
||||
* @return 供应计划
|
||||
*/
|
||||
@Override
|
||||
public List<GysJh> selectGysJhList(GysJh gysJh)
|
||||
{
|
||||
return gysJhMapper.selectGysJhList(gysJh);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增供应计划
|
||||
*
|
||||
* @param gysJh 供应计划
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertGysJh(GysJh gysJh)
|
||||
{
|
||||
if (gysJh.getStatus() == null) {
|
||||
gysJh.setStatus("0");
|
||||
}
|
||||
|
||||
gysJh.setCreateTime(DateUtils.getNowDate());
|
||||
// String operator = getUsername();
|
||||
gysJh.setCreateBy("张三");
|
||||
return gysJhMapper.insertGysJh(gysJh);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改供应计划
|
||||
*
|
||||
* @param gysJh 供应计划
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateGysJh(GysJh gysJh)
|
||||
{
|
||||
gysJh.setUpdateTime(DateUtils.getNowDate());
|
||||
// String operator = getUsername();
|
||||
gysJh.setUpdateBy("张三");
|
||||
return gysJhMapper.updateGysJh(gysJh);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除供应计划
|
||||
*
|
||||
* @param ids 需要删除的供应计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGysJhByIds(Long[] ids)
|
||||
{
|
||||
return gysJhMapper.deleteGysJhByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除供应计划信息
|
||||
*
|
||||
* @param id 供应计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteGysJhById(Long id)
|
||||
{
|
||||
return gysJhMapper.deleteGysJhById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String importGysJh(List<GysJh> list, boolean updateSupport, String operator) throws ServerException {
|
||||
|
||||
if (list == null || list.isEmpty()){
|
||||
throw new ServerException("导入数据不能为空");
|
||||
}
|
||||
int insertCount = 0 , updateCount = 0;
|
||||
for (GysJh jh : list) {
|
||||
if (jh.getStatus() == null) {
|
||||
jh.setStatus("0");
|
||||
}
|
||||
|
||||
GysJh exist = gysJhMapper.selectExistByKey(jh.getSapNo(), jh.getXh());
|
||||
|
||||
if (exist == null){
|
||||
jh.setCreateBy(operator);
|
||||
jh.setCreateTime(DateUtils.getNowDate());
|
||||
gysJhMapper.insertGysJh(jh);
|
||||
insertCount++;
|
||||
}else if (updateSupport){
|
||||
jh.setId(exist.getId());
|
||||
jh.setUpdateBy(operator);
|
||||
jh.setUpdateTime(DateUtils.getNowDate());
|
||||
gysJhMapper.updateGysJh(jh);
|
||||
updateCount++;
|
||||
}
|
||||
}
|
||||
return String.format("导入成功:新增 %d 条,更新 %d 条。", insertCount, updateCount);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user