Commit fc648dcc authored by hezhen's avatar hezhen

修改导入股份

parent 63b15ba3
......@@ -265,8 +265,8 @@ public class BranchCompanyStockService {
}
BigDecimal price = new BigDecimal(str6);
price=price.multiply(new BigDecimal("10000"));
Integer balance = Integer.parseInt(str[7]);
Integer total =Integer.parseInt(str[8])+balance;
Integer balance = Integer.parseInt(str[8]);
Integer total =Integer.parseInt(str[7])+balance;
stockInfoVo.setCompanyName(company_name);
stockInfoVo.setPrice(price);
stockInfoVo.setBalance(balance);
......@@ -274,11 +274,11 @@ public class BranchCompanyStockService {
stockInfoVo.setState(2);
stockInfoVo.setAddrProvince(addr_province);
stockInfoVo.setAddrCity(addr_city);
stockInfoVo.setCompanyPic("1");
stockInfoVo.setCompanyPic("/2019-04-30/2.jpg");
list.add(stockInfoVo);
branchCompanyStockInfoMapper.insertSelective(stockInfoVo);
//branchCompanyStockInfoMapper.insertSelective(stockInfoVo);
}
// branchCompanyStockInfoMapper.addCompamyList(list);
branchCompanyStockInfoMapper.addCompamyList(list);
}catch (Exception e){
e.printStackTrace();
return RestResponse.codeAndMessage(10001,"网络异常!");
......
......@@ -37,15 +37,12 @@
select distinct price from branch_company_stock_info order by price
</select>
<insert id="addCompamyList">
<insert id="addCompamyList" parameterType="java.util.List">
insert into branch_company_stock_info (
balance,total,price,company_name,addr_province,addr_city,state,company_pic
) vaules
<foreach collection ="list" item="item" index= "index" separator =",">
(
#{item.balance},#{item.total},
#{item.price},#{item.companyName},#{item.companyPic},#{item.addrProvince},#{item.addrCity},#{item.companyPic}
)
</foreach >
) VALUES
<foreach collection ="list" item="item" index="index" separator =",">
(#{item.balance},#{item.total},#{item.price},#{item.companyName},#{item.addrProvince},#{item.addrCity},#{item.state},#{item.companyPic})
</foreach>
</insert>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment