仓库字典修改

master
anthonyywj2 3 years ago
parent f3dd6cce03
commit faff4a8b8e

@ -426,7 +426,7 @@ public class InvWarehouseController {
*/
@AuthRuleAnnotation("")
@PostMapping("/spms/inv/warehouse/bindThrWarehouse")
public BaseResponse bindThrWarehouse(Integer id, Integer thridWarehouseId, String sysId) {
public BaseResponse bindThrWarehouse(Integer id, String thridWarehouseId, String sysId) {
if (null == id || null == thridWarehouseId || StrUtil.isBlank(sysId)) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}

@ -1,10 +1,12 @@
package com.glxp.sale.admin.controller.thrsys;
import com.github.pagehelper.PageInfo;
import com.glxp.sale.admin.dao.basic.BasicThirdSysDao;
import com.glxp.sale.admin.entity.basic.BasicThirdSysEntity;
import com.glxp.sale.admin.entity.thrsys.ThrInvWarehouseEntity;
import com.glxp.sale.admin.req.inout.DeleteRequest;
import com.glxp.sale.admin.req.thrsys.FilterThrInvWarehouseRequest;
import com.glxp.sale.admin.res.PageSimpleResponse;
import com.glxp.sale.admin.res.thrsys.ThrInvWarehouseResponse;
import com.glxp.sale.admin.service.thrsys.ThrInvWarehouseService;
import com.glxp.sale.common.enums.ResultEnum;
@ -37,11 +39,13 @@ public class ThrInvWarehouseController {
@GetMapping("spms/thrsys/warehouse/filter")
public BaseResponse filterInvWarehouse(FilterThrInvWarehouseRequest filterThrInvWarehouseRequest) {
List<ThrInvWarehouseEntity> thrInvWarehouseEntities = thrInvWarehouseService.filterThrInvWarehouse(filterThrInvWarehouseRequest);
List<ThrInvWarehouseResponse> merge = merge(thrInvWarehouseEntities, 0);
Map<String, Object> restMap = new HashMap<>();
restMap.put("list", merge);
return ResultVOUtils.success(restMap);
PageInfo<ThrInvWarehouseEntity> pageInfo;
pageInfo = new PageInfo<>(thrInvWarehouseEntities);
PageSimpleResponse<ThrInvWarehouseEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(thrInvWarehouseEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
public List<ThrInvWarehouseResponse> merge(List<ThrInvWarehouseEntity> thrInvWarehouseEntities, Integer pid) {

@ -43,5 +43,5 @@ public interface InvWarehouseDao {
* @param sysId
* @return
*/
boolean updateThridId(@Param("id") Integer id, @Param("thridWarehouseId") Integer thridWarehouseId, @Param("sysId") String sysId);
boolean updateThridId(@Param("id") Integer id, @Param("thridWarehouseId") String thridWarehouseId, @Param("sysId") String sysId);
}

@ -43,7 +43,7 @@ public interface InvWarehouseService {
* @param id
* @param thridWarehouseId
*/
boolean bindThrWarehouse(Integer id, Integer thridWarehouseId, String sysId);
boolean bindThrWarehouse(Integer id, String thridWarehouseId, String sysId);
/**
*

@ -125,7 +125,7 @@ public class InvWarehouseServiceImpl implements InvWarehouseService {
}
@Override
public boolean bindThrWarehouse(Integer id, Integer thridWarehouseId, String sysId) {
public boolean bindThrWarehouse(Integer id, String thridWarehouseId, String sysId) {
return invWarehouseDao.updateThridId(id, thridWarehouseId, sysId);
}

@ -243,9 +243,9 @@
</foreach>
</insert>
<update id="updateThridId" statementType="STATEMENT">
<update id="updateThridId" parameterType="Map">
update inv_warehouse
set ${sysId} = ${thridWarehouseId}
where id = ${id}
set ${sysId} = #{thridWarehouseId,jdbcType=VARCHAR}
where id = #{id}
</update>
</mapper>
Loading…
Cancel
Save