fix:更新时间

This commit is contained in:
郭飞 2025-04-25 15:23:18 +08:00
parent 1fd21ec024
commit 4f37e69855
4 changed files with 10 additions and 7 deletions

View File

@ -180,7 +180,7 @@ public class FGStockInController {
* @throws Exception 如果处理过程中发生异常 * @throws Exception 如果处理过程中发生异常
*/ */
@RequestMapping(value = "/FGStockIn", method = RequestMethod.POST) @RequestMapping(value = "/FGStockIn", method = RequestMethod.POST)
public BaseResponse<Object> fgStockIn(@RequestBody JSONObject in) { public BaseResponse fgStockIn(@RequestBody JSONObject in) {
// 将输入的JSONObject转换为MaterialReceiveRequest对象 // 将输入的JSONObject转换为MaterialReceiveRequest对象
MaterialReceiveRequest sl = JSON.toJavaObject(in, MaterialReceiveRequest.class); MaterialReceiveRequest sl = JSON.toJavaObject(in, MaterialReceiveRequest.class);

View File

@ -17,9 +17,9 @@ public interface ToSapDao {
public List<ToSAPFgStockInDto> getFgStockInInfo(@Param("boxList") List<MaterialPacking> boxList) throws Exception; public List<ToSAPFgStockInDto> getFgStockInInfo(@Param("boxList") List<MaterialPacking> boxList) throws Exception;
//基于boxList更新物料凭证及库存状态 //基于boxList更新物料凭证及库存状态
public void updateStockState(@Param("boxList") List<MaterialPacking> boxList,@Param("stockState") String stockState,@Param("undoId") String undoId) throws Exception; public void updateStockState(@Param("boxList") List<MaterialPacking> boxList,@Param("stockState") String stockState,@Param("undoId") String undoId,@Param("user") String user) throws Exception;
//基于boxList更新物料凭证及库存状态 //基于boxList更新物料凭证及库存状态
public void updateLocationStockState(@Param("boxList") List<MaterialPacking> boxList,@Param("stockState") String stockState,@Param("undoId") String undoId,@Param("aimErpFactory") String aimErpFactory,@Param("aimErpLocation") String aimErpLocation,@Param("aimLOcationName") String aimLOcationName) throws Exception; public void updateLocationStockState(@Param("boxList") List<MaterialPacking> boxList,@Param("stockState") String stockState,@Param("undoId") String undoId,@Param("aimErpFactory") String aimErpFactory,@Param("aimErpLocation") String aimErpLocation,@Param("aimLOcationName") String aimLOcationName,@Param("user") String user) throws Exception;
//基于boxList写入过账流水表 //基于boxList写入过账流水表
public void saveUnDoInfo(@Param("boxList") List<MaterialPacking> boxList, @Param("unDoID") String unDoID, @Param("commitDate") String commitDate) throws Exception; public void saveUnDoInfo(@Param("boxList") List<MaterialPacking> boxList, @Param("unDoID") String unDoID, @Param("commitDate") String commitDate) throws Exception;

View File

@ -327,14 +327,14 @@ public class ProductIntoServiceImpl implements FGStockInService {
undoID = toSAPService.NoSourceChangeLocation(arrayList,aimErpFactory, undoID = toSAPService.NoSourceChangeLocation(arrayList,aimErpFactory,
aimErpLocation, aimLOcationName, user ); aimErpLocation, aimLOcationName, user );
//更新物料凭证和库存状态 //更新物料凭证和库存状态
toSapDao.updateLocationStockState(boxList, "Stocked", undoID,aimErpFactory,aimErpLocation,aimLOcationName); toSapDao.updateLocationStockState(boxList, "Stocked", undoID,aimErpFactory,aimErpLocation,aimLOcationName,user);
}else { }else {
// 直接入库 // 直接入库
//封装为Json的字符串 //封装为Json的字符串
String json = JSON.toJSONString(fgStockInInfo); String json = JSON.toJSONString(fgStockInInfo);
undoID = toSAPService.FGStockInByManulIn(json, user); undoID = toSAPService.FGStockInByManulIn(json, user);
//更新物料凭证和库存状态 //更新物料凭证和库存状态
toSapDao.updateStockState(boxList, "Stocked", undoID); toSapDao.updateStockState(boxList, "Stocked", undoID, user);
} }
//更新过账流水 //更新过账流水

View File

@ -37,7 +37,8 @@
<!-- 更新库存状态 --> <!-- 更新库存状态 -->
<update id="updateStockState" parameterType="map"> <update id="updateStockState" parameterType="map">
UPDATE MATERIALPACKING UPDATE MATERIALPACKING
SET STOCKSTATE = #{stockState},UNDOID = #{undoId} SET STOCKSTATE = #{stockState},UNDOID = #{undoId},LASTEVENTTIME = SYSDATE,
LASTEVENTUSER = #{user}
WHERE MATERIALPACKINGNAME IN WHERE MATERIALPACKINGNAME IN
<foreach item="box" index="index" collection="boxList" open="(" separator="," close=")"> <foreach item="box" index="index" collection="boxList" open="(" separator="," close=")">
#{box.materialPackingName} #{box.materialPackingName}
@ -46,7 +47,9 @@
<!-- 更新库存状态 --> <!-- 更新库存状态 -->
<update id="updateLocationStockState" parameterType="map"> <update id="updateLocationStockState" parameterType="map">
UPDATE MATERIALPACKING UPDATE MATERIALPACKING
SET STOCKSTATE = #{stockState},UNDOID = #{undoId}, ERPLOCATION = #{aimErpLocation}, LOCATIONNAME = #{aimLOcationName}, ERPFACTORY = #{aimErpFactory} SET STOCKSTATE = #{stockState},UNDOID = #{undoId}, ERPLOCATION = #{aimErpLocation}, LOCATIONNAME = #{aimLOcationName}, ERPFACTORY = #{aimErpFactory},
LASTEVENTTIME = SYSDATE,
LASTEVENTUSER = #{user}
WHERE MATERIALPACKINGNAME IN WHERE MATERIALPACKINGNAME IN
<foreach item="box" index="index" collection="boxList" open="(" separator="," close=")"> <foreach item="box" index="index" collection="boxList" open="(" separator="," close=")">
#{box.materialPackingName} #{box.materialPackingName}