测试问题修复

This commit is contained in:
liux 2026-01-14 17:32:03 +08:00
parent f542f7cc79
commit da7052f4bb
3 changed files with 21 additions and 3 deletions

View File

@ -4,10 +4,13 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.bonus.common.log.enums.OperaType; import com.bonus.common.log.enums.OperaType;
import com.bonus.material.basic.domain.BmUnitPerson;
import com.bonus.material.basic.service.IBmUnitPersonService;
import com.bonus.material.common.annotation.PreventRepeatSubmit; import com.bonus.material.common.annotation.PreventRepeatSubmit;
import com.bonus.material.ma.service.ITypeService; import com.bonus.material.ma.service.ITypeService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -29,7 +32,7 @@ import com.bonus.common.core.web.page.TableDataInfo;
/** /**
* 往来单位管理Controller * 往来单位管理Controller
* *
* @author xsheng * @author xsheng
* @date 2024-09-27 * @date 2024-09-27
*/ */
@ -44,6 +47,9 @@ public class BmUnitController extends BaseController
@Autowired @Autowired
private ITypeService typeService; private ITypeService typeService;
@Autowired
private IBmUnitPersonService bmUnitPersonService;
/** /**
* 查询往来单位管理列表 * 查询往来单位管理列表
*/ */
@ -69,7 +75,11 @@ public class BmUnitController extends BaseController
{ {
Long deptId = typeService.getUserDeptId(); Long deptId = typeService.getUserDeptId();
bmUnit.setCompanyId(deptId); bmUnit.setCompanyId(deptId);
List<BmUnit> list = bmUnitService.selectBmUnitList(bmUnit); // List<BmUnit> list = bmUnitService.selectBmUnitList(bmUnit);
BmUnitPerson bmUnitPerson = new BmUnitPerson();
bmUnitPerson.setCompanyId(deptId+"");
BeanUtils.copyProperties(bmUnit, bmUnitPerson);
List<BmUnit> list = bmUnitPersonService.selectBmUnitList(bmUnitPerson);
ExcelUtil<BmUnit> util = new ExcelUtil<BmUnit>(BmUnit.class); ExcelUtil<BmUnit> util = new ExcelUtil<BmUnit>(BmUnit.class);
util.exportExcel(response, list, "往来单位管理数据"); util.exportExcel(response, list, "往来单位管理数据");
} }

View File

@ -45,6 +45,7 @@ public class WarehousingServiceImpl implements WarehousingService {
@Resource @Resource
private TypeMapper typeMapper; private TypeMapper typeMapper;
// @Autowired // @Autowired
// private PurchaseInputMapper purchaseInputMapper; // private PurchaseInputMapper purchaseInputMapper;
@ -61,6 +62,8 @@ public class WarehousingServiceImpl implements WarehousingService {
@Override @Override
public List<SupplierInfo> selectMaSupplierInfoList(SupplierInfo maSupplierInfo) public List<SupplierInfo> selectMaSupplierInfoList(SupplierInfo maSupplierInfo)
{ {
Long companyId=typeService.getUserDeptId();
maSupplierInfo.setCompanyId(companyId+"");
return warehousingMapper.selectMaSupplierInfoList(maSupplierInfo); return warehousingMapper.selectMaSupplierInfoList(maSupplierInfo);
} }

View File

@ -37,6 +37,11 @@
supplier_id as supplierId , supplier_id as supplierId ,
supplier as supplier supplier as supplier
FROM ma_supplier_info FROM ma_supplier_info
<where>
<if test="companyId !=null and companyId !=''">
and company_id = #{companyId}
</if>
</where>
</select> </select>
<select id="selectByMaCode" resultType="java.lang.Integer"> <select id="selectByMaCode" resultType="java.lang.Integer">
@ -211,4 +216,4 @@
) )
</if> </if>
</select> </select>
</mapper> </mapper>