仓库字典修改

master
anthonyywj2 3 years ago
parent f3dd6cce03
commit faff4a8b8e

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

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

@ -43,5 +43,5 @@ public interface InvWarehouseDao {
* @param sysId * @param sysId
* @return * @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 id
* @param thridWarehouseId * @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 @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); return invWarehouseDao.updateThridId(id, thridWarehouseId, sysId);
} }

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