更新Mapper的文件结构

This commit is contained in:
季圣华
2019-02-24 13:44:24 +08:00
parent 1151add283
commit 0734b057d7
48 changed files with 449 additions and 247 deletions

View File

@@ -2,10 +2,7 @@ package com.jsh.erp.service.account;
import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.*;
import com.jsh.erp.datasource.mappers.AccountHeadMapper;
import com.jsh.erp.datasource.mappers.AccountItemMapper;
import com.jsh.erp.datasource.mappers.AccountMapper;
import com.jsh.erp.datasource.mappers.DepotHeadMapper;
import com.jsh.erp.datasource.mappers.*;
import com.jsh.erp.datasource.vo.AccountVo4InOutList;
import com.jsh.erp.datasource.vo.AccountVo4List;
import com.jsh.erp.utils.StringUtil;
@@ -31,6 +28,9 @@ public class AccountService {
@Resource
private AccountMapper accountMapper;
@Resource
private AccountMapperEx accountMapperEx;
@Resource
private DepotHeadMapper depotHeadMapper;
@@ -51,7 +51,7 @@ public class AccountService {
public List<AccountVo4List> select(String name, String serialNo, String remark, int offset, int rows) {
List<AccountVo4List> resList = new ArrayList<AccountVo4List>();
List<AccountVo4List> list = accountMapper.selectByConditionAccount(name, serialNo, remark, offset, rows);
List<AccountVo4List> list = accountMapperEx.selectByConditionAccount(name, serialNo, remark, offset, rows);
String timeStr = Tools.getCurrentMonth();
if (null != list && null !=timeStr) {
for (AccountVo4List al : list) {
@@ -71,7 +71,7 @@ public class AccountService {
}
public int countAccount(String name, String serialNo, String remark) {
return accountMapper.countsByAccount(name, serialNo, remark);
return accountMapperEx.countsByAccount(name, serialNo, remark);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
@@ -294,11 +294,11 @@ public class AccountService {
}
public List<AccountVo4InOutList> findAccountInOutList(Long accountId, Integer offset, Integer rows) {
return accountMapper.findAccountInOutList(accountId, offset, rows);
return accountMapperEx.findAccountInOutList(accountId, offset, rows);
}
public int findAccountInOutListCount(Long accountId) {
return accountMapper.findAccountInOutListCount(accountId);
return accountMapperEx.findAccountInOutListCount(accountId);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)

View File

@@ -5,6 +5,7 @@ import com.jsh.erp.datasource.entities.AccountHead;
import com.jsh.erp.datasource.entities.AccountHeadExample;
import com.jsh.erp.datasource.entities.AccountHeadVo4ListEx;
import com.jsh.erp.datasource.mappers.AccountHeadMapper;
import com.jsh.erp.datasource.mappers.AccountHeadMapperEx;
import com.jsh.erp.utils.StringUtil;
import com.jsh.erp.utils.Tools;
import org.slf4j.Logger;
@@ -25,6 +26,9 @@ public class AccountHeadService {
@Resource
private AccountHeadMapper accountHeadMapper;
@Resource
private AccountHeadMapperEx accountHeadMapperEx;
public AccountHead getAccountHead(long id) {
return accountHeadMapper.selectByPrimaryKey(id);
}
@@ -36,7 +40,7 @@ public class AccountHeadService {
public List<AccountHeadVo4ListEx> select(String type, String billNo, String beginTime, String endTime, int offset, int rows) {
List<AccountHeadVo4ListEx> resList = new ArrayList<AccountHeadVo4ListEx>();
List<AccountHeadVo4ListEx> list = accountHeadMapper.selectByConditionAccountHead(type, billNo, beginTime, endTime, offset, rows);
List<AccountHeadVo4ListEx> list = accountHeadMapperEx.selectByConditionAccountHead(type, billNo, beginTime, endTime, offset, rows);
if (null != list) {
for (AccountHeadVo4ListEx ah : list) {
if(ah.getChangeamount() != null) {
@@ -52,7 +56,7 @@ public class AccountHeadService {
}
public int countAccountHead(String type, String billNo, String beginTime, String endTime) {
return accountHeadMapper.countsByAccountHead(type, billNo, beginTime, endTime);
return accountHeadMapperEx.countsByAccountHead(type, billNo, beginTime, endTime);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
@@ -89,7 +93,7 @@ public class AccountHeadService {
}
public Long getMaxId() {
return accountHeadMapper.getMaxId();
return accountHeadMapperEx.getMaxId();
}
public BigDecimal findAllMoney(Integer supplierId, String type, String mode, String endTime) {
@@ -99,12 +103,12 @@ public class AccountHeadService {
} else if (mode.equals("合计")) {
modeName = "TotalPrice";
}
return accountHeadMapper.findAllMoney(supplierId, type, modeName, endTime);
return accountHeadMapperEx.findAllMoney(supplierId, type, modeName, endTime);
}
public List<AccountHeadVo4ListEx> getDetailByNumber(String billNo) {
List<AccountHeadVo4ListEx> resList = new ArrayList<AccountHeadVo4ListEx>();
List<AccountHeadVo4ListEx> list = accountHeadMapper.getDetailByNumber(billNo);
List<AccountHeadVo4ListEx> list = accountHeadMapperEx.getDetailByNumber(billNo);
if (null != list) {
for (AccountHeadVo4ListEx ah : list) {
if(ah.getChangeamount() != null) {

View File

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.AccountItem;
import com.jsh.erp.datasource.entities.AccountItemExample;
import com.jsh.erp.datasource.mappers.AccountItemMapper;
import com.jsh.erp.datasource.mappers.AccountItemMapperEx;
import com.jsh.erp.datasource.vo.AccountItemVo4List;
import com.jsh.erp.utils.ErpInfo;
import com.jsh.erp.utils.StringUtil;
@@ -28,6 +29,9 @@ public class AccountItemService {
@Resource
private AccountItemMapper accountItemMapper;
@Resource
private AccountItemMapperEx accountItemMapperEx;
public AccountItem getAccountItem(long id) {
return accountItemMapper.selectByPrimaryKey(id);
}
@@ -38,11 +42,11 @@ public class AccountItemService {
}
public List<AccountItem> select(String name, Integer type, String remark, int offset, int rows) {
return accountItemMapper.selectByConditionAccountItem(name, type, remark, offset, rows);
return accountItemMapperEx.selectByConditionAccountItem(name, type, remark, offset, rows);
}
public int countAccountItem(String name, Integer type, String remark) {
return accountItemMapper.countsByAccountItem(name, type, remark);
return accountItemMapperEx.countsByAccountItem(name, type, remark);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
@@ -89,7 +93,7 @@ public class AccountItemService {
}
public List<AccountItemVo4List> getDetailList(Long headerId) {
return accountItemMapper.getDetailList(headerId);
return accountItemMapperEx.getDetailList(headerId);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
public String saveDetials(String inserted, String deleted, String updated, Long headerId, String listType) throws DataAccessException {

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.App;
import com.jsh.erp.datasource.entities.AppExample;
import com.jsh.erp.datasource.mappers.AppMapper;
import com.jsh.erp.datasource.mappers.AppMapperEx;
import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -20,6 +21,8 @@ public class AppService {
@Resource
private AppMapper appMapper;
@Resource
private AppMapperEx appMapperEx;
public List<App> findDock(){
AppExample example = new AppExample();
@@ -54,11 +57,11 @@ public class AppService {
}
public List<App> select(String name, String type, int offset, int rows) {
return appMapper.selectByConditionApp(name, type, offset, rows);
return appMapperEx.selectByConditionApp(name, type, offset, rows);
}
public int countApp(String name, String type) {
return appMapper.countsByApp(name, type);
return appMapperEx.countsByApp(name, type);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.Depot;
import com.jsh.erp.datasource.entities.DepotExample;
import com.jsh.erp.datasource.mappers.DepotMapper;
import com.jsh.erp.datasource.mappers.DepotMapperEx;
import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -21,6 +22,9 @@ public class DepotService {
@Resource
private DepotMapper depotMapper;
@Resource
private DepotMapperEx depotMapperEx;
public Depot getDepot(long id) {
return depotMapper.selectByPrimaryKey(id);
}
@@ -37,11 +41,11 @@ public class DepotService {
}
public List<Depot> select(String name, Integer type, String remark, int offset, int rows) {
return depotMapper.selectByConditionDepot(name, type, remark, offset, rows);
return depotMapperEx.selectByConditionDepot(name, type, remark, offset, rows);
}
public int countDepot(String name, Integer type, String remark) {
return depotMapper.countsByDepot(name, type, remark);
return depotMapperEx.countsByDepot(name, type, remark);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.Functions;
import com.jsh.erp.datasource.entities.FunctionsExample;
import com.jsh.erp.datasource.mappers.FunctionsMapper;
import com.jsh.erp.datasource.mappers.FunctionsMapperEx;
import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -21,6 +22,9 @@ public class FunctionsService {
@Resource
private FunctionsMapper functionsMapper;
@Resource
private FunctionsMapperEx functionsMapperEx;
public Functions getFunctions(long id) {
return functionsMapper.selectByPrimaryKey(id);
}
@@ -31,11 +35,11 @@ public class FunctionsService {
}
public List<Functions> select(String name, String type, int offset, int rows) {
return functionsMapper.selectByConditionFunctions(name, type, offset, rows);
return functionsMapperEx.selectByConditionFunctions(name, type, offset, rows);
}
public int countFunctions(String name, String type) {
return functionsMapper.countsByFunctions(name, type);
return functionsMapperEx.countsByFunctions(name, type);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.InOutItem;
import com.jsh.erp.datasource.entities.InOutItemExample;
import com.jsh.erp.datasource.mappers.InOutItemMapper;
import com.jsh.erp.datasource.mappers.InOutItemMapperEx;
import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -21,6 +22,9 @@ public class InOutItemService {
@Resource
private InOutItemMapper inOutItemMapper;
@Resource
private InOutItemMapperEx inOutItemMapperEx;
public InOutItem getInOutItem(long id) {
return inOutItemMapper.selectByPrimaryKey(id);
}
@@ -31,11 +35,11 @@ public class InOutItemService {
}
public List<InOutItem> select(String name, String type, String remark, int offset, int rows) {
return inOutItemMapper.selectByConditionInOutItem(name, type, remark, offset, rows);
return inOutItemMapperEx.selectByConditionInOutItem(name, type, remark, offset, rows);
}
public int countInOutItem(String name, String type, String remark) {
return inOutItemMapper.countsByInOutItem(name, type, remark);
return inOutItemMapperEx.countsByInOutItem(name, type, remark);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.Log;
import com.jsh.erp.datasource.entities.LogExample;
import com.jsh.erp.datasource.mappers.LogMapper;
import com.jsh.erp.datasource.mappers.LogMapperEx;
import com.jsh.erp.datasource.vo.LogVo4List;
import com.jsh.erp.utils.ExceptionCodeConstants;
import com.jsh.erp.utils.JshException;
@@ -25,6 +26,9 @@ public class LogService {
@Resource
private LogMapper logMapper;
@Resource
private LogMapperEx logMapperEx;
public Log getLog(long id) {
return logMapper.selectByPrimaryKey(id);
}
@@ -36,13 +40,13 @@ public class LogService {
public List<LogVo4List> select(String operation, Integer usernameID, String clientIp, Integer status, String beginTime, String endTime,
String contentdetails, int offset, int rows) {
return logMapper.selectByConditionLog(operation, usernameID, clientIp, status, beginTime, endTime,
return logMapperEx.selectByConditionLog(operation, usernameID, clientIp, status, beginTime, endTime,
contentdetails, offset, rows);
}
public int countLog(String operation, Integer usernameID, String clientIp, Integer status, String beginTime, String endTime,
String contentdetails) {
return logMapper.countsByLog(operation, usernameID, clientIp, status, beginTime, endTime, contentdetails);
return logMapperEx.countsByLog(operation, usernameID, clientIp, status, beginTime, endTime, contentdetails);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.MaterialProperty;
import com.jsh.erp.datasource.entities.MaterialPropertyExample;
import com.jsh.erp.datasource.mappers.MaterialPropertyMapper;
import com.jsh.erp.datasource.mappers.MaterialPropertyMapperEx;
import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -21,6 +22,9 @@ public class MaterialPropertyService {
@Resource
private MaterialPropertyMapper materialPropertyMapper;
@Resource
private MaterialPropertyMapperEx materialPropertyMapperEx;
public MaterialProperty getMaterialProperty(long id) {
return materialPropertyMapper.selectByPrimaryKey(id);
}
@@ -30,11 +34,11 @@ public class MaterialPropertyService {
return materialPropertyMapper.selectByExample(example);
}
public List<MaterialProperty> select(String name, int offset, int rows) {
return materialPropertyMapper.selectByConditionMaterialProperty(name, offset, rows);
return materialPropertyMapperEx.selectByConditionMaterialProperty(name, offset, rows);
}
public int countMaterialProperty(String name) {
return materialPropertyMapper.countsByMaterialProperty(name);
return materialPropertyMapperEx.countsByMaterialProperty(name);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.Person;
import com.jsh.erp.datasource.entities.PersonExample;
import com.jsh.erp.datasource.mappers.PersonMapper;
import com.jsh.erp.datasource.mappers.PersonMapperEx;
import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -21,6 +22,9 @@ public class PersonService {
@Resource
private PersonMapper personMapper;
@Resource
private PersonMapperEx personMapperEx;
public Person getPerson(long id) {
return personMapper.selectByPrimaryKey(id);
}
@@ -31,11 +35,11 @@ public class PersonService {
}
public List<Person> select(String name, String type, int offset, int rows) {
return personMapper.selectByConditionPerson(name, type, offset, rows);
return personMapperEx.selectByConditionPerson(name, type, offset, rows);
}
public int countPerson(String name, String type) {
return personMapper.countsByPerson(name, type);
return personMapperEx.countsByPerson(name, type);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)

View File

@@ -6,6 +6,7 @@ import com.jsh.erp.datasource.entities.RoleExample;
import com.jsh.erp.datasource.entities.User;
import com.jsh.erp.datasource.entities.UserExample;
import com.jsh.erp.datasource.mappers.RoleMapper;
import com.jsh.erp.datasource.mappers.RoleMapperEx;
import com.jsh.erp.datasource.mappers.UserMapper;
import com.jsh.erp.utils.QueryUtils;
import com.jsh.erp.utils.RegExpTools;
@@ -23,6 +24,9 @@ public class RoleService {
@Resource
private RoleMapper roleMapper;
@Resource
private RoleMapperEx roleMapperEx;
public Role getRole(long id) {
return roleMapper.selectByPrimaryKey(id);
}
@@ -33,11 +37,11 @@ public class RoleService {
}
public List<Role> select(String name, int offset, int rows) {
return roleMapper.selectByConditionRole(name, offset, rows);
return roleMapperEx.selectByConditionRole(name, offset, rows);
}
public int countRole(String name) {
return roleMapper.countsByRole(name);
return roleMapperEx.countsByRole(name);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.Supplier;
import com.jsh.erp.datasource.entities.SupplierExample;
import com.jsh.erp.datasource.mappers.SupplierMapper;
import com.jsh.erp.datasource.mappers.SupplierMapperEx;
import com.jsh.erp.utils.BaseResponseInfo;
import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger;
@@ -25,6 +26,9 @@ public class SupplierService {
@Resource
private SupplierMapper supplierMapper;
@Resource
private SupplierMapperEx supplierMapperEx;
public Supplier getSupplier(long id) {
return supplierMapper.selectByPrimaryKey(id);
}
@@ -35,11 +39,11 @@ public class SupplierService {
}
public List<Supplier> select(String supplier, String type, String phonenum, String telephone, String description, int offset, int rows) {
return supplierMapper.selectByConditionSupplier(supplier, type, phonenum, telephone, description, offset, rows);
return supplierMapperEx.selectByConditionSupplier(supplier, type, phonenum, telephone, description, offset, rows);
}
public int countSupplier(String supplier, String type, String phonenum, String telephone, String description) {
return supplierMapper.countsBySupplier(supplier, type, phonenum, telephone, description);
return supplierMapperEx.countsBySupplier(supplier, type, phonenum, telephone, description);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
@@ -134,7 +138,7 @@ public class SupplierService {
}
public List<Supplier> findByAll(String supplier, String type, String phonenum, String telephone, String description) {
return supplierMapper.findByAll(supplier, type, phonenum, telephone, description);
return supplierMapperEx.findByAll(supplier, type, phonenum, telephone, description);
}
public BaseResponseInfo importExcel(List<Supplier> mList) throws Exception {

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.SystemConfig;
import com.jsh.erp.datasource.entities.SystemConfigExample;
import com.jsh.erp.datasource.mappers.SystemConfigMapper;
import com.jsh.erp.datasource.mappers.SystemConfigMapperEx;
import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -21,6 +22,9 @@ public class SystemConfigService {
@Resource
private SystemConfigMapper systemConfigMapper;
@Resource
private SystemConfigMapperEx systemConfigMapperEx;
public SystemConfig getSystemConfig(long id) {
return systemConfigMapper.selectByPrimaryKey(id);
}
@@ -30,11 +34,11 @@ public class SystemConfigService {
return systemConfigMapper.selectByExample(example);
}
public List<SystemConfig> select(int offset, int rows) {
return systemConfigMapper.selectByConditionSystemConfig(offset, rows);
return systemConfigMapperEx.selectByConditionSystemConfig(offset, rows);
}
public int countSystemConfig() {
return systemConfigMapper.countsBySystemConfig();
return systemConfigMapperEx.countsBySystemConfig();
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.Unit;
import com.jsh.erp.datasource.entities.UnitExample;
import com.jsh.erp.datasource.mappers.UnitMapper;
import com.jsh.erp.datasource.mappers.UnitMapperEx;
import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -21,6 +22,9 @@ public class UnitService {
@Resource
private UnitMapper unitMapper;
@Resource
private UnitMapperEx unitMapperEx;
public Unit getUnit(long id) {
return unitMapper.selectByPrimaryKey(id);
}
@@ -31,11 +35,11 @@ public class UnitService {
}
public List<Unit> select(String name, int offset, int rows) {
return unitMapper.selectByConditionUnit(name, offset, rows);
return unitMapperEx.selectByConditionUnit(name, offset, rows);
}
public int countUnit(String name) {
return unitMapper.countsByUnit(name);
return unitMapperEx.countsByUnit(name);
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)

View File

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.User;
import com.jsh.erp.datasource.entities.UserExample;
import com.jsh.erp.datasource.mappers.UserMapper;
import com.jsh.erp.datasource.mappers.UserMapperEx;
import com.jsh.erp.utils.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -26,6 +27,9 @@ public class UserService {
@Resource
private UserMapper userMapper;
@Resource
private UserMapperEx userMapperEx;
public User getUser(long id) {
return userMapper.selectByPrimaryKey(id);
}
@@ -36,11 +40,11 @@ public class UserService {
}
public List<User> select(String userName, String loginName, int offset, int rows) {
return userMapper.selectByConditionUser(userName, loginName, offset, rows);
return userMapperEx.selectByConditionUser(userName, loginName, offset, rows);
}
public int countUser(String userName, String loginName) {
return userMapper.countsByUser(userName, loginName);
return userMapperEx.countsByUser(userName, loginName);
}
/**
* create by: cjl