| | |
| | | |
| | | import java.text.MessageFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * 获取GOODS表 |
| | | */ |
| | | public List<Goods> selectGoods(Integer state) { |
| | | String sql = "select * from Goods where 1=1 where state = '" + state + "'"; |
| | | String sql = "select * from Goods where state = '" + state + "'"; |
| | | return erpSqlServer.select(sql, Goods.class); |
| | | } |
| | | |
| | |
| | | * 获取Voucher表 |
| | | */ |
| | | public List<Voucher> selectVoucher(Integer state) { |
| | | String sql = "select * from Voucher where 1=1 where state = '" + state + "'"; |
| | | String sql = "select * from Voucher where state = '" + state + "'"; |
| | | return erpSqlServer.select(sql, Voucher.class); |
| | | } |
| | | |
| | |
| | | * 获取VoucherDetail表 |
| | | */ |
| | | public List<VoucherDetail> selectVoucherDetail(String VoucherID) { |
| | | String sql = "select * from VoucherDetail where 1=1 where VoucherID = '" + VoucherID + "'"; |
| | | String sql = "select * from VoucherDetail where VoucherID = '" + VoucherID + "'"; |
| | | return erpSqlServer.select(sql, VoucherDetail.class); |
| | | } |
| | | |
| | |
| | | * 修改 Goods 表 state |
| | | */ |
| | | public boolean updateStateForGoods(String barcode, Integer state){ |
| | | String sql = "update Goods set State = ''{1}' where BarCode = ''{0}''"; |
| | | sql = MessageFormat.format(sql, barcode, state); |
| | | String sql = "update Goods set State = ''{1}'', LastUpdatedDate = ''{{2}}'' where BarCode = ''{0}''"; |
| | | sql = MessageFormat.format(sql, barcode, state, new Date()); |
| | | return erpSqlServer.update(sql) > 0; |
| | | } |
| | | |