| | |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TInvoice; |
| | | import com.stylefeng.guns.modular.system.service.ITCompanyService; |
| | | import com.stylefeng.guns.modular.system.service.ITInvoiceService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | |
| | | @Autowired |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Autowired |
| | | private ITCompanyService tCompanyService; |
| | | |
| | | /** |
| | | * 跳转到开发票列表首页 |
| | |
| | | String name, |
| | | Integer type, |
| | | Integer state) { |
| | | //获取当前用户的公司id |
| | | Integer companyId = tCompanyService.selectById(shiroExtUtil.getUser().getObjectId()).getId(); |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | |
| | | if (shiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | } else { |
| | | page.setRecords(tInvoiceService.getInvoiceList(page, beginTime, endTime, email, name, type, state)); |
| | | page.setRecords(tInvoiceService.getInvoiceList(page, beginTime, endTime, email, name, type, state,companyId)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | |
| | | @Param("email") String email, |
| | | @Param("name") String name, |
| | | @Param("type") Integer type, |
| | | @Param("state") Integer state); |
| | | @Param("state") Integer state, |
| | | @Param("companyId") Integer companyId); |
| | | } |
| | |
| | | <if test="state != null and state != ''"> |
| | | and o.state = #{state} |
| | | </if> |
| | | and o.companyId = #{companyId} |
| | | </where> |
| | | order by o.id desc |
| | | </select> |
| | |
| | | @Param("email") String email, |
| | | @Param("name") String name, |
| | | @Param("type") Integer type, |
| | | @Param("state") Integer state); |
| | | @Param("state") Integer state, |
| | | @Param("companyId") Integer companyId); |
| | | } |
| | |
| | | public class TInvoiceServiceImpl extends ServiceImpl<TInvoiceMapper, TInvoice> implements ITInvoiceService { |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getInvoiceList(Page<Map<String, Object>> page, String beginTime, String endTime, String email, String name, Integer type, Integer state) { |
| | | return this.baseMapper.getInvoiceList(page, beginTime, endTime, email, name, type, state); |
| | | public List<Map<String, Object>> getInvoiceList(Page<Map<String, Object>> page, String beginTime, String endTime, String email, String name, Integer type, Integer state,Integer companyId) { |
| | | return this.baseMapper.getInvoiceList(page, beginTime, endTime, email, name, type, state, companyId); |
| | | } |
| | | } |