Compare commits

..

No commits in common. "7df99183823fd15b0c519aab4d315d07967d7c2e" and "1ff1690b10cf5fc4db3bebe458369d7d8813d92d" have entirely different histories.

6 changed files with 0 additions and 108 deletions

View File

@ -1,34 +0,0 @@
package com.cim.idm.controller;
import com.cim.idm.model.dto.WareHouseEditDto;
import com.cim.idm.service.IWareHouseService;
import com.cim.idm.utils.AjaxResult;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
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 javax.annotation.Resource;
@RestController
@RequestMapping("/api/wareHouse")
@EnableAutoConfiguration
public class WareHouseController {
@Resource
private IWareHouseService wareHouseService;
/**
* 编辑
*/
@PostMapping(value = "/edit")
public AjaxResult edit(@RequestBody WareHouseEditDto wareHouseEditDto) {
if (wareHouseService.edit(wareHouseEditDto) > 0) {
return AjaxResult.me().setSuccess(true).setMessage("编辑成功");
} else {
return AjaxResult.me().setErrorCode(-1).setMessage("编辑失败");
}
}
}

View File

@ -1,19 +0,0 @@
package com.cim.idm.dao;
import com.cim.idm.model.dto.WareHouseEditDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
@Component
@Mapper
public interface WareHouseDao {
/**
* 编辑
* @param dto 请求
* @return 结果
*/
int edit(@Param("dto") WareHouseEditDto dto);
}

View File

@ -1,13 +0,0 @@
package com.cim.idm.model.dto;
import lombok.Data;
@Data
public class WareHouseEditDto {
private String erpFactoryName;
private String erpLocationName;
// 是否货位管理
private String useLocation;
// 是否熟化
private String isOven;
}

View File

@ -1,12 +0,0 @@
package com.cim.idm.service;
import com.cim.idm.model.dto.WareHouseEditDto;
public interface IWareHouseService {
/**
* 编辑
* @param dto 请求
* @return 结果
*/
int edit(WareHouseEditDto dto);
}

View File

@ -1,21 +0,0 @@
package com.cim.idm.service.Impl;
import com.cim.idm.dao.WareHouseDao;
import com.cim.idm.model.dto.WareHouseEditDto;
import com.cim.idm.service.IWareHouseService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class WareHouseServiceImpl implements IWareHouseService {
@Resource
private WareHouseDao wareHouseDao;
@Override
public int edit(WareHouseEditDto dto) {
return wareHouseDao.edit(dto);
}
}

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cim.idm.dao.WareHouseDao">
<update id="edit">
update BS_ERPLOCATION set USE_LOCATION = #{dto.useLocation}, IS_OVEN = #{dto.isOven}
where ERPFACTORYNAME = #{dto.erpFactoryName} and ERPLOCATIONNAME = #{dto.erpLocationName}
</update>
</mapper>