Compare commits
2 Commits
1ff1690b10
...
7df9918382
Author | SHA1 | Date | |
---|---|---|---|
7df9918382 | |||
9cc586b936 |
@ -0,0 +1,34 @@
|
|||||||
|
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("编辑失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
zi-wms-pda/src/main/java/com/cim/idm/dao/WareHouseDao.java
Normal file
19
zi-wms-pda/src/main/java/com/cim/idm/dao/WareHouseDao.java
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
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);
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
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;
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.cim.idm.service;
|
||||||
|
|
||||||
|
import com.cim.idm.model.dto.WareHouseEditDto;
|
||||||
|
|
||||||
|
public interface IWareHouseService {
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param dto 请求
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int edit(WareHouseEditDto dto);
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
<?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>
|
Loading…
x
Reference in New Issue
Block a user