1.重写部分分页查询代码,修改查询语句错误问题

2.格式化xml代码,增加代码可读性
master
x_z 3 years ago
parent abf4724d7d
commit 5f3948c732

@ -134,7 +134,7 @@ public class AuthAdminController {
AuthAdmin authAdmin = authAdminService.getCurrentUser(); AuthAdmin authAdmin = authAdminService.getCurrentUser();
List<AuthRole> authRoles = authRoleAdminService.listAdminRole(authAdmin.getId()); List<AuthRole> authRoles = authRoleAdminService.listAdminRole(authAdmin.getId());
List<AuthRole> authRoleList; List<AuthRole> authRoleList;
Page<AuthRole> pageResult = new Page<>(); IPage<AuthRole> pageResult = new Page<>();
if (authRoles != null && authRoles.size() > 0) { if (authRoles != null && authRoles.size() > 0) {
int status = authRoles.get(0).getIsCustomer(); int status = authRoles.get(0).getIsCustomer();
pageResult = authRoleService.listCustomerRoles(page, limit, status); pageResult = authRoleService.listCustomerRoles(page, limit, status);
@ -158,7 +158,7 @@ public class AuthAdminController {
@GetMapping("/admin/auth/admin/customerRoles") @GetMapping("/admin/auth/admin/customerRoles")
public BaseResponse customerRoles(@RequestParam(value = "page", defaultValue = "1") Integer page, public BaseResponse customerRoles(@RequestParam(value = "page", defaultValue = "1") Integer page,
@RequestParam(value = "limit", defaultValue = "100") Integer limit) { @RequestParam(value = "limit", defaultValue = "100") Integer limit) {
Page<AuthRole> authRolePage = authRoleService.listCustomerRoles(page, limit, 1); IPage<AuthRole> authRolePage = authRoleService.listCustomerRoles(page, limit, 1);
PageSimpleResponse<AuthAdminRoleResponse> pageSimpleResponse = new PageSimpleResponse<>(); PageSimpleResponse<AuthAdminRoleResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(authRolePage.getTotal()); pageSimpleResponse.setTotal(authRolePage.getTotal());
List<AuthAdminRoleResponse> authAdminRoleResponses = authRolePage.getRecords().stream().map(e -> { List<AuthAdminRoleResponse> authAdminRoleResponses = authRolePage.getRecords().stream().map(e -> {
@ -333,7 +333,7 @@ public class AuthAdminController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
} }
Integer isCustomer = authRoleAdminService.getIsCustomer(authAdminQueryRequest.getAdminId()); Integer isCustomer = authRoleAdminService.getIsCustomer(authAdminQueryRequest.getAdminId());
Page<AuthRole> authRolePage = authRoleService.listCustomerRoles(authAdminQueryRequest.getPage(), authAdminQueryRequest.getLimit(), isCustomer); IPage<AuthRole> authRolePage = authRoleService.listCustomerRoles(authAdminQueryRequest.getPage(), authAdminQueryRequest.getLimit(), isCustomer);
PageSimpleResponse<AuthAdminRoleResponse> pageSimpleResponse = new PageSimpleResponse<>(); PageSimpleResponse<AuthAdminRoleResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(authRolePage.getTotal()); pageSimpleResponse.setTotal(authRolePage.getTotal());
List<AuthAdminRoleResponse> authAdminRoleResponses = authRolePage.getRecords().stream().map(e -> { List<AuthAdminRoleResponse> authAdminRoleResponses = authRolePage.getRecords().stream().map(e -> {
@ -355,7 +355,7 @@ public class AuthAdminController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("/auth/admin/admin/getAdminRoles") @GetMapping("/auth/admin/admin/getAdminRoles")
public BaseResponse getAdminRoles(AuthAdminQueryRequest authAdminQueryRequest) { public BaseResponse getAdminRoles(AuthAdminQueryRequest authAdminQueryRequest) {
Page<AuthRole> authRolePage = authRoleService.listCustomerRoles(authAdminQueryRequest.getPage(), authAdminQueryRequest.getLimit(), 0); IPage<AuthRole> authRolePage = authRoleService.listCustomerRoles(authAdminQueryRequest.getPage(), authAdminQueryRequest.getLimit(), 0);
PageSimpleResponse<AuthAdminRoleResponse> pageSimpleResponse = new PageSimpleResponse<>(); PageSimpleResponse<AuthAdminRoleResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(authRolePage.getTotal()); pageSimpleResponse.setTotal(authRolePage.getTotal());
List<AuthAdminRoleResponse> authAdminRoleResponses = authRolePage.getRecords().stream().map(e -> { List<AuthAdminRoleResponse> authAdminRoleResponses = authRolePage.getRecords().stream().map(e -> {

@ -278,7 +278,7 @@ public class StockQRCodeTextController {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
} }
Page<StockPrintTempEntity> page = stockPrintTempService.filterStockPrintTempEntity(filterStPrintTempRequest); IPage<StockPrintTempEntity> page = stockPrintTempService.filterStockPrintTempEntity(filterStPrintTempRequest);
PageSimpleResponse<StockPrintTempEntity> pageSimpleResponse = new PageSimpleResponse<>(); PageSimpleResponse<StockPrintTempEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(page.getTotal()); pageSimpleResponse.setTotal(page.getTotal());
pageSimpleResponse.setList(page.getRecords()); pageSimpleResponse.setList(page.getRecords());

@ -1,7 +1,6 @@
package com.glxp.udi.admin.controller.inout; package com.glxp.udi.admin.controller.inout;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.annotation.AuthRuleAnnotation; import com.glxp.udi.admin.annotation.AuthRuleAnnotation;
import com.glxp.udi.admin.common.res.BaseResponse; import com.glxp.udi.admin.common.res.BaseResponse;
import com.glxp.udi.admin.entity.inout.UnitMaintainEntity; import com.glxp.udi.admin.entity.inout.UnitMaintainEntity;
@ -61,7 +60,7 @@ public class UnitMaintainController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
} }
unitMaintainFilterRequest.setCustomerId(authAdminService.getCurrentUserCustomerId()); unitMaintainFilterRequest.setCustomerId(authAdminService.getCurrentUserCustomerId());
Page<UnitMaintainEntity> page = unitMaintainService.getUnbindUnitMaintain(unitMaintainFilterRequest); IPage<UnitMaintainEntity> page = unitMaintainService.getUnbindUnitMaintain(unitMaintainFilterRequest);
PageSimpleResponse<UnitMaintainEntity> pageSimpleResponse = new PageSimpleResponse<>(); PageSimpleResponse<UnitMaintainEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(page.getTotal()); pageSimpleResponse.setTotal(page.getTotal());

@ -1,6 +1,7 @@
package com.glxp.udi.admin.dao.auth; package com.glxp.udi.admin.dao.auth;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.entity.auth.AuthRole; import com.glxp.udi.admin.entity.auth.AuthRole;
import com.glxp.udi.admin.req.auth.AuthRoleQueryRequest; import com.glxp.udi.admin.req.auth.AuthRoleQueryRequest;
@ -26,7 +27,7 @@ public interface AuthRoleDao extends BaseMapper<AuthRole> {
*/ */
Page<AuthRole> listAuthAdminRolePage(Page<AuthRole> page, @Param("status") Integer status); Page<AuthRole> listAuthAdminRolePage(Page<AuthRole> page, @Param("status") Integer status);
Page<AuthRole> listCustomerRoles(Page<AuthRole> page, Integer isCustomer); IPage<AuthRole> listCustomerRoles(IPage<AuthRole> page, @Param("isCustomer") Integer isCustomer);
List<AuthRole> listAuthRoles2(); List<AuthRole> listAuthRoles2();

@ -1,16 +1,12 @@
package com.glxp.udi.admin.dao.auth; package com.glxp.udi.admin.dao.auth;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.entity.auth.CustomerContactEntity; import com.glxp.udi.admin.entity.auth.CustomerContactEntity;
import com.glxp.udi.admin.req.auth.CustomerContactFilterRequest;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface CustomerContacDao extends BaseMapper<CustomerContactEntity> { public interface CustomerContacDao extends BaseMapper<CustomerContactEntity> {
Page<CustomerContactEntity> filterCustomerContact(Page<CustomerContactEntity> page, CustomerContactFilterRequest userResisterFilterRequest);
boolean insertCustomerContact(CustomerContactEntity customerContactEntity); boolean insertCustomerContact(CustomerContactEntity customerContactEntity);
boolean updateCustomerContact(CustomerContactEntity customerContactEntity); boolean updateCustomerContact(CustomerContactEntity customerContactEntity);

@ -28,5 +28,5 @@ public interface CustomerInfoDao extends BaseMapper<CustomerInfoEntity> {
*/ */
List<String> selectCustomerIdByCustomerName(@Param("customerName") String customerName); List<String> selectCustomerIdByCustomerName(@Param("customerName") String customerName);
IPage<CustomerDetailEntity> filterDetailCustomerInfo(IPage<CustomerDetailEntity> page, String key, String customerName, String companyName, Integer userFlag, Integer bussinessStatus); IPage<CustomerDetailEntity> filterDetailCustomerInfo(@Param("page") IPage<CustomerDetailEntity> page, @Param("key") String key, @Param("customerName") String customerName, @Param("companyName") String companyName, @Param("userFlag") Integer userFlag, @Param("bussinessStatus") Integer bussinessStatus);
} }

@ -17,5 +17,4 @@ public interface UserRegisterDao extends BaseMapper<UserRegisterEntity> {
boolean deleteByCustomerId(Long id); boolean deleteByCustomerId(Long id);
String isExit(String phoneNum);
} }

@ -12,7 +12,7 @@ import java.util.List;
@Mapper @Mapper
public interface BussinessTypeDao extends BaseMapper<BussinessTypeEntity> { public interface BussinessTypeDao extends BaseMapper<BussinessTypeEntity> {
IPage<BussinessTypeEntity> filterAllByUser(IPage<BussinessTypeEntity> page, String name, String action, String mainAction, String locInvCode, String customerId, Boolean enabled); IPage<BussinessTypeEntity> filterAllByUser(@Param("page") IPage<BussinessTypeEntity> page, @Param("name") String name, @Param("action") String action, @Param("mainAction") String mainAction, @Param("locInvCode") String locInvCode, @Param("customerId") String customerId, @Param("enabled") Boolean enabled);
List<BussinessTypeEntity> filterAllByUserList(BussinessTypeFilterRequest bussinessTypeFilterRequest); List<BussinessTypeEntity> filterAllByUserList(BussinessTypeFilterRequest bussinessTypeFilterRequest);

@ -1,8 +1,6 @@
package com.glxp.udi.admin.dao.info; package com.glxp.udi.admin.dao.info;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.entity.info.AliKeyEntity;
import com.glxp.udi.admin.entity.info.CompanyEntity; import com.glxp.udi.admin.entity.info.CompanyEntity;
import com.glxp.udi.admin.req.info.FilterCompanyRequest; import com.glxp.udi.admin.req.info.FilterCompanyRequest;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -18,8 +16,6 @@ public interface CompanyDao extends BaseMapper<CompanyEntity> {
CompanyEntity findCompanyByName(String companyName); CompanyEntity findCompanyByName(String companyName);
Page<CompanyEntity> getSubCompany(Page<CompanyEntity> page, FilterCompanyRequest companyRequest);
List<CompanyEntity> filterCompany(FilterCompanyRequest companyRequest); List<CompanyEntity> filterCompany(FilterCompanyRequest companyRequest);
boolean modifyCompany(CompanyEntity companyEntity); boolean modifyCompany(CompanyEntity companyEntity);
@ -28,7 +24,5 @@ public interface CompanyDao extends BaseMapper<CompanyEntity> {
boolean deleteCompany(Long customerId); boolean deleteCompany(Long customerId);
AliKeyEntity findKey(String customerId);
String findCompanyName(@Param("customerId") long customerId); String findCompanyName(@Param("customerId") long customerId);
} }

@ -15,7 +15,7 @@ public interface StockQRCodeTextDao extends BaseMapper<StockQRCodeTextEntity> {
boolean insertStockQRCodeText(StockQRCodeTextEntity stockQRCodeTextEntity); boolean insertStockQRCodeText(StockQRCodeTextEntity stockQRCodeTextEntity);
boolean insertStockQRCodeTexts(@Param("StockQRCodeTextEntities") List<StockQRCodeTextEntity> StockQRCodeTextEntitys); boolean insertStockQRCodeTexts(@Param("stockQRCodeTextEntities") List<StockQRCodeTextEntity> stockQRCodeTextEntities);
boolean deleteByOrderId(@Param("id") String id); boolean deleteByOrderId(@Param("id") String id);

@ -1,6 +1,7 @@
package com.glxp.udi.admin.dao.inout; package com.glxp.udi.admin.dao.inout;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.entity.inout.UdiRelevanceEntity; import com.glxp.udi.admin.entity.inout.UdiRelevanceEntity;
import com.glxp.udi.admin.req.inout.FilterUdiInfoRequest; import com.glxp.udi.admin.req.inout.FilterUdiInfoRequest;
@ -13,7 +14,18 @@ import java.util.List;
@Mapper @Mapper
public interface UdiRelevanceDao extends BaseMapper<UdiRelevanceEntity> { public interface UdiRelevanceDao extends BaseMapper<UdiRelevanceEntity> {
Page<UdiRelevanceResponse> filterUdiRelevance(Page<UdiRelevanceResponse> page, FilterUdiInfoRequest filterUdiInfoRequest); /**
* UDI
*
* @param page
* @param ylqxzcrbarmc
* @param cpmctymc
* @param nameCode DI
* @param thirdId ID
* @param uuid uuid
* @return
*/
Page<UdiRelevanceResponse> filterUdiRelevance(@Param("page") IPage<UdiRelevanceResponse> page, @Param("ylqxzcrbarmc") String ylqxzcrbarmc, @Param("cpmctymc") String cpmctymc, @Param("nameCode") String nameCode, @Param("thirdId") String thirdId, @Param("uuid") String uuid);
List<UdiRelevanceResponse> filterUdiGp(FilterUdiInfoRequest filterUdiInfoRequest); List<UdiRelevanceResponse> filterUdiGp(FilterUdiInfoRequest filterUdiInfoRequest);

@ -2,7 +2,6 @@ package com.glxp.udi.admin.dao.inout;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.entity.inout.UnitMaintainEntity; import com.glxp.udi.admin.entity.inout.UnitMaintainEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -27,11 +26,12 @@ public interface UnitMaintainDao extends BaseMapper<UnitMaintainEntity> {
/** /**
* *
*
* @param page * @param page
* @param customerId * @param customerId
* @return * @return
*/ */
Page<UnitMaintainEntity> getUnbindUnitMaintain(Page<UnitMaintainEntity> page, String customerId); IPage<UnitMaintainEntity> getUnbindUnitMaintain(IPage<UnitMaintainEntity> page, @Param("customerId") String customerId);
/** /**
* ID * ID
@ -74,5 +74,5 @@ public interface UnitMaintainDao extends BaseMapper<UnitMaintainEntity> {
*/ */
int countByName(@Param("name") String name, @Param("customerId") String customerId); int countByName(@Param("name") String name, @Param("customerId") String customerId);
IPage<UnitMaintainEntity> filterList(IPage<UnitMaintainEntity> page, String key, String customerId, Integer corpType); IPage<UnitMaintainEntity> filterList(@Param("page") IPage<UnitMaintainEntity> page, @Param("key") String key, @Param("customerId") String customerId, @Param("corpType") Integer corpType);
} }

@ -1,7 +1,6 @@
package com.glxp.udi.admin.dao.inventory; package com.glxp.udi.admin.dao.inventory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.glxp.udi.admin.entity.inventory.InvWarehouseEntity; import com.glxp.udi.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.udi.admin.req.inventory.FilterInvWarehouseRequest; import com.glxp.udi.admin.req.inventory.FilterInvWarehouseRequest;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -12,8 +11,6 @@ import java.util.List;
@Mapper @Mapper
public interface InvWarehouseDao extends BaseMapper<InvWarehouseEntity> { public interface InvWarehouseDao extends BaseMapper<InvWarehouseEntity> {
IPage<InvWarehouseEntity> filterInvWarehouse(@Param("page") IPage<InvWarehouseEntity> page, @Param("request") FilterInvWarehouseRequest request);
List<InvWarehouseEntity> filterAllByUser(FilterInvWarehouseRequest filterInvWarehouseRequest); List<InvWarehouseEntity> filterAllByUser(FilterInvWarehouseRequest filterInvWarehouseRequest);
InvWarehouseEntity selectMaxCode(FilterInvWarehouseRequest filterInvWarehouseRequest); InvWarehouseEntity selectMaxCode(FilterInvWarehouseRequest filterInvWarehouseRequest);

@ -1,17 +1,13 @@
package com.glxp.udi.admin.dao.inventory; package com.glxp.udi.admin.dao.inventory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.entity.inventory.StockPrintTempEntity; import com.glxp.udi.admin.entity.inventory.StockPrintTempEntity;
import com.glxp.udi.admin.req.inventory.DeleteStPrintTempRequest; import com.glxp.udi.admin.req.inventory.DeleteStPrintTempRequest;
import com.glxp.udi.admin.req.inventory.FilterStPrintTempRequest;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface StockPrintTempDao extends BaseMapper<StockPrintTempEntity> { public interface StockPrintTempDao extends BaseMapper<StockPrintTempEntity> {
Page<StockPrintTempEntity> filterStockPrintTempEntity(Page<StockPrintTempEntity> page, FilterStPrintTempRequest filterStockprintRequest);
boolean delete(DeleteStPrintTempRequest deleteStPrintTempRequest); boolean delete(DeleteStPrintTempRequest deleteStPrintTempRequest);
boolean insertStockPrintTempEntity(StockPrintTempEntity stockPrintEntity); boolean insertStockPrintTempEntity(StockPrintTempEntity stockPrintEntity);

@ -3,15 +3,12 @@ package com.glxp.udi.admin.dao.param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.entity.param.SystemPDFModuleEntity; import com.glxp.udi.admin.entity.param.SystemPDFModuleEntity;
import com.glxp.udi.admin.req.param.SystemPDFModuleRequest;
import com.glxp.udi.admin.req.param.SystemPDFModuleSaveRequest; import com.glxp.udi.admin.req.param.SystemPDFModuleSaveRequest;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface SystemPDFModuleDao extends BaseMapper<SystemPDFModuleEntity> { public interface SystemPDFModuleDao extends BaseMapper<SystemPDFModuleEntity> {
Page<SystemPDFModuleEntity> queryPage(Page<SystemPDFModuleEntity> page, SystemPDFModuleRequest systemPDFModuleRequest);
Page<SystemPDFModuleEntity> listPDFModules(Page<SystemPDFModuleEntity> page); Page<SystemPDFModuleEntity> listPDFModules(Page<SystemPDFModuleEntity> page);
boolean updateById(SystemPDFModuleSaveRequest systemPDFModuleSaveRequest); boolean updateById(SystemPDFModuleSaveRequest systemPDFModuleSaveRequest);

@ -90,11 +90,11 @@ public class AuthRoleService {
return authRoleDao.updateAuthRole(authRole); return authRoleDao.updateAuthRole(authRole);
} }
public Page<AuthRole> listCustomerRoles(Integer page, Integer limit, Integer isCustomer) { public IPage<AuthRole> listCustomerRoles(Integer page, Integer limit, Integer isCustomer) {
if (null == page || null == limit) { if (null == page || null == limit) {
return new Page<>(); return new Page<>();
} }
Page<AuthRole> pageParam = new Page<>(page, limit); IPage<AuthRole> pageParam = new Page<>(page, limit);
return authRoleDao.listCustomerRoles(pageParam, isCustomer); return authRoleDao.listCustomerRoles(pageParam, isCustomer);
} }

@ -24,7 +24,9 @@ public class CustomerContactService {
return new Page<>(); return new Page<>();
} }
Page<CustomerContactEntity> page = new Page<>(customerContactFilterRequest.getPage(), customerContactFilterRequest.getLimit()); Page<CustomerContactEntity> page = new Page<>(customerContactFilterRequest.getPage(), customerContactFilterRequest.getLimit());
return customerContacDao.filterCustomerContact(page,customerContactFilterRequest); QueryWrapper<CustomerContactEntity> wrapper = new QueryWrapper<>();
wrapper.eq(null != customerContactFilterRequest.getCustomerId(),"customerId", customerContactFilterRequest.getCustomerId());
return customerContacDao.selectPage(page, wrapper);
} }
public boolean insertCustomerContact(CustomerContactEntity customerContactEntity) { public boolean insertCustomerContact(CustomerContactEntity customerContactEntity) {

@ -53,12 +53,13 @@ public class UserRegisterService {
} }
public boolean isExit(String phoneNum) { public boolean isExit(String phoneNum) {
String data = userRegisterDao.isExit(phoneNum); QueryWrapper<UserRegisterEntity> countWrapper = new QueryWrapper<>();
if (data != null) { countWrapper.eq("mobile", phoneNum);
Long count = userRegisterDao.selectCount(countWrapper);
if (count > 0) {
return true; return true;
} else {
return false;
} }
return false;
} }
public boolean deleteByCustomerId(Long id) { public boolean deleteByCustomerId(Long id) {

@ -1,5 +1,6 @@
package com.glxp.udi.admin.service.info; package com.glxp.udi.admin.service.info;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -30,7 +31,14 @@ public class CompanyService {
return new Page<>(); return new Page<>();
} }
Page<CompanyEntity> page = new Page<>(commitRequest.getPage(), commitRequest.getLimit()); Page<CompanyEntity> page = new Page<>(commitRequest.getPage(), commitRequest.getLimit());
return companyDao.getSubCompany(page, commitRequest); QueryWrapper<CompanyEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StrUtil.isNotBlank(commitRequest.getCustomerId()), "customerId", commitRequest.getCustomerId())
.like(StrUtil.isNotBlank(commitRequest.getCompanyName()), "companyName", commitRequest.getCompanyName())
.like(StrUtil.isNotBlank(commitRequest.getCreditNum()), "creditNum", commitRequest.getCreditNum())
.eq(StrUtil.isNotBlank(commitRequest.getAuditStatus()), "auditStatus", commitRequest.getAuditStatus())
.eq(StrUtil.isNotBlank(commitRequest.getUnitIdFk()), "unitIdFk", commitRequest.getUnitIdFk())
.in(StrUtil.isBlank(commitRequest.getAuditStatus()) && CollUtil.isNotEmpty(commitRequest.getAuditStatusList()), "auditStatus", commitRequest.getAuditStatusList());
return companyDao.selectPage(page, wrapper);
} }
public boolean modifyCompany(CompanyEntity companyEntity) { public boolean modifyCompany(CompanyEntity companyEntity) {

@ -1,5 +1,6 @@
package com.glxp.udi.admin.service.inout; package com.glxp.udi.admin.service.inout;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.constant.ConstantStatus; import com.glxp.udi.admin.constant.ConstantStatus;
import com.glxp.udi.admin.dao.inout.UdiRelevanceDao; import com.glxp.udi.admin.dao.inout.UdiRelevanceDao;
@ -23,15 +24,15 @@ public class UdiRelevanceService {
@Resource @Resource
private UdiRelevanceDao udiRelevanceDao; private UdiRelevanceDao udiRelevanceDao;
public Page<UdiRelevanceResponse> filterUdiRelevance(FilterUdiInfoRequest filterUdiInfoRequest) { public IPage<UdiRelevanceResponse> filterUdiRelevance(FilterUdiInfoRequest filterUdiInfoRequest) {
if (filterUdiInfoRequest == null) { if (filterUdiInfoRequest == null) {
return new Page<>(); return new Page<>();
} }
Page<UdiRelevanceResponse> page = new Page<>(-1, -1); IPage<UdiRelevanceResponse> page = new Page<>(-1, -1);
if (null != filterUdiInfoRequest.getPage() && null != filterUdiInfoRequest.getLimit()) { if (null != filterUdiInfoRequest.getPage() && null != filterUdiInfoRequest.getLimit()) {
new Page<>(filterUdiInfoRequest.getPage(), filterUdiInfoRequest.getLimit()); new Page<>(filterUdiInfoRequest.getPage(), filterUdiInfoRequest.getLimit());
} }
return udiRelevanceDao.filterUdiRelevance(page,filterUdiInfoRequest); return udiRelevanceDao.filterUdiRelevance(page, filterUdiInfoRequest.getYlqxzcrbarmc(), filterUdiInfoRequest.getCpmctymc(), filterUdiInfoRequest.getNameCode(), filterUdiInfoRequest.getThirdId(), filterUdiInfoRequest.getUuid());
} }
public UdiRelevanceEntity selectById(String id) { public UdiRelevanceEntity selectById(String id) {
@ -56,7 +57,7 @@ public class UdiRelevanceService {
public UdiRelevanceResponse selectByNameCode(String nameCode) { public UdiRelevanceResponse selectByNameCode(String nameCode) {
FilterUdiInfoRequest filterUdiInfoRequest = new FilterUdiInfoRequest(); FilterUdiInfoRequest filterUdiInfoRequest = new FilterUdiInfoRequest();
filterUdiInfoRequest.setUniqueNameCode(nameCode); filterUdiInfoRequest.setUniqueNameCode(nameCode);
Page<UdiRelevanceResponse> page = filterUdiRelevance(filterUdiInfoRequest); IPage<UdiRelevanceResponse> page = filterUdiRelevance(filterUdiInfoRequest);
if (page.getTotal() > 0) { if (page.getTotal() > 0) {
return page.getRecords().get(0); return page.getRecords().get(0);
} }
@ -66,7 +67,7 @@ public class UdiRelevanceService {
public List<UdiRelevanceResponse> selectByMainId(String mainId) { public List<UdiRelevanceResponse> selectByMainId(String mainId) {
FilterUdiInfoRequest filterUdiInfoRequest = new FilterUdiInfoRequest(); FilterUdiInfoRequest filterUdiInfoRequest = new FilterUdiInfoRequest();
filterUdiInfoRequest.setMainId(mainId); filterUdiInfoRequest.setMainId(mainId);
Page<UdiRelevanceResponse> page = filterUdiRelevance(filterUdiInfoRequest); IPage<UdiRelevanceResponse> page = filterUdiRelevance(filterUdiInfoRequest);
return page.getRecords(); return page.getRecords();
} }

@ -59,11 +59,11 @@ public class UnitMaintainService {
return unitMaintainDao.selectByName(name); return unitMaintainDao.selectByName(name);
} }
public Page<UnitMaintainEntity> getUnbindUnitMaintain(UnitMaintainFilterRequest unitMaintainFilterRequest) { public IPage<UnitMaintainEntity> getUnbindUnitMaintain(UnitMaintainFilterRequest unitMaintainFilterRequest) {
if (unitMaintainFilterRequest == null) { if (unitMaintainFilterRequest == null) {
return new Page<>(); return new Page<>();
} }
Page<UnitMaintainEntity> page = new Page<>(unitMaintainFilterRequest.getPage(), unitMaintainFilterRequest.getLimit()); IPage<UnitMaintainEntity> page = new Page<>(unitMaintainFilterRequest.getPage(), unitMaintainFilterRequest.getLimit());
return unitMaintainDao.getUnbindUnitMaintain(page, unitMaintainFilterRequest.getCustomerId()); return unitMaintainDao.getUnbindUnitMaintain(page, unitMaintainFilterRequest.getCustomerId());
} }

@ -1,5 +1,7 @@
package com.glxp.udi.admin.service.inventory; package com.glxp.udi.admin.service.inventory;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.dao.inventory.StockPrintTempDao; import com.glxp.udi.admin.dao.inventory.StockPrintTempDao;
import com.glxp.udi.admin.entity.inventory.StockPrintTempEntity; import com.glxp.udi.admin.entity.inventory.StockPrintTempEntity;
@ -19,16 +21,17 @@ public class StockPrintTempService {
@Resource @Resource
private StockPrintTempDao stockPrintTempDao; private StockPrintTempDao stockPrintTempDao;
public Page<StockPrintTempEntity> filterStockPrintTempEntity(FilterStPrintTempRequest filterStockprintRequest) { public IPage<StockPrintTempEntity> filterStockPrintTempEntity(FilterStPrintTempRequest filterStockprintRequest) {
if (filterStockprintRequest == null) { if (filterStockprintRequest == null) {
return new Page<>(); return new Page<>();
} }
Page<StockPrintTempEntity> page = new Page<>(-1, -1); IPage<StockPrintTempEntity> page = new Page<>(filterStockprintRequest.getPage(), filterStockprintRequest.getLimit());
if (filterStockprintRequest.getPage() != null && null != filterStockprintRequest.getLimit()) { QueryWrapper<StockPrintTempEntity> wrapper = new QueryWrapper<>();
page = new Page<>(filterStockprintRequest.getPage(), filterStockprintRequest.getLimit()); wrapper.eq(null != filterStockprintRequest.getPrintCodeIdFk(), "printCodeIdFk", filterStockprintRequest.getPrintCodeIdFk())
} .eq(null != filterStockprintRequest.getId(), "id", filterStockprintRequest.getId())
return stockPrintTempDao.filterStockPrintTempEntity(page, filterStockprintRequest); .eq(null != filterStockprintRequest.getStockOrderFk(), "stockOrderFk", filterStockprintRequest.getStockOrderFk());
return stockPrintTempDao.selectPage(page, wrapper);
} }
public boolean deleteById(DeleteStPrintTempRequest deleteStPrintTempRequest) { public boolean deleteById(DeleteStPrintTempRequest deleteStPrintTempRequest) {

@ -2,16 +2,15 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.auth.AuthAdminDao"> <mapper namespace="com.glxp.udi.admin.dao.auth.AuthAdminDao">
<select id="findByUserName" parameterType="hashmap" resultType="com.glxp.udi.admin.entity.auth.AuthAdmin"> <select id="findByUserName" parameterType="hashmap" resultType="com.glxp.udi.admin.entity.auth.AuthAdmin">
SELECT * SELECT *
FROM auth_user FROM auth_user
<where> <where>
userName = #{userName} userName = #{userName}
</where> </where>
LIMIT 1 LIMIT 1
</select> </select>
<select id="findCountByCustomerId" parameterType="java.lang.Long" resultType="java.lang.Integer"> <select id="findCountByCustomerId" parameterType="java.lang.Long" resultType="java.lang.Integer">
SELECT count(0) SELECT count(0)
FROM auth_user FROM auth_user
@ -27,7 +26,6 @@
AND CustomerId = #{CustomerId} AND CustomerId = #{CustomerId}
</if> </if>
</where> </where>
LIMIT 1 LIMIT 1
</select> </select>
@ -41,7 +39,8 @@
</select> </select>
<insert id="insertAuthAdmin" keyProperty="id" parameterType="com.glxp.udi.admin.entity.auth.AuthAdmin"> <insert id="insertAuthAdmin" keyProperty="id" parameterType="com.glxp.udi.admin.entity.auth.AuthAdmin">
INSERT INTO auth_user(userName,passWord,lastLoginIp,lastLoginTime,createTime,userFlag,employeeName,CustomerId) INSERT INTO auth_user(userName, passWord, lastLoginIp, lastLoginTime, createTime, userFlag, employeeName,
CustomerId)
values values
(#{userName}, (#{userName},
<choose> <choose>
@ -53,7 +52,6 @@
</otherwise> </otherwise>
</choose> </choose>
<choose> <choose>
<when test="lastLoginIp != null"> <when test="lastLoginIp != null">
#{lastLoginIp}, #{lastLoginIp},
@ -111,13 +109,20 @@
</delete> </delete>
<select id="getUserList" resultType="com.glxp.udi.admin.entity.auth.AuthAdmin"> <select id="getUserList" resultType="com.glxp.udi.admin.entity.auth.AuthAdmin">
select * from auth_user where CustomerId = #{customerId} select *
from auth_user
where CustomerId = #{customerId}
</select> </select>
<select id="selectIdsByCustomerId" resultType="java.lang.Long"> <select id="selectIdsByCustomerId" resultType="java.lang.Long">
select id from auth_user where CustomerId = #{customerId} select id
from auth_user
where CustomerId = #{customerId}
</select> </select>
<select id="findCustomerIdById" resultType="java.lang.String"> <select id="findCustomerIdById" resultType="java.lang.String">
select customerId from auth_user where id = #{userId} select customerId
from auth_user
where id = #{userId}
</select> </select>
</mapper> </mapper>

@ -2,7 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.auth.AuthLicenseDao"> <mapper namespace="com.glxp.udi.admin.dao.auth.AuthLicenseDao">
<delete id="romveByCustomerId"> <delete id="romveByCustomerId">
delete delete
from auth_license from auth_license
@ -10,7 +9,9 @@
</delete> </delete>
<select id="selectLicenseByName" resultType="com.glxp.udi.admin.entity.auth.AuthLicense"> <select id="selectLicenseByName" resultType="com.glxp.udi.admin.entity.auth.AuthLicense">
select apikey, secretkey from auth_license where name = #{name} select apikey, secretkey
from auth_license
where name = #{name}
</select> </select>
<update id="updateLicenseByName"> <update id="updateLicenseByName">

@ -17,7 +17,6 @@
where roleId = #{roleId} where roleId = #{roleId}
</select> </select>
<insert id="insertAuthPermissionAll"> <insert id="insertAuthPermissionAll">
INSERT INTO auth_permission INSERT INTO auth_permission
(roleId, permissionRuleId, `type`) (roleId, permissionRuleId, `type`)
@ -29,8 +28,10 @@
</foreach> </foreach>
</insert> </insert>
<delete id="deleteByRoleId" parameterType="java.lang.Long"> <delete id="deleteByRoleId" parameterType="java.lang.Long">
delete from auth_permission where roleId = #{roleId} delete
from auth_permission
where roleId = #{roleId}
</delete> </delete>
</mapper> </mapper>

@ -36,7 +36,8 @@
<insert id="insertAuthPermissionRule" keyProperty="id" <insert id="insertAuthPermissionRule" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.auth.AuthPermissionRule"> parameterType="com.glxp.udi.admin.entity.auth.AuthPermissionRule">
INSERT INTO auth_permission_rule(pid,`name`,`title`,`status`,`condition`,`listorder`,create_time,update_time) INSERT INTO auth_permission_rule(pid, `name`, `title`, `status`, `condition`, `listorder`, create_time,
update_time)
values values
(#{pid}, (#{pid},
#{name}, #{name},

@ -9,7 +9,9 @@
</select> </select>
<select id="listAdminRole" resultType="com.glxp.udi.admin.entity.auth.AuthRole"> <select id="listAdminRole" resultType="com.glxp.udi.admin.entity.auth.AuthRole">
select * from auth_role INNER JOIN auth_role_admin on auth_role.id = auth_role_admin.role_id select *
from auth_role
INNER JOIN auth_role_admin on auth_role.id = auth_role_admin.role_id
WHERE auth_role_admin.admin_id = #{adminId}; WHERE auth_role_admin.admin_id = #{adminId};
</select> </select>
@ -40,7 +42,9 @@
</insert> </insert>
<delete id="deleteByAdminId" parameterType="java.lang.Long"> <delete id="deleteByAdminId" parameterType="java.lang.Long">
delete from auth_role_admin where admin_id = #{adminId} delete
from auth_role_admin
where admin_id = #{adminId}
</delete> </delete>
<select id="selectIsCustomer" resultType="java.lang.Integer"> <select id="selectIsCustomer" resultType="java.lang.Integer">
@ -48,11 +52,17 @@
from auth_role from auth_role
where id = (select role_id from auth_role_admin where admin_id = #{adminId} limit 1) where id = (select role_id from auth_role_admin where admin_id = #{adminId} limit 1)
</select> </select>
<select id="findNameById" resultType="java.lang.String"> <select id="findNameById" resultType="java.lang.String">
select name from auth_role where id = #{roleId} select name
from auth_role
where id = #{roleId}
</select> </select>
<update id="updateRoleIdByAdminId"> <update id="updateRoleIdByAdminId">
update auth_role_admin set role_id = #{roleId} where admin_id = #{adminId} update auth_role_admin
set role_id = #{roleId}
where admin_id = #{adminId}
</update> </update>
</mapper> </mapper>

@ -32,7 +32,6 @@
where `name` = #{name} where `name` = #{name}
</select> </select>
<select id="listCustomerRoles" parameterType="java.lang.Integer" <select id="listCustomerRoles" parameterType="java.lang.Integer"
resultType="com.glxp.udi.admin.entity.auth.AuthRole"> resultType="com.glxp.udi.admin.entity.auth.AuthRole">
SELECT id, name SELECT id, name
@ -40,18 +39,15 @@
where `isCustomer` = #{isCustomer} where `isCustomer` = #{isCustomer}
</select> </select>
<select id="listAuthRoles2" parameterType="java.lang.Integer" resultType="com.glxp.udi.admin.entity.auth.AuthRole"> <select id="listAuthRoles2" parameterType="java.lang.Integer" resultType="com.glxp.udi.admin.entity.auth.AuthRole">
SELECT id, name SELECT id, name
FROM auth_role FROM auth_role
</select> </select>
<insert id="insertAuthRole" keyProperty="id" parameterType="com.glxp.udi.admin.entity.auth.AuthRole"> <insert id="insertAuthRole" keyProperty="id" parameterType="com.glxp.udi.admin.entity.auth.AuthRole">
INSERT INTO auth_role(`name`, pid, `status`, `remark`, `listorder`, create_time, update_time, isCustomer) INSERT INTO auth_role(`name`, pid, `status`, `remark`, `listorder`, create_time, update_time, isCustomer)
values values
( (#{name},
#{name},
<choose> <choose>
<when test="pid != null"> <when test="pid != null">
#{pid}, #{pid},
@ -79,8 +75,7 @@
</choose> </choose>
#{createTime}, #{createTime},
#{updateTime}, #{updateTime},
#{isCustomer} #{isCustomer})
)
</insert> </insert>
<update id="updateAuthRole" parameterType="com.glxp.udi.admin.entity.auth.AuthRole"> <update id="updateAuthRole" parameterType="com.glxp.udi.admin.entity.auth.AuthRole">
@ -110,5 +105,4 @@
</set> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
</mapper> </mapper>

@ -2,32 +2,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.auth.CustomerContacDao"> <mapper namespace="com.glxp.udi.admin.dao.auth.CustomerContacDao">
<select id="filterCustomerContact" parameterType="com.glxp.udi.admin.req.auth.CustomerContactFilterRequest"
resultType="com.glxp.udi.admin.entity.auth.CustomerContactEntity">
SELECT *
FROM customer_contact
<where>
<if test="customerId != null and '' != customerId">
AND customerId = #{customerId}
</if>
</where>
</select>
<insert id="insertCustomerContact" keyProperty="customerId" <insert id="insertCustomerContact" keyProperty="customerId"
parameterType="com.glxp.udi.admin.entity.auth.CustomerInfoEntity"> parameterType="com.glxp.udi.admin.entity.auth.CustomerInfoEntity">
INSERT INTO customer_contact INSERT INTO customer_contact
( (customerId, contacts,
customerId, contacts,
mobile, tel, email, mobile, tel, email,
comments comments)
) values (#{customerId}, #{contacts},
values
(
#{customerId},#{contacts},
#{mobile}, #{tel}, #{email}, #{mobile}, #{tel}, #{email},
#{comments} #{comments})
)
</insert> </insert>
<update id="updateCustomerContact" parameterType="com.glxp.udi.admin.entity.auth.CustomerContactEntity"> <update id="updateCustomerContact" parameterType="com.glxp.udi.admin.entity.auth.CustomerContactEntity">
@ -51,5 +35,4 @@
</set> </set>
WHERE customerId = #{customerId} WHERE customerId = #{customerId}
</update> </update>
</mapper> </mapper>

@ -2,13 +2,24 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.auth.CustomerInfoDao"> <mapper namespace="com.glxp.udi.admin.dao.auth.CustomerInfoDao">
<select id="filterDetailCustomerInfo" parameterType="com.glxp.udi.admin.req.auth.CustomerInfoFilterRequest" <select id="filterDetailCustomerInfo" parameterType="com.glxp.udi.admin.req.auth.CustomerInfoFilterRequest"
resultType="com.glxp.udi.admin.entity.auth.CustomerDetailEntity"> resultType="com.glxp.udi.admin.entity.auth.CustomerDetailEntity">
SELECT customer_info.customerId,customer_info.customerName, SELECT customer_info.customerId,
customer_info.creditNum,customer_info.area,customer_info.detailAddr, customer_info.customerName,
customer_info.bussinessStatus,customer_info.isInfoLink,customer_info.infoLink,customer_info.roleId,customer_info.userFlag, customer_info.creditNum,
customer_contact.contacts,customer_contact.mobile,customer_info.userMax,customer_contact.email,customer_contact.tel,customer_info.companyName customer_info.area,
customer_info.detailAddr,
customer_info.bussinessStatus,
customer_info.isInfoLink,
customer_info.infoLink,
customer_info.roleId,
customer_info.userFlag,
customer_contact.contacts,
customer_contact.mobile,
customer_info.userMax,
customer_contact.email,
customer_contact.tel,
customer_info.companyName
FROM customer_info FROM customer_info
INNER JOIN customer_contact on customer_info.customerId = customer_contact.customerId INNER JOIN customer_contact on customer_info.customerId = customer_contact.customerId
<where> <where>
@ -111,7 +122,6 @@
WHERE customerId = #{customerId} WHERE customerId = #{customerId}
</update> </update>
<delete id="deleteById" parameterType="java.lang.Long"> <delete id="deleteById" parameterType="java.lang.Long">
delete delete
from customer_info from customer_info
@ -119,6 +129,8 @@
</delete> </delete>
<select id="selectCustomerIdByCustomerName" resultType="java.lang.String"> <select id="selectCustomerIdByCustomerName" resultType="java.lang.String">
select customerId from customer_info where companyName like concat('%',#{customerName},'%') select customerId
from customer_info
where companyName like concat('%', #{customerName}, '%')
</select> </select>
</mapper> </mapper>

@ -2,11 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.auth.DeviceKeyDao"> <mapper namespace="com.glxp.udi.admin.dao.auth.DeviceKeyDao">
<select id="findDeviceKey" parameterType="com.glxp.udi.admin.req.info.FilterDeviceKeyRequest" <select id="findDeviceKey" parameterType="com.glxp.udi.admin.req.info.FilterDeviceKeyRequest"
resultType="com.glxp.udi.admin.entity.info.DeviceKeyEntity"> resultType="com.glxp.udi.admin.entity.info.DeviceKeyEntity">
SELECT * FROM device_check SELECT *
FROM device_check
<where> <where>
<if test="imei != null and imei != ''"> <if test="imei != null and imei != ''">
and imei = #{imei} and imei = #{imei}
@ -19,7 +18,8 @@
<select id="findDeviceByImei" parameterType="com.glxp.udi.admin.req.info.FilterDeviceKeyRequest" <select id="findDeviceByImei" parameterType="com.glxp.udi.admin.req.info.FilterDeviceKeyRequest"
resultType="com.glxp.udi.admin.entity.info.DeviceKeyEntity"> resultType="com.glxp.udi.admin.entity.info.DeviceKeyEntity">
SELECT * FROM device_check SELECT *
FROM device_check
<where> <where>
<if test="imei != null and imei != ''"> <if test="imei != null and imei != ''">
and imei = #{imei} and imei = #{imei}
@ -31,17 +31,39 @@
<update id="updateDeviceKey" parameterType="com.glxp.udi.admin.entity.info.DeviceKeyEntity"> <update id="updateDeviceKey" parameterType="com.glxp.udi.admin.entity.info.DeviceKeyEntity">
UPDATE device_check UPDATE device_check
<set> <set>
<if test="isCheck != null">isCheck=#{isCheck},</if> <if test="isCheck != null">
<if test="companyName != null">companyName=#{companyName},</if> isCheck=#{isCheck},
<if test="phone != null">phone=#{phone},</if> </if>
<if test="contact != null">contact=#{contact},</if> <if test="companyName != null">
<if test="imeiKey != null">imeiKey=#{imeiKey},</if> companyName=#{companyName},
<if test="date != null">date=#{date},</if> </if>
<if test="creditNum != null">creditNum=#{creditNum},</if> <if test="phone != null">
<if test="rgType != null">rgType=#{rgType},</if> phone=#{phone},
<if test="remark != null">remark=#{remark},</if> </if>
<if test="customerId != null and customerId != ''">customerId=#{customerId},</if> <if test="contact != null">
<if test="applicant != null and applicant != ''">applicant=#{applicant},</if> contact=#{contact},
</if>
<if test="imeiKey != null">
imeiKey=#{imeiKey},
</if>
<if test="date != null">
date=#{date},
</if>
<if test="creditNum != null">
creditNum=#{creditNum},
</if>
<if test="rgType != null">
rgType=#{rgType},
</if>
<if test="remark != null">
remark=#{remark},
</if>
<if test="customerId != null and customerId != ''">
customerId=#{customerId},
</if>
<if test="applicant != null and applicant != ''">
applicant=#{applicant},
</if>
</set> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
@ -49,44 +71,67 @@
<update id="updateDeviceKeyByImei" parameterType="com.glxp.udi.admin.entity.info.DeviceKeyEntity"> <update id="updateDeviceKeyByImei" parameterType="com.glxp.udi.admin.entity.info.DeviceKeyEntity">
UPDATE device_check UPDATE device_check
<set> <set>
<if test="isCheck != null">isCheck=#{isCheck},</if> <if test="isCheck != null">
<if test="companyName != null">companyName=#{companyName},</if> isCheck=#{isCheck},
<if test="phone != null">phone=#{phone},</if> </if>
<if test="contact != null">contact=#{contact},</if> <if test="companyName != null">
<if test="imeiKey != null">imeiKey=#{imeiKey},</if> companyName=#{companyName},
<if test="date != null">date=#{date},</if> </if>
<if test="imei != null">imei=#{imei},</if> <if test="phone != null">
<if test="creditNum != null">creditNum=#{creditNum},</if> phone=#{phone},
<if test="rgType != null">rgType=#{rgType},</if> </if>
<if test="remark != null">remark=#{remark},</if> <if test="contact != null">
<if test="customerId != null and customerId != ''">customerId=#{customerId}</if> contact=#{contact},
<if test="applicant != null and applicant != ''">applicant=#{applicant}</if> </if>
<if test="imeiKey != null">
imeiKey=#{imeiKey},
</if>
<if test="date != null">
date=#{date},
</if>
<if test="imei != null">
imei=#{imei},
</if>
<if test="creditNum != null">
creditNum=#{creditNum},
</if>
<if test="rgType != null">
rgType=#{rgType},
</if>
<if test="remark != null">
remark=#{remark},
</if>
<if test="customerId != null and customerId != ''">
customerId=#{customerId}
</if>
<if test="applicant != null and applicant != ''">
applicant=#{applicant}
</if>
</set> </set>
WHERE imei=#{imei} WHERE imei=#{imei}
</update> </update>
<insert id="insertDeviceKey" parameterType="com.glxp.udi.admin.entity.info.DeviceKeyEntity"> <insert id="insertDeviceKey" parameterType="com.glxp.udi.admin.entity.info.DeviceKeyEntity">
replace INTO device_check( replace INTO device_check(imei,
imei,
isCheck, isCheck,
companyName, companyName,
phone, phone,
contact, contact,
date, date,
imeiKey,creditNum,rgType,remark,customerId,applicant) values imeiKey, creditNum, rgType, remark, customerId, applicant)
( values (#{imei},
#{imei},
#{isCheck}, #{isCheck},
#{companyName}, #{companyName},
#{phone}, #{phone},
#{contact}, #{contact},
#{date}, #{date},
#{imeiKey}, #{creditNum}, #{rgType}, #{remark}, #{customerId}, #{imeiKey}, #{creditNum}, #{rgType}, #{remark}, #{customerId},
#{applicant} #{applicant})
)
</insert> </insert>
<delete id="deleteDeviceKey" parameterType="Map"> <delete id="deleteDeviceKey" parameterType="Map">
DELETE FROM device_check WHERE id = #{id} DELETE
FROM device_check
WHERE id = #{id}
</delete> </delete>
<select id="findDeviceKeyByCustomerId" resultType="com.glxp.udi.admin.res.info.DeviceKeyResponse"> <select id="findDeviceKeyByCustomerId" resultType="com.glxp.udi.admin.res.info.DeviceKeyResponse">

@ -2,7 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.auth.UserRegisterDao"> <mapper namespace="com.glxp.udi.admin.dao.auth.UserRegisterDao">
<insert id="insertUserRegister" keyProperty="id" parameterType="com.glxp.udi.admin.entity.auth.UserRegisterEntity"> <insert id="insertUserRegister" keyProperty="id" parameterType="com.glxp.udi.admin.entity.auth.UserRegisterEntity">
INSERT INTO user_register INSERT INTO user_register
(nickName, password, realName, (nickName, password, realName,
@ -102,10 +101,4 @@
WHERE userId = #{userId} WHERE userId = #{userId}
</select> </select>
<select id="isExit" parameterType="java.lang.String" resultType="java.lang.String">
SELECT 1
FROM user_register
WHERE (
mobile = #{phoneNum}) limit 1
</select>
</mapper> </mapper>

@ -2,22 +2,41 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.basic.BussinessTypeDao"> <mapper namespace="com.glxp.udi.admin.dao.basic.BussinessTypeDao">
<select id="filterAllByUser" parameterType="com.glxp.udi.admin.req.basic.BussinessTypeFilterRequest" <select id="filterAllByUser" parameterType="com.glxp.udi.admin.req.basic.BussinessTypeFilterRequest"
resultType="com.glxp.udi.admin.entity.basic.BussinessTypeEntity"> resultType="com.glxp.udi.admin.entity.basic.BussinessTypeEntity">
SELECT SELECT basic_bussiness_type.id,
basic_bussiness_type.id,basic_bussiness_type.action,basic_bussiness_type.name, basic_bussiness_type.action,
basic_bussiness_type.enable,basic_bussiness_type.remark,basic_bussiness_type.mainAction, basic_bussiness_type.name,
basic_bussiness_type.thirdSysFk,basic_bussiness_type.localAction,basic_bussiness_type.secCheckEnable, basic_bussiness_type.enable,
basic_bussiness_type.checkUdims,basic_bussiness_type.checkPdaEd,basic_bussiness_type.checkPdaUn,basic_bussiness_type.checkPc, basic_bussiness_type.remark,
basic_bussiness_type.checkWebNew,basic_bussiness_type.checkChange, basic_bussiness_type.mainAction,
basic_bussiness_type.secCheckUdims, basic_bussiness_type.secCheckPdaEd, basic_bussiness_type.secCheckPdaUn, basic_bussiness_type.thirdSysFk,
basic_bussiness_type.secCheckWebNew, basic_bussiness_type.secCheckChange, basic_bussiness_type.localAction,
basic_bussiness_type.checkEnable, basic_bussiness_type.genUnit,basic_bussiness_type.innerOrder, basic_bussiness_type.secCheckEnable,
corpType,basic_bussiness_type.storageCode,basic_bussiness_type.checkBalacne,defaultUnit,prefix, basic_bussiness_type.checkUdims,
basic_bussiness_type.secCheckBalacne, basic_bussiness_type.supplementOrderType basic_bussiness_type.checkPdaEd,
basic_bussiness_type.checkPdaUn,
basic_bussiness_type.checkPc,
basic_bussiness_type.checkWebNew,
basic_bussiness_type.checkChange,
basic_bussiness_type.secCheckUdims,
basic_bussiness_type.secCheckPdaEd,
basic_bussiness_type.secCheckPdaUn,
basic_bussiness_type.secCheckWebNew,
basic_bussiness_type.secCheckChange,
basic_bussiness_type.checkEnable,
basic_bussiness_type.genUnit,
basic_bussiness_type.innerOrder,
corpType,
basic_bussiness_type.storageCode,
basic_bussiness_type.checkBalacne,
defaultUnit,
prefix,
basic_bussiness_type.secCheckBalacne,
basic_bussiness_type.supplementOrderType
FROM basic_bussiness_type FROM basic_bussiness_type
INNER JOIN inv_warehouse_bussiness_type on basic_bussiness_type.action = inv_warehouse_bussiness_type.action INNER JOIN inv_warehouse_bussiness_type
on basic_bussiness_type.action = inv_warehouse_bussiness_type.action
INNER JOIN inv_warehouse on inv_warehouse_bussiness_type.`code` = inv_warehouse.`code` INNER JOIN inv_warehouse on inv_warehouse_bussiness_type.`code` = inv_warehouse.`code`
INNER JOIN inv_warehouse_user on inv_warehouse.`code` = inv_warehouse_user.`code` INNER JOIN inv_warehouse_user on inv_warehouse.`code` = inv_warehouse_user.`code`
<where> <where>
@ -45,19 +64,39 @@
<select id="filterAllByUserList" parameterType="com.glxp.udi.admin.req.basic.BussinessTypeFilterRequest" <select id="filterAllByUserList" parameterType="com.glxp.udi.admin.req.basic.BussinessTypeFilterRequest"
resultType="com.glxp.udi.admin.entity.basic.BussinessTypeEntity"> resultType="com.glxp.udi.admin.entity.basic.BussinessTypeEntity">
SELECT SELECT basic_bussiness_type.id,
basic_bussiness_type.id,basic_bussiness_type.action,basic_bussiness_type.name, basic_bussiness_type.action,
basic_bussiness_type.enable,basic_bussiness_type.remark,basic_bussiness_type.mainAction, basic_bussiness_type.name,
basic_bussiness_type.thirdSysFk,basic_bussiness_type.localAction,basic_bussiness_type.secCheckEnable, basic_bussiness_type.enable,
basic_bussiness_type.checkUdims,basic_bussiness_type.checkPdaEd,basic_bussiness_type.checkPdaUn,basic_bussiness_type.checkPc, basic_bussiness_type.remark,
basic_bussiness_type.checkWebNew,basic_bussiness_type.checkChange, basic_bussiness_type.mainAction,
basic_bussiness_type.secCheckUdims, basic_bussiness_type.secCheckPdaEd, basic_bussiness_type.secCheckPdaUn, basic_bussiness_type.thirdSysFk,
basic_bussiness_type.secCheckWebNew, basic_bussiness_type.secCheckChange, basic_bussiness_type.localAction,
basic_bussiness_type.checkEnable, basic_bussiness_type.genUnit,basic_bussiness_type.innerOrder, basic_bussiness_type.secCheckEnable,
corpType,basic_bussiness_type.storageCode,basic_bussiness_type.checkBalacne,defaultUnit,prefix, basic_bussiness_type.checkUdims,
basic_bussiness_type.secCheckBalacne, basic_bussiness_type.supplementOrderType basic_bussiness_type.checkPdaEd,
basic_bussiness_type.checkPdaUn,
basic_bussiness_type.checkPc,
basic_bussiness_type.checkWebNew,
basic_bussiness_type.checkChange,
basic_bussiness_type.secCheckUdims,
basic_bussiness_type.secCheckPdaEd,
basic_bussiness_type.secCheckPdaUn,
basic_bussiness_type.secCheckWebNew,
basic_bussiness_type.secCheckChange,
basic_bussiness_type.checkEnable,
basic_bussiness_type.genUnit,
basic_bussiness_type.innerOrder,
corpType,
basic_bussiness_type.storageCode,
basic_bussiness_type.checkBalacne,
defaultUnit,
prefix,
basic_bussiness_type.secCheckBalacne,
basic_bussiness_type.supplementOrderType
FROM basic_bussiness_type FROM basic_bussiness_type
INNER JOIN inv_warehouse_bussiness_type on basic_bussiness_type.action = inv_warehouse_bussiness_type.action INNER JOIN inv_warehouse_bussiness_type
on basic_bussiness_type.action = inv_warehouse_bussiness_type.action
INNER JOIN inv_warehouse on inv_warehouse_bussiness_type.`code` = inv_warehouse.`code` INNER JOIN inv_warehouse on inv_warehouse_bussiness_type.`code` = inv_warehouse.`code`
INNER JOIN inv_warehouse_user on inv_warehouse.`code` = inv_warehouse_user.`code` INNER JOIN inv_warehouse_user on inv_warehouse.`code` = inv_warehouse_user.`code`
<where> <where>
@ -83,7 +122,6 @@
group by basic_bussiness_type.action group by basic_bussiness_type.action
</select> </select>
<insert id="insertBussinessType" keyProperty="id" <insert id="insertBussinessType" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.basic.BussinessTypeEntity"> parameterType="com.glxp.udi.admin.entity.basic.BussinessTypeEntity">
replace replace
@ -94,9 +132,7 @@
, secCheckUdims, secCheckPdaEd, secCheckPdaUn, secCheckPc, secCheckWebNew, , secCheckUdims, secCheckPdaEd, secCheckPdaUn, secCheckPc, secCheckWebNew,
secCheckChange, corpType, basic_bussiness_type.storageCode, checkBalacne, secCheckChange, corpType, basic_bussiness_type.storageCode, checkBalacne,
secCheckBalacne, supplementOrderType, defaultUnit, customerId, prefix) secCheckBalacne, supplementOrderType, defaultUnit, customerId, prefix)
values values (#{action},
(
#{action},
#{name}, #{name},
#{enable}, #{enable},
#{remark}, #{remark},
@ -126,8 +162,7 @@
#{supplementOrderType}, #{supplementOrderType},
#{defaultUnit}, #{defaultUnit},
#{customerId}, #{customerId},
#{prefix} #{prefix})
)
</insert> </insert>
<insert id="insertIgnoreBussinessType" keyProperty="id" <insert id="insertIgnoreBussinessType" keyProperty="id"
@ -139,10 +174,8 @@
checkEnable, genUnit, innerOrder, secCheckEnable, checkEnable, genUnit, innerOrder, secCheckEnable,
checkUdims, checkPdaEd, checkPdaUn, checkPc, checkWebNew, checkChange checkUdims, checkPdaEd, checkPdaUn, checkPc, checkWebNew, checkChange
, secCheckUdims, secCheckPdaEd, secCheckPdaUn, secCheckPc, secCheckWebNew, , secCheckUdims, secCheckPdaEd, secCheckPdaUn, secCheckPc, secCheckWebNew,
secCheckChange,corpType,storageCode,checkBalacne,secCheckBalacne,supplementOrderType,defaultUnit,prefix) secCheckChange, corpType, storageCode, checkBalacne, supplementOrderType, defaultUnit, prefix)
values values (#{index},
(
#{index},
#{action}, #{action},
#{name}, #{name},
#{enable}, #{enable},
@ -169,48 +202,107 @@
#{corpType}, #{corpType},
#{storageCode}, #{storageCode},
#{checkBalacne}, #{checkBalacne},
#{secCheckBalacnesecCheckBalacne},
#{supplementOrderType}, #{supplementOrderType},
#{defaultUnit}, #{defaultUnit},
#{prefix} #{prefix})
)
</insert> </insert>
<update id="updateBussinessType" parameterType="com.glxp.udi.admin.entity.basic.BussinessTypeEntity"> <update id="updateBussinessType" parameterType="com.glxp.udi.admin.entity.basic.BussinessTypeEntity">
UPDATE basic_bussiness_type UPDATE basic_bussiness_type
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="action != null">action = #{action},</if> <if test="action != null">
<if test="name != null">name = #{name},</if> action = #{action},
<if test="enable != null">enable = #{enable},</if> </if>
<if test="remark != null">remark = #{remark},</if> <if test="name != null">
<if test="mainAction != null">mainAction = #{mainAction},</if> name = #{name},
<if test="localAction != null">localAction=#{localAction},</if> </if>
<if test="checkEnable != null">checkEnable=#{checkEnable},</if> <if test="enable != null">
<if test="genUnit != null">genUnit=#{genUnit},</if> enable = #{enable},
<if test="innerOrder != null">innerOrder=#{innerOrder},</if> </if>
<if test="secCheckEnable != null">secCheckEnable=#{secCheckEnable},</if> <if test="remark != null">
<if test="checkUdims != null">checkUdims=#{checkUdims},</if> remark = #{remark},
<if test="checkPdaEd != null">checkPdaEd=#{checkPdaEd},</if> </if>
<if test="checkPdaUn != null">checkPdaUn=#{checkPdaUn},</if> <if test="mainAction != null">
<if test="checkPc != null">checkPc=#{checkPc},</if> mainAction = #{mainAction},
<if test="checkWebNew != null">checkWebNew=#{checkWebNew},</if> </if>
<if test="checkChange != null">checkChange=#{checkChange},</if> <if test="localAction != null">
<if test="secCheckUdims != null">secCheckUdims=#{secCheckUdims},</if> localAction=#{localAction},
<if test="secCheckPdaEd != null">secCheckPdaEd=#{secCheckPdaEd},</if> </if>
<if test="secCheckPdaUn != null">secCheckPdaUn=#{secCheckPdaUn},</if> <if test="checkEnable != null">
<if test="secCheckPc != null">secCheckPc=#{secCheckPc},</if> checkEnable=#{checkEnable},
<if test="secCheckWebNew != null">secCheckWebNew=#{secCheckWebNew},</if> </if>
<if test="secCheckChange != null">secCheckChange=#{secCheckChange},</if> <if test="genUnit != null">
<if test="checkBalacne != null">checkBalacne=#{checkBalacne},</if> genUnit=#{genUnit},
<if test="secCheckBalacne != null">secCheckBalacne=#{secCheckBalacne},</if> </if>
<if test="index != null">index=#{index},</if> <if test="innerOrder != null">
<if test="corpType != null">corpType=#{corpType},</if> innerOrder=#{innerOrder},
<if test="storageCode != null">storageCode=#{storageCode},</if> </if>
<if test="supplementOrderType != null">supplementOrderType=#{supplementOrderType},</if> <if test="secCheckEnable != null">
<if test="defaultUnit != null">defaultUnit=#{defaultUnit},</if> secCheckEnable=#{secCheckEnable},
<if test="customerId != null and customerId != ''">customerId=#{customerId},</if> </if>
<if test="prefix != null and prefix != ''">prefix=#{prefix},</if> <if test="checkUdims != null">
checkUdims=#{checkUdims},
</if>
<if test="checkPdaEd != null">
checkPdaEd=#{checkPdaEd},
</if>
<if test="checkPdaUn != null">
checkPdaUn=#{checkPdaUn},
</if>
<if test="checkPc != null">
checkPc=#{checkPc},
</if>
<if test="checkWebNew != null">
checkWebNew=#{checkWebNew},
</if>
<if test="checkChange != null">
checkChange=#{checkChange},
</if>
<if test="secCheckUdims != null">
secCheckUdims=#{secCheckUdims},
</if>
<if test="secCheckPdaEd != null">
secCheckPdaEd=#{secCheckPdaEd},
</if>
<if test="secCheckPdaUn != null">
secCheckPdaUn=#{secCheckPdaUn},
</if>
<if test="secCheckPc != null">
secCheckPc=#{secCheckPc},
</if>
<if test="secCheckWebNew != null">
secCheckWebNew=#{secCheckWebNew},
</if>
<if test="secCheckChange != null">
secCheckChange=#{secCheckChange},
</if>
<if test="checkBalacne != null">
checkBalacne=#{checkBalacne},
</if>
<if test="secCheckBalacne != null">
secCheckBalacne=#{secCheckBalacne},
</if>
<if test="index != null">
index=#{index},
</if>
<if test="corpType != null">
corpType=#{corpType},
</if>
<if test="storageCode != null">
storageCode=#{storageCode},
</if>
<if test="supplementOrderType != null">
supplementOrderType=#{supplementOrderType},
</if>
<if test="defaultUnit != null">
defaultUnit=#{defaultUnit},
</if>
<if test="customerId != null and customerId != ''">
customerId=#{customerId},
</if>
<if test="prefix != null and prefix != ''">
prefix=#{prefix},
</if>
thirdSysFk=#{thirdSysFk}, thirdSysFk=#{thirdSysFk},
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
@ -260,10 +352,15 @@
</select> </select>
<select id="countByName" resultType="java.lang.Integer"> <select id="countByName" resultType="java.lang.Integer">
select count(*) from basic_bussiness_type where name = #{name} and customerId = #{customerId} select count(*)
from basic_bussiness_type
where name = #{name}
and customerId = #{customerId}
</select> </select>
<select id="selectSupplementTypeByAction" resultType="java.lang.String"> <select id="selectSupplementTypeByAction" resultType="java.lang.String">
select supplementOrderType from basic_bussiness_type where action = #{action} select supplementOrderType
from basic_bussiness_type
where action = #{action}
</select> </select>
</mapper> </mapper>

@ -9,10 +9,10 @@
where customerId = #{CustomerId} where customerId = #{CustomerId}
</select> </select>
<select id="filterCompany" parameterType="com.glxp.udi.admin.req.info.FilterCompanyRequest" <select id="filterCompany" parameterType="com.glxp.udi.admin.req.info.FilterCompanyRequest"
resultType="com.glxp.udi.admin.entity.info.CompanyEntity"> resultType="com.glxp.udi.admin.entity.info.CompanyEntity">
SELECT * FROM company SELECT *
FROM company
<where> <where>
<if test="customerId != null and customerId != ''"> <if test="customerId != null and customerId != ''">
and parentIdFk = #{customerId} and parentIdFk = #{customerId}
@ -31,6 +31,7 @@
</if> </if>
</where> </where>
</select> </select>
<delete id="deleteCompany" parameterType="java.lang.Long"> <delete id="deleteCompany" parameterType="java.lang.Long">
delete delete
from company from company
@ -44,33 +45,6 @@
where companyName = #{companyName} where companyName = #{companyName}
</select> </select>
<select id="getSubCompany" parameterType="com.glxp.udi.admin.req.info.FilterCompanyRequest"
resultType="com.glxp.udi.admin.entity.info.CompanyEntity">
SELECT * FROM company
<where>
<if test="customerId != null and customerId != ''">
and parentIdFk = #{customerId}
</if>
<if test="companyName != null and companyName != ''">
and companyName like concat('%',#{companyName},'%')
</if>
<if test="creditNum != null and creditNum != ''">
and creditNum like concat('%',#{creditNum},'%')
</if>
<if test="auditStatus != null and auditStatus != ''">
and auditStatus = #{auditStatus}
</if>
<if test="unitIdFk != null and unitIdFk != ''">
and unitIdFk = #{unitIdFk}
</if>
<if test="(auditStatus == null or auditStatus == '') and auditStatusList != null and auditStatusList.size() > 0">
<foreach collection="auditStatusList" item="auditStatus" open="AND (" separator="OR" close=")">
auditStatus = #{auditStatus,jdbcType=VARCHAR}
</foreach>
</if>
</where>
</select>
<update id="modifyCompany" parameterType="com.glxp.udi.admin.entity.info.CompanyEntity"> <update id="modifyCompany" parameterType="com.glxp.udi.admin.entity.info.CompanyEntity">
UPDATE company UPDATE company
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
@ -230,16 +204,10 @@
#{filePath3}, #{filePath3},
#{filePath4}, #{unitIdFk}) #{filePath4}, #{unitIdFk})
</insert> </insert>
<select id="findKey" parameterType="java.lang.String"
resultType="com.glxp.udi.admin.entity.info.AliKeyEntity"> <select id="findCompanyName" resultType="java.lang.String">
SELECT company.refEntId, select companyName
company.entId,
alicert.appKey,
alicert.appSecret
from company from company
INNER JOIN alicert on company.certIdFk = alicert.id where customerId = #{customerId}
where company.customerId = #{customerId}
</select><select id="findCompanyName" resultType="java.lang.String">
select companyName from company where customerId = #{customerId}
</select> </select>
</mapper> </mapper>

@ -2,10 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.info.CompanyUpdateLogDao"> <mapper namespace="com.glxp.udi.admin.dao.info.CompanyUpdateLogDao">
<select id="filterCompanyUpdateLog" parameterType="com.glxp.udi.admin.req.info.FilterCompanyUpdateLogRequest" <select id="filterCompanyUpdateLog" parameterType="com.glxp.udi.admin.req.info.FilterCompanyUpdateLogRequest"
resultType="com.glxp.udi.admin.entity.info.CompanyUpdateLogEntity"> resultType="com.glxp.udi.admin.entity.info.CompanyUpdateLogEntity">
select * from company_update_log select *
from company_update_log
<where> <where>
<if test="customerId != '' and customerId != null"> <if test="customerId != '' and customerId != null">
and customerId = #{customerId} and customerId = #{customerId}
@ -28,17 +28,22 @@
<select id="findCompanyUpdateLog" parameterType="java.lang.Long" <select id="findCompanyUpdateLog" parameterType="java.lang.Long"
resultType="com.glxp.udi.admin.entity.info.CompanyUpdateLogEntity"> resultType="com.glxp.udi.admin.entity.info.CompanyUpdateLogEntity">
SELECT * FROM company_update_log where customerId = #{customerId} SELECT *
FROM company_update_log
where customerId = #{customerId}
</select> </select>
<select id="findCompanyUpdateLogBySubmit" parameterType="java.lang.String" <select id="findCompanyUpdateLogBySubmit" parameterType="java.lang.String"
resultType="com.glxp.udi.admin.entity.info.CompanyUpdateLogEntity"> resultType="com.glxp.udi.admin.entity.info.CompanyUpdateLogEntity">
SELECT * FROM company_update_log where submit = #{submit} SELECT *
FROM company_update_log
where submit = #{submit}
</select> </select>
<select id="getCompanyUpdateLog" parameterType="com.glxp.udi.admin.req.info.FilterCompanyUpdateLogRequest" <select id="getCompanyUpdateLog" parameterType="com.glxp.udi.admin.req.info.FilterCompanyUpdateLogRequest"
resultType="com.glxp.udi.admin.entity.info.CompanyUpdateLogEntity"> resultType="com.glxp.udi.admin.entity.info.CompanyUpdateLogEntity">
SELECT * FROM company_update_log SELECT *
FROM company_update_log
<where> <where>
<if test="customerId != null and customerId != ''"> <if test="customerId != null and customerId != ''">
and customerId = #{customerId} and customerId = #{customerId}
@ -53,31 +58,49 @@
and logType = #{logType} and logType = #{logType}
</if> </if>
</where> </where>
</select> </select>
<update id="updateCompanyUpdateLog" parameterType="com.glxp.udi.admin.entity.info.CompanyUpdateLogEntity"> <update id="updateCompanyUpdateLog" parameterType="com.glxp.udi.admin.entity.info.CompanyUpdateLogEntity">
UPDATE company_update_log UPDATE company_update_log
<set> <set>
<if test="customerId != null">customerId=#{customerId},</if> <if test="customerId != null">
<if test="updateCause != null">updateCause=#{updateCause},</if> customerId=#{customerId},
<if test="status != null">status=#{status},</if> </if>
<if test="create_time != null">create_time=#{create_time},</if> <if test="updateCause != null">
<if test="update_time != null">update_time=#{update_time},</if> updateCause=#{updateCause},
<if test="submit != null">submit=#{submit},</if> </if>
<if test="auditor != null">auditor=#{auditor},</if> <if test="status != null">
<if test="noPassCause != null">noPassCause=#{noPassCause},</if> status=#{status},
<if test="param != null">param=#{param},</if> </if>
<if test="logType != null">logType=#{logType},</if> <if test="create_time != null">
create_time=#{create_time},
</if>
<if test="update_time != null">
update_time=#{update_time},
</if>
<if test="submit != null">
submit=#{submit},
</if>
<if test="auditor != null">
auditor=#{auditor},
</if>
<if test="noPassCause != null">
noPassCause=#{noPassCause},
</if>
<if test="param != null">
param=#{param},
</if>
<if test="logType != null">
logType=#{logType},
</if>
</set> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<insert id="insertCompanyUpdateLog" parameterType="com.glxp.udi.admin.entity.info.CompanyUpdateLogEntity"> <insert id="insertCompanyUpdateLog" parameterType="com.glxp.udi.admin.entity.info.CompanyUpdateLogEntity">
INSERT INTO company_update_log(customerId, updateCause, status, create_time, update_time, INSERT INTO company_update_log(customerId, updateCause, status, create_time, update_time,
submit,auditor,noPassCause,param,logType) values submit, auditor, noPassCause, param, logType)
( values (#{customerId},
#{customerId},
#{updateCause}, #{updateCause},
#{status}, #{status},
#{create_time}, #{create_time},
@ -86,8 +109,6 @@
#{auditor}, #{auditor},
#{noPassCause}, #{noPassCause},
#{param}, #{param},
#{logType} #{logType})
)
</insert> </insert>
</mapper> </mapper>

@ -2,7 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.info.PlatformDao"> <mapper namespace="com.glxp.udi.admin.dao.info.PlatformDao">
<insert id="save" parameterType="com.glxp.udi.admin.entity.info.PlatformEntity"> <insert id="save" parameterType="com.glxp.udi.admin.entity.info.PlatformEntity">
insert into auth_platform insert into auth_platform
(id, name, host) (id, name, host)
@ -15,17 +14,19 @@
values values
<foreach item="item" index="index" collection="list" <foreach item="item" index="index" collection="list"
separator=","> separator=",">
( (#{item.id}, #{item.name,jdbcType=VARCHAR}, #{item.host,jdbcType=VARCHAR})
#{item.id},#{item.name,jdbcType=VARCHAR},#{item.host,jdbcType=VARCHAR}
)
</foreach> </foreach>
</insert> </insert>
<update id="update" parameterType="com.glxp.udi.admin.entity.info.PlatformEntity"> <update id="update" parameterType="com.glxp.udi.admin.entity.info.PlatformEntity">
update auth_platform update auth_platform
<set> <set>
<if test="name != null">name=#{name},</if> <if test="name != null">
<if test="host != null">host=#{host},</if> name=#{name},
</if>
<if test="host != null">
host=#{host},
</if>
</set> </set>
where id = #{id} where id = #{id}
</update> </update>
@ -37,7 +38,8 @@
</select> </select>
<select id="list" resultType="com.glxp.udi.admin.entity.info.PlatformEntity"> <select id="list" resultType="com.glxp.udi.admin.entity.info.PlatformEntity">
select * from auth_platform select *
from auth_platform
<where> <where>
<if test="id != null and id != ''"> <if test="id != null and id != ''">
and id = #{id} and id = #{id}
@ -52,7 +54,8 @@
order by id desc order by id desc
</select> </select>
<select id="count" resultType="int"> <select id="count" resultType="int">
select count(*) from auth_platform select count(*)
from auth_platform
<where> <where>
<if test="id != null and id != ''"> <if test="id != null and id != ''">
and id = #{id} and id = #{id}
@ -75,7 +78,9 @@
p.name platformName, p.name platformName,
p.id platformId, p.id platformId,
u.sourceAction, u.sourceAction,
u.targetAction, u.invCode, u.invSubCode u.targetAction,
u.invCode,
u.invSubCode
from io_unit_maintain u from io_unit_maintain u
left join auth_platform p on u.platformId = p.id left join auth_platform p on u.platformId = p.id
<where> <where>
@ -91,6 +96,9 @@
</select> </select>
<select id="selectByNameAndHost" resultType="com.glxp.udi.admin.entity.info.PlatformEntity"> <select id="selectByNameAndHost" resultType="com.glxp.udi.admin.entity.info.PlatformEntity">
select * from auth_platform where name = #{name} and host= #{host} select *
from auth_platform
where name = #{name}
and host = #{host}
</select> </select>
</mapper> </mapper>

@ -2,8 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.info.ScheduledDao"> <mapper namespace="com.glxp.udi.admin.dao.info.ScheduledDao">
<insert id="insertScheduled" keyProperty="id" <insert id="insertScheduled" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.info.ScheduledEntity"> parameterType="com.glxp.udi.admin.entity.info.ScheduledEntity">
insert INTO scheduled insert INTO scheduled
@ -13,23 +11,26 @@
#{customerId}) #{customerId})
</insert> </insert>
<delete id="deleteScheduled" parameterType="java.lang.String"> <delete id="deleteScheduled" parameterType="java.lang.String">
delete delete
from scheduled from scheduled
where id = #{id} where id = #{id}
</delete> </delete>
<update id="modifyScheduled" parameterType="com.glxp.udi.admin.entity.info.ScheduledEntity"> <update id="modifyScheduled" parameterType="com.glxp.udi.admin.entity.info.ScheduledEntity">
UPDATE scheduled UPDATE scheduled
<set> <set>
<if test="cron != null">cron=#{cron},</if> <if test="cron != null">
cron=#{cron},
</if>
</set> </set>
WHERE cronName = #{cronName} WHERE cronName = #{cronName}
</update> </update>
<select id="findScheduled" parameterType="com.glxp.udi.admin.req.udidl.ScheduledRequest" <select id="findScheduled" parameterType="com.glxp.udi.admin.req.udidl.ScheduledRequest"
resultType="com.glxp.udi.admin.entity.info.ScheduledEntity"> resultType="com.glxp.udi.admin.entity.info.ScheduledEntity">
select * from scheduled select *
from scheduled
<where> <where>
<if test="cronName != null and cronName != ''"> <if test="cronName != null and cronName != ''">
and cronName = #{cronName} and cronName = #{cronName}
@ -38,8 +39,5 @@
and customerId = #{customerId} and customerId = #{customerId}
</if> </if>
</where> </where>
</select> </select>
</mapper> </mapper>

@ -4,7 +4,9 @@
<mapper namespace="com.glxp.udi.admin.dao.info.SetupDao"> <mapper namespace="com.glxp.udi.admin.dao.info.SetupDao">
<select id="findSetup" parameterType="java.lang.String" <select id="findSetup" parameterType="java.lang.String"
resultType="com.glxp.udi.admin.entity.info.SetupEntity"> resultType="com.glxp.udi.admin.entity.info.SetupEntity">
SELECT * FROM customer_set where customerId = #{customerId} SELECT *
FROM customer_set
where customerId = #{customerId}
</select> </select>
<update id="modifySetup" parameterType="com.glxp.udi.admin.entity.info.SetupEntity"> <update id="modifySetup" parameterType="com.glxp.udi.admin.entity.info.SetupEntity">
@ -34,10 +36,8 @@
<insert id="insertSetup" parameterType="com.glxp.udi.admin.entity.info.SetupEntity"> <insert id="insertSetup" parameterType="com.glxp.udi.admin.entity.info.SetupEntity">
replace INTO customer_set(customerId, replace INTO customer_set(customerId,
checkUpbill,checkStock,checkRepeat,downloadRelation,uploadTime,lastUploadDate) values checkUpbill, checkStock, checkRepeat, downloadRelation, uploadTime, lastUploadDate)
( values (#{customerId},
#{customerId}, #{checkUpbill}, #{checkStock}, #{checkRepeat}, #{downloadRelation}, #{uploadTime}, #{lastUploadDate})
#{checkUpbill}, #{checkStock} , #{checkRepeat}, #{downloadRelation}
,#{uploadTime},#{lastUploadDate})
</insert> </insert>
</mapper> </mapper>

@ -2,8 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.inout.CodesDao"> <mapper namespace="com.glxp.udi.admin.dao.inout.CodesDao">
<update id="updateUnit"> <update id="updateUnit">
update io_codes update io_codes
set fromCorp = #{fromCorp} and fromCorpId = #{fromCorpId} set fromCorp = #{fromCorp} and fromCorpId = #{fromCorpId}
@ -11,18 +9,26 @@
</update> </update>
<update id="updateOrderId"> <update id="updateOrderId">
update io_codes set orderId = #{newOrderId} where orderId = #{orderId} update io_codes
set orderId = #{newOrderId}
where orderId = #{orderId}
</update> </update>
<update id="updateCount"> <update id="updateCount">
update io_codes set count = #{count} where id = #{id} update io_codes
set count = #{count}
where id = #{id}
</update> </update>
<select id="selectByOrderId" resultType="com.glxp.udi.admin.entity.inout.WarehouseEntity"> <select id="selectByOrderId" resultType="com.glxp.udi.admin.entity.inout.WarehouseEntity">
select * from io_codes where orderId = #{orderId} select *
from io_codes
where orderId = #{orderId}
</select> </select>
<delete id="deleteByOrderId"> <delete id="deleteByOrderId">
delete from io_codes where orderId = #{orderId} delete
from io_codes
where orderId = #{orderId}
</delete> </delete>
</mapper> </mapper>

@ -3,18 +3,27 @@
<mapper namespace="com.glxp.udi.admin.dao.inout.CodesTempDao"> <mapper namespace="com.glxp.udi.admin.dao.inout.CodesTempDao">
<update id="updateCount"> <update id="updateCount">
update io_codes_temp set count = #{count} where id = #{id} update io_codes_temp
set count = #{count}
where id = #{id}
</update> </update>
<delete id="delete"> <delete id="delete">
delete from io_codes_temp where id = #{id} and orderId = #{orderId} delete
from io_codes_temp
where id = #{id}
and orderId = #{orderId}
</delete> </delete>
<select id="selectByOrderId" resultType="com.glxp.udi.admin.entity.inout.WarehousetempEntity"> <select id="selectByOrderId" resultType="com.glxp.udi.admin.entity.inout.WarehousetempEntity">
select * from io_codes_temp where orderId = #{orderId} select *
from io_codes_temp
where orderId = #{orderId}
</select> </select>
<delete id="deleteByOrderId"> <delete id="deleteByOrderId">
delete from io_codes_temp where orderId = #{orderId} delete
from io_codes_temp
where orderId = #{orderId}
</delete> </delete>
</mapper> </mapper>

@ -9,6 +9,8 @@
</select> </select>
<delete id="deleteByOrderId"> <delete id="deleteByOrderId">
delete from io_inv_product_detail where orderIdFk = #{orderId} delete
from io_inv_product_detail
where orderIdFk = #{orderId}
</delete> </delete>
</mapper> </mapper>

@ -2,9 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.inout.OrderDao"> <mapper namespace="com.glxp.udi.admin.dao.inout.OrderDao">
<update id="updateActDate"> <update id="updateActDate">
update io_order set actDate = #{actDate} update io_order
set actDate = #{actDate}
<where> <where>
<foreach collection="orderIds" item="item" separator="," open="(" close=")" index="index"> <foreach collection="orderIds" item="item" separator="," open="(" close=")" index="index">
orderId = #{item} orderId = #{item}
@ -13,11 +13,14 @@
</update> </update>
<select id="selectNos" resultType="com.glxp.udi.admin.res.inout.OrderNoResult"> <select id="selectNos" resultType="com.glxp.udi.admin.res.inout.OrderNoResult">
select supplementNo, replicateNo from io_order where orderId = #{orderId} select supplementNo, replicateNo
from io_order
where orderId = #{orderId}
</select> </select>
<update id="updateReplicateNo"> <update id="updateReplicateNo">
update io_order set replicateNo = #{replicateNo} where orderId = #{orderId} update io_order
set replicateNo = #{replicateNo}
where orderId = #{orderId}
</update> </update>
</mapper> </mapper>

@ -3,6 +3,8 @@
<mapper namespace="com.glxp.udi.admin.dao.inout.OrderDetailDao"> <mapper namespace="com.glxp.udi.admin.dao.inout.OrderDetailDao">
<delete id="deleteByOrderId"> <delete id="deleteByOrderId">
delete from io_order_detail where orderIdFk = #{orderId} delete
from io_order_detail
where orderIdFk = #{orderId}
</delete> </delete>
</mapper> </mapper>

@ -2,10 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.inout.StockQRCodeTextDao"> <mapper namespace="com.glxp.udi.admin.dao.inout.StockQRCodeTextDao">
<select id="filterStockQRCodeText" parameterType="com.glxp.udi.admin.req.inout.StockQRCodeTextFilterRequest" <select id="filterStockQRCodeText" parameterType="com.glxp.udi.admin.req.inout.StockQRCodeTextFilterRequest"
resultType="com.glxp.udi.admin.entity.inout.StockQRCodeTextEntity"> resultType="com.glxp.udi.admin.entity.inout.StockQRCodeTextEntity">
select * from stock_qrcode_text select *
from stock_qrcode_text
<where> <where>
<if test="orderId != '' and orderId != null"> <if test="orderId != '' and orderId != null">
and orderId = #{orderId} and orderId = #{orderId}
@ -20,12 +20,12 @@
ORDER BY id DESC ORDER BY id DESC
</select> </select>
<insert id="insertStockQRCodeText" keyProperty="id" parameterType="com.glxp.udi.admin.entity.inout.StockQRCodeTextEntity"> <insert id="insertStockQRCodeText" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.StockQRCodeTextEntity">
replace replace
INTO stock_qrcode_text(id, INTO stock_qrcode_text(id,
orderId, detailId, text, textTag, status, param, create_time, update_time) orderId, detailId, text, textTag, status, param, create_time, update_time)
values( values (#{id},
#{id},
#{orderId}, #{orderId},
#{detailId}, #{detailId},
#{text}, #{text},
@ -33,18 +33,17 @@
#{status}, #{status},
#{param}, #{param},
#{create_time}, #{create_time},
#{update_time} #{update_time})
)
</insert> </insert>
<insert id="insertStockQRCodeTexts" keyProperty="id" parameterType="com.glxp.udi.admin.entity.inout.StockQRCodeTextEntity"> <insert id="insertStockQRCodeTexts" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.StockQRCodeTextEntity">
replace INTO stock_qrcode_text(id, replace INTO stock_qrcode_text(id,
orderId, detailId, text, textTag, status, param, create_time, update_time) orderId, detailId, text, textTag, status, param, create_time, update_time)
values values
<foreach collection="stockQRCodeTextEntities" item="item" index="index" <foreach collection="stockQRCodeTextEntities" item="item" index="index"
separator=","> separator=",">
( (#{item.id},
#{item.id},
#{item.orderId}, #{item.orderId},
#{item.detailId}, #{item.detailId},
#{item.text}, #{item.text},
@ -52,10 +51,8 @@
#{item.status}, #{item.status},
#{item.param}, #{item.param},
#{item.create_time}, #{item.create_time},
#{item.update_time} #{item.update_time})
)
</foreach> </foreach>
</insert> </insert>
<delete id="deleteByOrderId" parameterType="Map"> <delete id="deleteByOrderId" parameterType="Map">
@ -66,9 +63,9 @@
<select id="findOne" parameterType="Map" <select id="findOne" parameterType="Map"
resultType="com.glxp.udi.admin.entity.inout.StockQRCodeTextEntity"> resultType="com.glxp.udi.admin.entity.inout.StockQRCodeTextEntity">
SELECT * FROM stock_qrcode_text SELECT *
FROM stock_qrcode_text
WHERE id = #{id} WHERE id = #{id}
limit 1 limit 1
</select> </select>
</mapper> </mapper>

@ -6,7 +6,8 @@
resultType="com.glxp.udi.admin.entity.inout.UdiInfoEntity"> resultType="com.glxp.udi.admin.entity.inout.UdiInfoEntity">
SELECT * SELECT *
FROM io_productinfo FROM io_productinfo
WHERE (uuid = #{uuid} and diType = 1) limit 1 WHERE (uuid = #{uuid} and diType = 1)
limit 1
</select> </select>
<select id="findByUuids" parameterType="java.lang.String" <select id="findByUuids" parameterType="java.lang.String"
@ -35,15 +36,13 @@
<insert id="insertUdiInfo" keyProperty="id" parameterType="com.glxp.udi.admin.entity.inout.UdiInfoEntity"> <insert id="insertUdiInfo" keyProperty="id" parameterType="com.glxp.udi.admin.entity.inout.UdiInfoEntity">
replace replace
INTO io_productinfo INTO io_productinfo
( (nameCode, packRatio, packLevel, bhxjsl,
nameCode,packRatio,packLevel,bhxjsl,
bhzxxsbzsl, zxxsbzbhsydysl, bhxjcpbm, bzcj, addType, deviceRecordKey, isUseDy, bhzxxsbzsl, zxxsbzbhsydysl, bhxjcpbm, bzcj, addType, deviceRecordKey, isUseDy,
cpmctymc,cplb,flbm,ggxh,qxlb,tyshxydm,ylqxzcrbarmc,zczbhhzbapzbh,ylqxzcrbarywmc,uuid,sjcpbm,versionNumber cpmctymc, cplb, flbm, ggxh, qxlb, tyshxydm, ylqxzcrbarmc, zczbhhzbapzbh, ylqxzcrbarywmc, uuid, sjcpbm,
,diType,customerId,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq,cpms,manufactory,lastUpdateTime versionNumber
) , diType, customerId, scbssfbhph, scbssfbhxlh, scbssfbhscrq, scbssfbhsxrq, cpms, manufactory,
values lastUpdateTime)
( values (#{nameCode},
#{nameCode},
#{packRatio}, #{packRatio},
#{packLevel}, #{packLevel},
#{bhxjsl}, #{bhxjsl},
@ -74,25 +73,22 @@
#{scbssfbhsxrq}, #{scbssfbhsxrq},
#{cpms}, #{cpms},
#{manufactory}, #{manufactory},
#{lastUpdateTime} #{lastUpdateTime})
)
</insert> </insert>
<insert id="insertUdiInfos" keyProperty="id" parameterType="java.util.List"> <insert id="insertUdiInfos" keyProperty="id" parameterType="java.util.List">
replace INTO io_productinfo replace INTO io_productinfo
( (nameCode, packRatio, packLevel, bhxjsl,
nameCode,packRatio,packLevel,bhxjsl,
bhzxxsbzsl, zxxsbzbhsydysl, bhxjcpbm, bzcj, addType, deviceRecordKey, isUseDy, bhzxxsbzsl, zxxsbzbhsydysl, bhxjcpbm, bzcj, addType, deviceRecordKey, isUseDy,
cpmctymc,cplb,flbm,ggxh,qxlb,tyshxydm,ylqxzcrbarmc,zczbhhzbapzbh,ylqxzcrbarywmc,uuid,sjcpbm,versionNumber cpmctymc, cplb, flbm, ggxh, qxlb, tyshxydm, ylqxzcrbarmc, zczbhhzbapzbh, ylqxzcrbarywmc, uuid, sjcpbm,
,diType,customerId,scbssfbhph,scbssfbhxlh,scbssfbhscrq,scbssfbhsxrq,cpms,manufactory,lastUpdateTime,isDisable, versionNumber
ybbm,sptm , diType, customerId, scbssfbhph, scbssfbhxlh, scbssfbhscrq, scbssfbhsxrq, cpms, manufactory,
) lastUpdateTime, isDisable,
ybbm, sptm)
values values
<foreach collection="udiInfoEntities" item="item" index="index" <foreach collection="udiInfoEntities" item="item" index="index"
separator=","> separator=",">
( (#{item.nameCode},
#{item.nameCode},
#{item.packRatio}, #{item.packRatio},
#{item.packLevel}, #{item.packLevel},
#{item.bhxjsl}, #{item.bhxjsl},
@ -126,8 +122,7 @@
#{item.lastUpdateTime}, #{item.lastUpdateTime},
#{item.isDisable}, #{item.isDisable},
#{item.ybbm}, #{item.ybbm},
#{item.sptm} #{item.sptm})
)
</foreach> </foreach>
</insert> </insert>
@ -140,41 +135,111 @@
<update id="updateUdiInfo" parameterType="com.glxp.udi.admin.entity.inout.UdiInfoEntity"> <update id="updateUdiInfo" parameterType="com.glxp.udi.admin.entity.inout.UdiInfoEntity">
UPDATE io_productinfo UPDATE io_productinfo
<set> <set>
<if test="packRatio != null">packRatio=#{packRatio},</if> <if test="packRatio != null">
<if test="packLevel != null">packLevel=#{packLevel},</if> packRatio=#{packRatio},
<if test="bhxjsl != null">bhxjsl=#{bhxjsl},</if> </if>
<if test="bhzxxsbzsl != null">bhzxxsbzsl=#{bhzxxsbzsl},</if> <if test="packLevel != null">
<if test="zxxsbzbhsydysl != null">zxxsbzbhsydysl=#{zxxsbzbhsydysl},</if> packLevel=#{packLevel},
<if test="bhxjcpbm != null">bhxjcpbm=#{bhxjcpbm},</if> </if>
<if test="bzcj != null">bzcj=#{bzcj},</if> <if test="bhxjsl != null">
<if test="addType != null">addType=#{addType},</if> bhxjsl=#{bhxjsl},
<if test="deviceRecordKey != null">deviceRecordKey=#{deviceRecordKey},</if> </if>
<if test="isUseDy != null">isUseDy=#{isUseDy},</if> <if test="bhzxxsbzsl != null">
<if test="cpmctymc != null">cpmctymc=#{cpmctymc},</if> bhzxxsbzsl=#{bhzxxsbzsl},
<if test="cplb != null">cplb=#{cplb},</if> </if>
<if test="flbm != null">flbm=#{flbm},</if> <if test="zxxsbzbhsydysl != null">
<if test="ggxh != null">ggxh=#{ggxh},</if> zxxsbzbhsydysl=#{zxxsbzbhsydysl},
<if test="qxlb != null">qxlb=#{qxlb},</if> </if>
<if test="tyshxydm != null">tyshxydm=#{tyshxydm},</if> <if test="bhxjcpbm != null">
<if test="ylqxzcrbarmc != null">ylqxzcrbarmc=#{ylqxzcrbarmc},</if> bhxjcpbm=#{bhxjcpbm},
<if test="ylqxzcrbarywmc != null">ylqxzcrbarywmc=#{ylqxzcrbarywmc},</if> </if>
<if test="uuid != null">uuid=#{uuid},</if> <if test="bzcj != null">
<if test="sjcpbm != null">sjcpbm=#{sjcpbm},</if> bzcj=#{bzcj},
<if test="versionNumber != null">versionNumber=#{versionNumber},</if> </if>
<if test="diType != null">diType=#{diType},</if> <if test="addType != null">
<if test="customerId != null">customerId=#{customerId},</if> addType=#{addType},
<if test="scbssfbhph != null">scbssfbhph=#{scbssfbhph},</if> </if>
<if test="scbssfbhxlh != null">scbssfbhxlh=#{scbssfbhxlh},</if> <if test="deviceRecordKey != null">
<if test="scbssfbhscrq != null">scbssfbhscrq=#{scbssfbhscrq},</if> deviceRecordKey=#{deviceRecordKey},
<if test="scbssfbhsxrq != null">scbssfbhsxrq=#{scbssfbhsxrq},</if> </if>
<if test="cpms != null">cpms=#{cpms},</if> <if test="isUseDy != null">
<if test="ybbm != null">ybbm=#{ybbm},</if> isUseDy=#{isUseDy},
<if test="sptm != null">sptm=#{sptm},</if> </if>
<if test="isDisable != null">isDisable=#{isDisable},</if> <if test="cpmctymc != null">
<if test="manufactory != null">manufactory=#{manufactory},</if> cpmctymc=#{cpmctymc},
<if test="lastUpdateTime != null">lastUpdateTime=#{lastUpdateTime},</if> </if>
<if test="thirdId != null and thirdId != ''">thirdId=#{thirdId},</if> <if test="cplb != null">
<if test="thirdId == 'empty'">thirdId = null,</if> cplb=#{cplb},
</if>
<if test="flbm != null">
flbm=#{flbm},
</if>
<if test="ggxh != null">
ggxh=#{ggxh},
</if>
<if test="qxlb != null">
qxlb=#{qxlb},
</if>
<if test="tyshxydm != null">
tyshxydm=#{tyshxydm},
</if>
<if test="ylqxzcrbarmc != null">
ylqxzcrbarmc=#{ylqxzcrbarmc},
</if>
<if test="ylqxzcrbarywmc != null">
ylqxzcrbarywmc=#{ylqxzcrbarywmc},
</if>
<if test="uuid != null">
uuid=#{uuid},
</if>
<if test="sjcpbm != null">
sjcpbm=#{sjcpbm},
</if>
<if test="versionNumber != null">
versionNumber=#{versionNumber},
</if>
<if test="diType != null">
diType=#{diType},
</if>
<if test="customerId != null">
customerId=#{customerId},
</if>
<if test="scbssfbhph != null">
scbssfbhph=#{scbssfbhph},
</if>
<if test="scbssfbhxlh != null">
scbssfbhxlh=#{scbssfbhxlh},
</if>
<if test="scbssfbhscrq != null">
scbssfbhscrq=#{scbssfbhscrq},
</if>
<if test="scbssfbhsxrq != null">
scbssfbhsxrq=#{scbssfbhsxrq},
</if>
<if test="cpms != null">
cpms=#{cpms},
</if>
<if test="ybbm != null">
ybbm=#{ybbm},
</if>
<if test="sptm != null">
sptm=#{sptm},
</if>
<if test="isDisable != null">
isDisable=#{isDisable},
</if>
<if test="manufactory != null">
manufactory=#{manufactory},
</if>
<if test="lastUpdateTime != null">
lastUpdateTime=#{lastUpdateTime},
</if>
<if test="thirdId != null and thirdId != ''">
thirdId=#{thirdId},
</if>
<if test="thirdId == 'empty'">
thirdId = null,
</if>
</set> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
@ -182,12 +247,24 @@
<update id="updateUdiInfoByUuid" parameterType="com.glxp.udi.admin.entity.inout.UdiInfoEntity"> <update id="updateUdiInfoByUuid" parameterType="com.glxp.udi.admin.entity.inout.UdiInfoEntity">
UPDATE io_productinfo UPDATE io_productinfo
<set> <set>
<if test="zxxsbzbhsydysl != null">zxxsbzbhsydysl=#{zxxsbzbhsydysl},</if> <if test="zxxsbzbhsydysl != null">
<if test="isUseDy != null">isUseDy=#{isUseDy},</if> zxxsbzbhsydysl=#{zxxsbzbhsydysl},
<if test="customerId != null">customerId=#{customerId},</if> </if>
<if test="thirdId != null and thirdId != ''">thirdId=#{thirdId},</if> <if test="isUseDy != null">
<if test="lastUpdateTime != null">lastUpdateTime=#{lastUpdateTime},</if> isUseDy=#{isUseDy},
<if test="manufactory != null">manufactory=#{manufactory},</if> </if>
<if test="customerId != null">
customerId=#{customerId},
</if>
<if test="thirdId != null and thirdId != ''">
thirdId=#{thirdId},
</if>
<if test="lastUpdateTime != null">
lastUpdateTime=#{lastUpdateTime},
</if>
<if test="manufactory != null">
manufactory=#{manufactory},
</if>
</set> </set>
WHERE uuid = #{uuid} WHERE uuid = #{uuid}
</update> </update>

@ -2,21 +2,40 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.inout.UdiRelevanceDao"> <mapper namespace="com.glxp.udi.admin.dao.inout.UdiRelevanceDao">
<select id="filterUdiRelevance" parameterType="com.glxp.udi.admin.req.inout.FilterUdiInfoRequest" <select id="filterUdiRelevance" parameterType="com.glxp.udi.admin.req.inout.FilterUdiInfoRequest"
resultType="com.glxp.udi.admin.res.basic.UdiRelevanceResponse"> resultType="com.glxp.udi.admin.res.basic.UdiRelevanceResponse">
select select udi_relevance.id,
udi_relevance.id, udi_relevance.thirdId,
udi_relevance.thirdId,udi_relevance.thirdName,udi_relevance.isUseDy, udi_relevance.thirdName,
udi_relevance.batchNo,udi_relevance.warehouseName, udi_relevance.isUseDy,
io_productinfo.nameCode,io_productinfo.packRatio,io_productinfo.packLevel, udi_relevance.batchNo,
io_productinfo.bhxjsl,io_productinfo.bhzxxsbzsl,io_productinfo.zxxsbzbhsydysl, udi_relevance.warehouseName,
io_productinfo.bhxjcpbm,io_productinfo.bzcj,io_productinfo.thirdProductNo, io_productinfo.nameCode,
io_productinfo.addType,io_productinfo.deviceRecordKey, io_productinfo.packRatio,
io_productinfo.thirdProductName,io_productinfo.cpmctymc,io_productinfo.cplb, io_productinfo.packLevel,
io_productinfo.flbm,io_productinfo.ggxh,io_productinfo.qxlb,io_productinfo.tyshxydm, io_productinfo.bhxjsl,
io_productinfo.ylqxzcrbarmc,io_productinfo.zczbhhzbapzbh,io_productinfo.ylqxzcrbarywmc, io_productinfo.bhzxxsbzsl,
io_productinfo.sydycpbs,io_productinfo.uuid,io_productinfo.sjcpbm,io_productinfo.versionNumber,io_productinfo.diType io_productinfo.zxxsbzbhsydysl,
io_productinfo.bhxjcpbm,
io_productinfo.bzcj,
io_productinfo.thirdProductNo,
io_productinfo.addType,
io_productinfo.deviceRecordKey,
io_productinfo.thirdProductName,
io_productinfo.cpmctymc,
io_productinfo.cplb,
io_productinfo.flbm,
io_productinfo.ggxh,
io_productinfo.qxlb,
io_productinfo.tyshxydm,
io_productinfo.ylqxzcrbarmc,
io_productinfo.zczbhhzbapzbh,
io_productinfo.ylqxzcrbarywmc,
io_productinfo.sydycpbs,
io_productinfo.uuid,
io_productinfo.sjcpbm,
io_productinfo.versionNumber,
io_productinfo.diType
FROM udi_relevance FROM udi_relevance
inner JOIN io_productinfo inner JOIN io_productinfo
ON io_productinfo.uuid = udi_relevance.uuid ON io_productinfo.uuid = udi_relevance.uuid
@ -38,17 +57,43 @@
</if> </if>
</where> </where>
ORDER BY updateTime DESC ORDER BY updateTime DESC
</select> </select>
<select id="filterUdiGp" parameterType="com.glxp.udi.admin.req.inout.FilterUdiInfoRequest" <select id="filterUdiGp" parameterType="com.glxp.udi.admin.req.inout.FilterUdiInfoRequest"
resultType="com.glxp.udi.admin.res.basic.UdiRelevanceResponse"> resultType="com.glxp.udi.admin.res.basic.UdiRelevanceResponse">
select select udi_relevance.id,
udi_relevance.id, udi_relevance.thirdId,
udi_relevance.thirdId,udi_relevance.thirdName,udi_relevance.isUseDy, udi_relevance.thirdName,
udi_relevance.batchNo,udi_relevance.warehouseName, udi_relevance.isUseDy,
io_productinfo.nameCode,io_productinfo.packRatio,io_productinfo.packLevel,io_productinfo.bhxjsl,io_productinfo.bhzxxsbzsl,io_productinfo.zxxsbzbhsydysl,io_productinfo.bhxjcpbm,io_productinfo.bzcj,io_productinfo.thirdProductNo,io_productinfo.addType,io_productinfo.deviceRecordKey,io_productinfo.thirdProductName,io_productinfo.cpmctymc,io_productinfo.cplb,io_productinfo.flbm,io_productinfo.ggxh,io_productinfo.qxlb,io_productinfo.tyshxydm,io_productinfo.ylqxzcrbarmc,io_productinfo.zczbhhzbapzbh,io_productinfo.ylqxzcrbarywmc,io_productinfo.sydycpbs,io_productinfo.uuid,io_productinfo.sjcpbm,io_productinfo.versionNumber,io_productinfo.diType udi_relevance.batchNo,
udi_relevance.warehouseName,
io_productinfo.nameCode,
io_productinfo.packRatio,
io_productinfo.packLevel,
io_productinfo.bhxjsl,
io_productinfo.bhzxxsbzsl,
io_productinfo.zxxsbzbhsydysl,
io_productinfo.bhxjcpbm,
io_productinfo.bzcj,
io_productinfo.thirdProductNo,
io_productinfo.addType,
io_productinfo.deviceRecordKey,
io_productinfo.thirdProductName,
io_productinfo.cpmctymc,
io_productinfo.cplb,
io_productinfo.flbm,
io_productinfo.ggxh,
io_productinfo.qxlb,
io_productinfo.tyshxydm,
io_productinfo.ylqxzcrbarmc,
io_productinfo.zczbhhzbapzbh,
io_productinfo.ylqxzcrbarywmc,
io_productinfo.sydycpbs,
io_productinfo.uuid,
io_productinfo.sjcpbm,
io_productinfo.versionNumber,
io_productinfo.diType
FROM io_productinfo FROM io_productinfo
right JOIN udi_relevance right JOIN udi_relevance
ON io_productinfo.uuid = udi_relevance.uuid ON io_productinfo.uuid = udi_relevance.uuid
@ -75,7 +120,8 @@
<select id="selectByUuid" parameterType="java.lang.String" <select id="selectByUuid" parameterType="java.lang.String"
resultType="com.glxp.udi.admin.entity.inout.UdiRelevanceEntity"> resultType="com.glxp.udi.admin.entity.inout.UdiRelevanceEntity">
select * FROM udi_relevance select *
FROM udi_relevance
<where> <where>
<if test="uuid != '' and uuid != null"> <if test="uuid != '' and uuid != null">
AND uuid = #{uuid} AND uuid = #{uuid}
@ -85,50 +131,68 @@
<select id="selectByThirdId" parameterType="java.lang.String" <select id="selectByThirdId" parameterType="java.lang.String"
resultType="com.glxp.udi.admin.entity.inout.UdiRelevanceEntity"> resultType="com.glxp.udi.admin.entity.inout.UdiRelevanceEntity">
select * FROM udi_relevance WHERE thirdId = #{thirdId} limit 1 select *
FROM udi_relevance
WHERE thirdId = #{thirdId}
limit 1
</select> </select>
<insert id="insertUdiRelevance" keyProperty="id" parameterType="com.glxp.udi.admin.entity.inout.UdiRelevanceEntity"> <insert id="insertUdiRelevance" keyProperty="id" parameterType="com.glxp.udi.admin.entity.inout.UdiRelevanceEntity">
replace INTO udi_relevance replace INTO udi_relevance
( (thirdId, thirdName, uuid, isUseDy, updateTime, batchNo, warehouseName)
thirdId,thirdName,uuid,isUseDy,updateTime,batchNo,warehouseName values (#{thirdId},
)
values
(
#{thirdId},
#{thirdName}, #{thirdName},
#{uuid}, #{uuid},
#{isUseDy}, #{isUseDy},
#{updateTime}, #{updateTime},
#{batchNo}, #{batchNo},
#{warehouseName} #{warehouseName})
)
</insert> </insert>
<delete id="deleteById" parameterType="Map"> <delete id="deleteById" parameterType="Map">
DELETE FROM udi_relevance WHERE id = #{id} DELETE
FROM udi_relevance
WHERE id = #{id}
</delete> </delete>
<delete id="deleteByIds" parameterType="java.util.List"> <delete id="deleteByIds" parameterType="java.util.List">
DELETE FROM udi_relevance WHERE id in DELETE
FROM udi_relevance WHERE id in
<foreach collection="ids" item="item" open="(" separator="," close=")"> <foreach collection="ids" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</delete> </delete>
<delete id="deleteByUuid" parameterType="Map"> <delete id="deleteByUuid" parameterType="Map">
DELETE FROM udi_relevance WHERE uuid = #{uuid} DELETE
FROM udi_relevance
WHERE uuid = #{uuid}
</delete> </delete>
<update id="updateUdiRelevance" parameterType="com.glxp.udi.admin.entity.inout.UdiRelevanceEntity"> <update id="updateUdiRelevance" parameterType="com.glxp.udi.admin.entity.inout.UdiRelevanceEntity">
UPDATE udi_relevance UPDATE udi_relevance
<set> <set>
<if test="thirdId != null">thirdId=#{thirdId},</if> <if test="thirdId != null">
<if test="thirdName != null">thirdName=#{thirdName},</if> thirdId=#{thirdId},
<if test="uuid != null">uuid=#{uuid},</if> </if>
<if test="isUseDy != null">isUseDy=#{isUseDy},</if> <if test="thirdName != null">
<if test="updateTime != null">updateTime=#{updateTime},</if> thirdName=#{thirdName},
<if test="batchNo != null">batchNo=#{batchNo},</if> </if>
<if test="warehouseName != null">warehouseName=#{warehouseName},</if> <if test="uuid != null">
uuid=#{uuid},
</if>
<if test="isUseDy != null">
isUseDy=#{isUseDy},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="batchNo != null">
batchNo=#{batchNo},
</if>
<if test="warehouseName != null">
warehouseName=#{warehouseName},
</if>
</set> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>

@ -2,10 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.inout.UnitMaintainDao"> <mapper namespace="com.glxp.udi.admin.dao.inout.UnitMaintainDao">
<select id="filterList" parameterType="com.glxp.udi.admin.req.inout.UnitMaintainFilterRequest" <select id="filterList" parameterType="com.glxp.udi.admin.req.inout.UnitMaintainFilterRequest"
resultType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity"> resultType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity">
SELECT * FROM io_unit_maintain SELECT *
FROM io_unit_maintain
<where> <where>
<if test="customerId != '' and customerId != null"> <if test="customerId != '' and customerId != null">
AND customerId = #{customerId} AND customerId = #{customerId}
@ -23,7 +23,6 @@
</where> </where>
</select> </select>
<insert id="insertUnitMaintain" keyProperty="id" <insert id="insertUnitMaintain" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity"> parameterType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity">
replace INTO io_unit_maintain replace INTO io_unit_maintain
@ -43,38 +42,86 @@
<update id="updateUnit" parameterType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity"> <update id="updateUnit" parameterType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity">
UPDATE io_unit_maintain UPDATE io_unit_maintain
<set> <set>
<if test="thirdId != null">thirdId=#{thirdId},</if> <if test="thirdId != null">
<if test="unitId != null">unitId=#{unitId},</if> thirdId=#{thirdId},
<if test="name != null">name=#{name},</if> </if>
<if test="spell != null">spell=#{spell},</if> <if test="unitId != null">
<if test="addr != null">addr=#{addr},</if> unitId=#{unitId},
<if test="status != null">status=#{status},</if> </if>
<if test="type != null">type=#{type},</if> <if test="name != null">
<if test="creditNo != null">creditNo=#{creditNo},</if> name=#{name},
<if test="platformId != null">platformId=#{platformId},</if> </if>
<if test="appid != null">appid=#{appid},</if> <if test="spell != null">
<if test="apiKey != null">apiKey=#{apiKey},</if> spell=#{spell},
<if test="secretKey != null">secretKey=#{secretKey},</if> </if>
<if test="customerId != null and customerId != ''">customerId=#{customerId},</if> <if test="addr != null">
<if test="corpType != null and corpType != ''">corpType=#{corpType},</if> addr=#{addr},
<if test="outType != null and outType != ''">outType=#{outType},</if> </if>
<if test="pinyinCode != null and pinyinCode != ''">pinyinCode=#{pinyinCode},</if> <if test="status != null">
<if test="contact != null and contact != ''">contact=#{contact},</if> status=#{status},
<if test="mobile != null and mobile != ''">mobile=#{mobile},</if> </if>
<if test="sourceAction != null and sourceAction != ''">sourceAction=#{sourceAction},</if> <if test="type != null">
<if test="targetAction != null and targetAction != ''">targetAction=#{targetAction},</if> type=#{type},
<if test="invCode != null and invCode != ''">invCode=#{invCode},</if> </if>
<if test="invSubCode != null and invSubCode != ''">invSubCode=#{invSubCode},</if> <if test="creditNo != null">
creditNo=#{creditNo},
</if>
<if test="platformId != null">
platformId=#{platformId},
</if>
<if test="appid != null">
appid=#{appid},
</if>
<if test="apiKey != null">
apiKey=#{apiKey},
</if>
<if test="secretKey != null">
secretKey=#{secretKey},
</if>
<if test="customerId != null and customerId != ''">
customerId=#{customerId},
</if>
<if test="corpType != null and corpType != ''">
corpType=#{corpType},
</if>
<if test="outType != null and outType != ''">
outType=#{outType},
</if>
<if test="pinyinCode != null and pinyinCode != ''">
pinyinCode=#{pinyinCode},
</if>
<if test="contact != null and contact != ''">
contact=#{contact},
</if>
<if test="mobile != null and mobile != ''">
mobile=#{mobile},
</if>
<if test="sourceAction != null and sourceAction != ''">
sourceAction=#{sourceAction},
</if>
<if test="targetAction != null and targetAction != ''">
targetAction=#{targetAction},
</if>
<if test="invCode != null and invCode != ''">
invCode=#{invCode},
</if>
<if test="invSubCode != null and invSubCode != ''">
invSubCode=#{invSubCode},
</if>
</set> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<select id="selectByName" resultType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity"> <select id="selectByName" resultType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity">
select * from io_unit_maintain where name = #{name} select *
from io_unit_maintain
where name = #{name}
</select> </select>
<update id="unbindPlatform"> <update id="unbindPlatform">
update io_unit_maintain set platformId = null where id = #{id} update io_unit_maintain
set platformId = null
where id = #{id}
</update> </update>
<select id="getUnbindUnitMaintain" resultType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity"> <select id="getUnbindUnitMaintain" resultType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity">
@ -83,12 +130,19 @@
where customerId = #{customerId} where customerId = #{customerId}
AND (platformId is null or platformId = '') AND (platformId is null or platformId = '')
</select> </select>
<select id="selectByUnitId" resultType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity"> <select id="selectByUnitId" resultType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity">
select * from io_unit_maintain where unitId = #{unitId} select *
from io_unit_maintain
where unitId = #{unitId}
</select> </select>
<select id="getSourceAction" resultType="java.lang.String"> <select id="getSourceAction" resultType="java.lang.String">
select sourceAction from io_unit_maintain where unitId = #{fromCorpId} select sourceAction
from io_unit_maintain
where unitId = #{fromCorpId}
</select> </select>
<select id="getboundUnitMaintains" resultType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity"> <select id="getboundUnitMaintains" resultType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity">
select name, select name,
unitId, unitId,
@ -104,6 +158,7 @@
and sourceAction is not null and sourceAction is not null
and targetAction is not null and targetAction is not null
</select> </select>
<select id="checkUpload" resultType="java.lang.Integer"> <select id="checkUpload" resultType="java.lang.Integer">
select count(*) select count(*)
from io_unit_maintain from io_unit_maintain
@ -111,7 +166,11 @@
and platformId is not null and platformId is not null
and sourceAction = #{action} and sourceAction = #{action}
</select> </select>
<select id="countByName" resultType="java.lang.Integer"> <select id="countByName" resultType="java.lang.Integer">
select count(*) from io_unit_maintain where name = #{name} and customerId = #{customerId} select count(*)
from io_unit_maintain
where name = #{name}
and customerId = #{customerId}
</select> </select>
</mapper> </mapper>

@ -2,26 +2,21 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.udi.admin.dao.inout.WarehouseBussinessTypeDao"> <mapper namespace="com.glxp.udi.admin.dao.inout.WarehouseBussinessTypeDao">
<resultMap id="BaseResultMap" type="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity"> <resultMap id="BaseResultMap" type="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity">
<!--@mbg.generated-->
<!--@Table inv_warehouse_bussiness_type-->
<id column="id" jdbcType="INTEGER" property="id"/> <id column="id" jdbcType="INTEGER" property="id"/>
<result column="code" jdbcType="VARCHAR" property="code"/> <result column="code" jdbcType="VARCHAR" property="code"/>
<result column="action" jdbcType="VARCHAR" property="action"/> <result column="action" jdbcType="VARCHAR" property="action"/>
<result column="name" jdbcType="VARCHAR" property="name"/> <result column="name" jdbcType="VARCHAR" property="name"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated-->
id, code, `action`, `name` id, code, `action`, `name`
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from inv_warehouse_bussiness_type from inv_warehouse_bussiness_type
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete from inv_warehouse_bussiness_type delete from inv_warehouse_bussiness_type
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</delete> </delete>
@ -34,7 +29,6 @@
</insert> </insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" <insert id="insertSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true"> parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into inv_warehouse_bussiness_type insert into inv_warehouse_bussiness_type
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="code != null"> <if test="code != null">
@ -61,7 +55,6 @@
</insert> </insert>
<update id="updateByPrimaryKeySelective" <update id="updateByPrimaryKeySelective"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity"> parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity">
<!--@mbg.generated-->
update inv_warehouse_bussiness_type update inv_warehouse_bussiness_type
<set> <set>
<if test="code != null"> <if test="code != null">
@ -77,7 +70,6 @@
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity"> <update id="updateByPrimaryKey" parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity">
<!--@mbg.generated-->
update inv_warehouse_bussiness_type update inv_warehouse_bussiness_type
set code = #{code,jdbcType=VARCHAR}, set code = #{code,jdbcType=VARCHAR},
`action` = #{action,jdbcType=VARCHAR}, `action` = #{action,jdbcType=VARCHAR},
@ -85,7 +77,6 @@
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<update id="updateBatch" parameterType="java.util.List"> <update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated-->
update inv_warehouse_bussiness_type update inv_warehouse_bussiness_type
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<trim prefix="code = case" suffix="end,"> <trim prefix="code = case" suffix="end,">
@ -110,7 +101,6 @@
</foreach> </foreach>
</update> </update>
<update id="updateBatchSelective" parameterType="java.util.List"> <update id="updateBatchSelective" parameterType="java.util.List">
<!--@mbg.generated-->
update inv_warehouse_bussiness_type update inv_warehouse_bussiness_type
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<trim prefix="code = case" suffix="end,"> <trim prefix="code = case" suffix="end,">
@ -141,7 +131,6 @@
</foreach> </foreach>
</update> </update>
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true"> <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into inv_warehouse_bussiness_type insert into inv_warehouse_bussiness_type
(code, `action`, `name`) (code, `action`, `name`)
values values
@ -152,7 +141,6 @@
</insert> </insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" <insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true"> parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into inv_warehouse_bussiness_type insert into inv_warehouse_bussiness_type
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -183,7 +171,6 @@
</insert> </insert>
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" <insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true"> parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into inv_warehouse_bussiness_type insert into inv_warehouse_bussiness_type
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">

@ -2,8 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.udi.admin.dao.inout.WarehouseUserDao"> <mapper namespace="com.glxp.udi.admin.dao.inout.WarehouseUserDao">
<resultMap id="BaseResultMap" type="com.glxp.udi.admin.entity.inout.WarehouseUserEntity"> <resultMap id="BaseResultMap" type="com.glxp.udi.admin.entity.inout.WarehouseUserEntity">
<!--@mbg.generated-->
<!--@Table inv_warehouse_user-->
<id column="id" jdbcType="INTEGER" property="id"/> <id column="id" jdbcType="INTEGER" property="id"/>
<result column="code" jdbcType="VARCHAR" property="code"/> <result column="code" jdbcType="VARCHAR" property="code"/>
<result column="userId" jdbcType="BIGINT" property="userid"/> <result column="userId" jdbcType="BIGINT" property="userid"/>
@ -11,32 +9,30 @@
<result column="isDirector" javaType="boolean" property="isDirector"/> <result column="isDirector" javaType="boolean" property="isDirector"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> id,
id, code, userId, userName, isDirector code,
userId,
userName,
isDirector
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from inv_warehouse_user from inv_warehouse_user
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated--> delete
delete from inv_warehouse_user from inv_warehouse_user
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</delete> </delete>
<insert id="insert" keyColumn="id" keyProperty="id" <insert id="insert" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true"> parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true">
<!--@mbg.generated--> insert into inv_warehouse_user (code, userId, userName, isDirector)
insert into inv_warehouse_user (code, userId, userName, isDirector values (#{code,jdbcType=VARCHAR}, #{userid,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{isDirector})
)
values (#{code,jdbcType=VARCHAR}, #{userid,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{isDirector}
)
</insert> </insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" <insert id="insertSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true"> parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into inv_warehouse_user insert into inv_warehouse_user
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="code != null"> <if test="code != null">
@ -64,7 +60,6 @@
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity"> <update id="updateByPrimaryKeySelective" parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity">
<!--@mbg.generated-->
update inv_warehouse_user update inv_warehouse_user
<set> <set>
<if test="code != null"> <if test="code != null">
@ -81,16 +76,13 @@
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity"> <update id="updateByPrimaryKey" parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity">
<!--@mbg.generated-->
update inv_warehouse_user update inv_warehouse_user
set code = #{code,jdbcType=VARCHAR}, set code = #{code,jdbcType=VARCHAR},
userId = #{userid,jdbcType=BIGINT}, userId = #{userid,jdbcType=BIGINT},
userName = #{username,jdbcType=VARCHAR} userName = #{username,jdbcType=VARCHAR} isDirector = #{isDirector}
isDirector = #{isDirector}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<update id="updateBatch" parameterType="java.util.List"> <update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated-->
update inv_warehouse_user update inv_warehouse_user
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<trim prefix="code = case" suffix="end,"> <trim prefix="code = case" suffix="end,">
@ -115,7 +107,6 @@
</foreach> </foreach>
</update> </update>
<update id="updateBatchSelective" parameterType="java.util.List"> <update id="updateBatchSelective" parameterType="java.util.List">
<!--@mbg.generated-->
update inv_warehouse_user update inv_warehouse_user
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<trim prefix="code = case" suffix="end,"> <trim prefix="code = case" suffix="end,">
@ -146,19 +137,16 @@
</foreach> </foreach>
</update> </update>
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true"> <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into inv_warehouse_user insert into inv_warehouse_user
(code, userId, userName, isDirector) (code, userId, userName, isDirector)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.code,jdbcType=VARCHAR}, #{item.userid,jdbcType=BIGINT}, #{item.username,jdbcType=VARCHAR}, (#{item.code,jdbcType=VARCHAR}, #{item.userid,jdbcType=BIGINT}, #{item.username,jdbcType=VARCHAR},
#{item.isDirector} #{item.isDirector})
)
</foreach> </foreach>
</insert> </insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" <insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true"> parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into inv_warehouse_user insert into inv_warehouse_user
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -191,7 +179,6 @@
</insert> </insert>
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" <insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true"> parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into inv_warehouse_user insert into inv_warehouse_user
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -270,6 +257,8 @@
</update> </update>
<select id="selectCodeByUserId" resultType="java.lang.String"> <select id="selectCodeByUserId" resultType="java.lang.String">
select code from inv_warehouse_user where userId = #{userId} select code
from inv_warehouse_user
where userId = #{userId}
</select> </select>
</mapper> </mapper>

@ -2,10 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.inventory.InvStockPrintDao"> <mapper namespace="com.glxp.udi.admin.dao.inventory.InvStockPrintDao">
<select id="filterStockPrint" parameterType="com.glxp.udi.admin.req.basic.FilterStockprintRequest" <select id="filterStockPrint" parameterType="com.glxp.udi.admin.req.basic.FilterStockprintRequest"
resultType="com.glxp.udi.admin.entity.basic.StockPrintEntity"> resultType="com.glxp.udi.admin.entity.basic.StockPrintEntity">
SELECT * FROM inv_stockprint SELECT *
FROM inv_stockprint
<where> <where>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND inv_stockprint.nameCode = #{nameCode} AND inv_stockprint.nameCode = #{nameCode}
@ -40,22 +40,30 @@
<if test="id != '' and id != null"> <if test="id != '' and id != null">
AND inv_stockprint.id = #{id} AND inv_stockprint.id = #{id}
</if> </if>
</where> </where>
</select> </select>
<select id="filterJoinStockPrint" parameterType="com.glxp.udi.admin.req.basic.FilterStockprintRequest" <select id="filterJoinStockPrint" parameterType="com.glxp.udi.admin.req.basic.FilterStockprintRequest"
resultType="com.glxp.udi.admin.entity.basic.StockPrintEntity"> resultType="com.glxp.udi.admin.entity.basic.StockPrintEntity">
SELECT SELECT inv_stockprint.id,
inv_stockprint.id, inv_stockprint.udiCode,
inv_stockprint.udiCode,inv_stockprint.nameCode,inv_stockprint.batchNo,inv_stockprint.produceDate, inv_stockprint.nameCode,
inv_stockprint.expireDate,inv_stockprint.serialNo,inv_stockprint.warehouseCode,inv_stockprint.spaceCode, inv_stockprint.batchNo,
inv_stockprint.count,basic_products.cpmctymc,basic_products.ylqxzcrbarmc,basic_products.zczbhhzbapzbh,basic_products.ggxh,basic_udirel.manufactory inv_stockprint.produceDate,
inv_stockprint.expireDate,
inv_stockprint.serialNo,
inv_stockprint.warehouseCode,
inv_stockprint.spaceCode,
inv_stockprint.count,
io_productinfo.cpmctymc,
io_productinfo.ylqxzcrbarmc,
io_productinfo.zczbhhzbapzbh,
io_productinfo.ggxh,
io_productinfo.manufactory
FROM inv_stockprint FROM inv_stockprint
left join basic_udirel ON inv_stockprint.udiRlIdFk = basic_udirel.id left join udi_relevance ON inv_stockprint.udiRlIdFk = udi_relevance.id
inner join basic_products ON basic_products.uuid = basic_udirel.uuid inner join io_productinfo ON io_productinfo.uuid = udi_relevance.uuid
<where> <where>
<if test="nameCode != '' and nameCode != null"> <if test="nameCode != '' and nameCode != null">
AND inv_stockprint.nameCode = #{nameCode} AND inv_stockprint.nameCode = #{nameCode}
@ -91,18 +99,16 @@
AND inv_stockprint.id = #{id} AND inv_stockprint.id = #{id}
</if> </if>
and diType = 1 and diType = 1
</where> </where>
</select> </select>
<select id="findByNameCode" parameterType="java.lang.String" <select id="findByNameCode" parameterType="java.lang.String"
resultType="com.glxp.udi.admin.entity.basic.StockPrintEntity"> resultType="com.glxp.udi.admin.entity.basic.StockPrintEntity">
SELECT * SELECT *
FROM inv_stockprint FROM inv_stockprint
WHERE ( WHERE (
nameCode = #{nameCode}) limit 1 nameCode = #{nameCode})
limit 1
</select> </select>
<select id="findByRlId" parameterType="com.glxp.udi.admin.req.basic.FilterStockprintRequest" <select id="findByRlId" parameterType="com.glxp.udi.admin.req.basic.FilterStockprintRequest"
resultType="com.glxp.udi.admin.entity.basic.StockPrintEntity"> resultType="com.glxp.udi.admin.entity.basic.StockPrintEntity">
@ -114,18 +120,15 @@
and spaceCode = #{spaceCode} and spaceCode = #{spaceCode}
and genKeyFk = #{genKeyFk}limit 1 and genKeyFk = #{genKeyFk}limit 1
</select> </select>
<insert id="insertStockPrint" keyProperty="id" parameterType="com.glxp.udi.admin.entity.basic.StockPrintEntity"> <insert id="insertStockPrint" keyProperty="id" parameterType="com.glxp.udi.admin.entity.basic.StockPrintEntity">
replace replace
INTO inv_stockprint INTO inv_stockprint
( (udiCode, udiRlIdFk, nameCode, cpmctymc, batchNo,
udiCode,udiRlIdFk,nameCode,cpmctymc,batchNo,
produceDate, expireDate, serialNo, codeType, thirdId, thirdName, produceDate, expireDate, serialNo, codeType, thirdId, thirdName,
ggxh, ylqxzcrbarmc, zczbhhzbapzbh, warehouseName, warehouseCode, spaceCode, spaceName, genKeyFk, thirdSysFk ggxh, ylqxzcrbarmc, zczbhhzbapzbh, warehouseName, warehouseCode, spaceCode, spaceName, genKeyFk, thirdSysFk
,sOrderId,sDetailId,updateTime,count , sOrderId, sDetailId, updateTime, count)
) values (#{udiCode},
values
(
#{udiCode},
#{udiRlIdFk}, #{udiRlIdFk},
#{nameCode}, #{nameCode},
#{cpmctymc}, #{cpmctymc},
@ -148,24 +151,19 @@
#{sOrderId}, #{sOrderId},
#{sDetailId}, #{sDetailId},
#{updateTime}, #{updateTime},
#{count} #{count})
)
</insert> </insert>
<insert id="insertStockPrints" keyProperty="id" parameterType="java.util.List"> <insert id="insertStockPrints" keyProperty="id" parameterType="java.util.List">
replace INTO inv_stockprint replace INTO inv_stockprint
( (udiCode, udiRlIdFk, nameCode, cpmctymc, batchNo,
udiCode,udiRlIdFk,nameCode,cpmctymc,batchNo,
produceDate, expireDate, serialNo, codeType, thirdId, thirdName, produceDate, expireDate, serialNo, codeType, thirdId, thirdName,
ggxh, ylqxzcrbarmc, zczbhhzbapzbh, warehouseName, warehouseCode, spaceCode, spaceName, genKeyFk, thirdSysFk ggxh, ylqxzcrbarmc, zczbhhzbapzbh, warehouseName, warehouseCode, spaceCode, spaceName, genKeyFk, thirdSysFk
,sOrderId,sDetailId,updateTime,count , sOrderId, sDetailId, updateTime, count)
)
values values
<foreach collection="stockPrintEntities" item="item" index="index" <foreach collection="stockPrintEntities" item="item" index="index"
separator=","> separator=",">
( (#{item.udiCode},
#{item.udiCode},
#{item.udiRlIdFk}, #{item.udiRlIdFk},
#{item.nameCode}, #{item.nameCode},
#{item.cpmctymc}, #{item.cpmctymc},
@ -181,8 +179,7 @@
#{item.zczbhhzbapzbh}, #{item.zczbhhzbapzbh},
#{item.warehouseName}, #{item.warehouseName},
#{item.warehouseCode}, #{item.spaceCode}, #{item.spaceName}, #{item.genKeyFk}, #{item.thirdSysFk} #{item.warehouseCode}, #{item.spaceCode}, #{item.spaceName}, #{item.genKeyFk}, #{item.thirdSysFk}
,#{item.sOrderId},#{item.sDetailId},#{item.updateTime},#{item.count} , #{item.sOrderId}, #{item.sDetailId}, #{item.updateTime}, #{item.count})
)
</foreach> </foreach>
</insert> </insert>
@ -201,36 +198,79 @@
<update id="updateStockPrint" parameterType="com.glxp.udi.admin.entity.basic.StockPrintEntity"> <update id="updateStockPrint" parameterType="com.glxp.udi.admin.entity.basic.StockPrintEntity">
UPDATE inv_stockprint UPDATE inv_stockprint
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="udiCode != null">udiCode=#{udiCode},</if> <if test="udiCode != null">
<if test="udiRlIdFk != null">udiRlIdFk=#{udiRlIdFk},</if> udiCode=#{udiCode},
<if test="nameCode != null">nameCode=#{nameCode},</if> </if>
<if test="cpmctymc != null">cpmctymc=#{cpmctymc},</if> <if test="udiRlIdFk != null">
<if test="batchNo != null">batchNo=#{batchNo},</if> udiRlIdFk=#{udiRlIdFk},
<if test="produceDate != null">produceDate=#{produceDate},</if> </if>
<if test="expireDate != null">expireDate=#{expireDate},</if> <if test="nameCode != null">
<if test="serialNo != null">serialNo=#{serialNo},</if> nameCode=#{nameCode},
<if test="codeType != null">codeType=#{codeType},</if> </if>
<if test="thirdId != null">thirdId=#{thirdId},</if> <if test="cpmctymc != null">
<if test="thirdName != null">thirdName=#{thirdName},</if> cpmctymc=#{cpmctymc},
<if test="printStatus != null">printStatus=#{printStatus},</if> </if>
<if test="ggxh != null">ggxh=#{ggxh},</if> <if test="batchNo != null">
<if test="ylqxzcrbarmc != null">ylqxzcrbarmc=#{ylqxzcrbarmc},</if> batchNo=#{batchNo},
<if test="zczbhhzbapzbh != null">zczbhhzbapzbh=#{zczbhhzbapzbh},</if> </if>
<if test="warehouseName != null">warehouseName=#{warehouseName},</if> <if test="produceDate != null">
<if test="warehouseCode != null">warehouseCode=#{warehouseCode},</if> produceDate=#{produceDate},
<if test="spaceCode != null">spaceCode=#{spaceCode},</if> </if>
<if test="spaceName != null">spaceName=#{spaceName},</if> <if test="expireDate != null">
<if test="genKeyFk != null">genKeyFk=#{genKeyFk},</if> expireDate=#{expireDate},
<if test="sOrderId != null">sOrderId=#{sOrderId},</if> </if>
<if test="sDetailId != null">sDetailId=#{sDetailId},</if> <if test="serialNo != null">
<if test="count != null">`count`=#{count},</if> serialNo=#{serialNo},
</if>
<if test="codeType != null">
codeType=#{codeType},
</if>
<if test="thirdId != null">
thirdId=#{thirdId},
</if>
<if test="thirdName != null">
thirdName=#{thirdName},
</if>
<if test="printStatus != null">
printStatus=#{printStatus},
</if>
<if test="ggxh != null">
ggxh=#{ggxh},
</if>
<if test="ylqxzcrbarmc != null">
ylqxzcrbarmc=#{ylqxzcrbarmc},
</if>
<if test="zczbhhzbapzbh != null">
zczbhhzbapzbh=#{zczbhhzbapzbh},
</if>
<if test="warehouseName != null">
warehouseName=#{warehouseName},
</if>
<if test="warehouseCode != null">
warehouseCode=#{warehouseCode},
</if>
<if test="spaceCode != null">
spaceCode=#{spaceCode},
</if>
<if test="spaceName != null">
spaceName=#{spaceName},
</if>
<if test="genKeyFk != null">
genKeyFk=#{genKeyFk},
</if>
<if test="sOrderId != null">
sOrderId=#{sOrderId},
</if>
<if test="sDetailId != null">
sDetailId=#{sDetailId},
</if>
<if test="count != null">
`count`=#{count},
</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<update id="updatePrintStatus" parameterType="java.util.List"> <update id="updatePrintStatus" parameterType="java.util.List">
update inv_stockprint update inv_stockprint
set printStatus = 1 set printStatus = 1

@ -2,48 +2,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.inventory.InvWarehouseDao"> <mapper namespace="com.glxp.udi.admin.dao.inventory.InvWarehouseDao">
<select id="filterInvWarehouse" parameterType="com.glxp.udi.admin.req.inventory.FilterInvWarehouseRequest"
resultType="com.glxp.udi.admin.entity.inventory.InvWarehouseEntity">
select * ,(select name from inv_warehouse WHERE a.pcode = code) pName
FROM inv_warehouse a
<where>
<if test="id != '' and id != null">
AND a.id = #{request.id}
</if>
<if test="pid != '' and pid != null">
AND a.pid = #{request.pid}
</if>
<if test="code != '' and code != null">
AND a.code = #{request.code}
</if>
<if test="name != '' and name != null">
AND a.name like concat('%',#{request.name},'%')
</if>
<if test="advanceType != null">
AND a.advanceType = #{request.advanceType}
</if>
<if test="status != null">
AND a.status = #{request.status}
</if>
<if test="isDefault != null">
AND a.isDefault = #{request.isDefault}
</if>
<if test="pcode != null">
AND a.pcode = #{request.pcode}
</if>
<if test="level != null">
AND a.level = #{request.level}
</if>
<if test="customerId != null and customerId != ''">
AND a.customerId = #{request.customerId}
</if>
</where>
</select>
<select id="filterAllByUser" parameterType="com.glxp.udi.admin.req.inventory.FilterInvWarehouseRequest" <select id="filterAllByUser" parameterType="com.glxp.udi.admin.req.inventory.FilterInvWarehouseRequest"
resultType="com.glxp.udi.admin.entity.inventory.InvWarehouseEntity"> resultType="com.glxp.udi.admin.entity.inventory.InvWarehouseEntity">
select inv_warehouse.* from inv_warehouse INNER JOIN inv_warehouse_user select inv_warehouse.*
from inv_warehouse
INNER JOIN inv_warehouse_user
on inv_warehouse.`code` = inv_warehouse_user.code on inv_warehouse.`code` = inv_warehouse_user.code
<where> <where>
<if test="id != '' and id != null"> <if test="id != '' and id != null">
@ -76,12 +39,12 @@
</if> </if>
</where> </where>
group by inv_warehouse.code group by inv_warehouse.code
</select> </select>
<select id="selectMaxCode" parameterType="com.glxp.udi.admin.req.inventory.FilterInvWarehouseRequest" <select id="selectMaxCode" parameterType="com.glxp.udi.admin.req.inventory.FilterInvWarehouseRequest"
resultType="com.glxp.udi.admin.entity.inventory.InvWarehouseEntity"> resultType="com.glxp.udi.admin.entity.inventory.InvWarehouseEntity">
select max(code) as code from inv_warehouse select max(code) as code
from inv_warehouse
<where> <where>
<if test="id != '' and id != null"> <if test="id != '' and id != null">
AND id = #{id} AND id = #{id}
@ -108,13 +71,12 @@
AND level = #{level} AND level = #{level}
</if> </if>
</where> </where>
</select> </select>
<select id="filterGroupInvWarehouse" parameterType="com.glxp.udi.admin.req.inventory.FilterInvWarehouseRequest" <select id="filterGroupInvWarehouse" parameterType="com.glxp.udi.admin.req.inventory.FilterInvWarehouseRequest"
resultType="com.glxp.udi.admin.res.inventory.InvWarehouseResponse"> resultType="com.glxp.udi.admin.entity.inventory.InvWarehouseEntity">
SELECT * FROM inv_warehouse SELECT *
FROM inv_warehouse
<where> <where>
<if test="id != '' and id != null"> <if test="id != '' and id != null">
AND id = #{id} AND id = #{id}
@ -141,13 +103,14 @@
AND customerId = #{customerId} AND customerId = #{customerId}
</if> </if>
</where> </where>
</select> </select>
<select id="getNameByCode" resultType="java.lang.String"> <select id="getNameByCode" resultType="java.lang.String">
select name select name
from inv_warehouse from inv_warehouse
where code = #{fromCorpId} where code = #{fromCorpId}
</select> </select>
<insert id="insertInvWarehouse" keyProperty="id" <insert id="insertInvWarehouse" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inventory.InvWarehouseEntity"> parameterType="com.glxp.udi.admin.entity.inventory.InvWarehouseEntity">
replace INTO inv_warehouse replace INTO inv_warehouse
@ -169,21 +132,51 @@
<update id="updateInvWarehouse" parameterType="com.glxp.udi.admin.entity.inventory.InvWarehouseEntity"> <update id="updateInvWarehouse" parameterType="com.glxp.udi.admin.entity.inventory.InvWarehouseEntity">
UPDATE inv_warehouse UPDATE inv_warehouse
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
<if test="pid != null">pid=#{pid},</if> <if test="pid != null">
<if test="name != null">name=#{name},</if> pid=#{pid},
<if test="code != null">code=#{code},</if> </if>
<if test="advanceType != null">advanceType=#{advanceType},</if> <if test="name != null">
<if test="isDefault != null">isDefault=#{isDefault},</if> name=#{name},
<if test="status != null">status=#{status},</if> </if>
<if test="updateTime != null">updateTime=#{updateTime},</if> <if test="code != null">
<if test="remark != null">remark=#{remark},</if> code=#{code},
<if test="level != null">level=#{level},</if> </if>
<if test="pcode != null">pcode=#{pcode},</if> <if test="advanceType != null">
<if test="thirdId != null">remark=#{thirdId},</if> advanceType=#{advanceType},
<if test="thirdId1 != null">remark=#{thirdId1},</if> </if>
<if test="thirdId2 != null">remark=#{thirdId2},</if> <if test="isDefault != null">
<if test="thirdId3 != null">remark=#{thirdId3},</if> isDefault=#{isDefault},
<if test="thirdId4 != null">remark=#{thirdId4},</if> </if>
<if test="status != null">
status=#{status},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="remark != null">
remark=#{remark},
</if>
<if test="level != null">
level=#{level},
</if>
<if test="pcode != null">
pcode=#{pcode},
</if>
<if test="thirdId != null">
remark=#{thirdId},
</if>
<if test="thirdId1 != null">
remark=#{thirdId1},
</if>
<if test="thirdId2 != null">
remark=#{thirdId2},
</if>
<if test="thirdId3 != null">
remark=#{thirdId3},
</if>
<if test="thirdId4 != null">
remark=#{thirdId4},
</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
@ -212,10 +205,16 @@
</update> </update>
<select id="selectNameByCode" resultType="java.lang.String"> <select id="selectNameByCode" resultType="java.lang.String">
select name from inv_warehouse where code = #{code} select name
from inv_warehouse
where code = #{code}
</select> </select>
<select id="count" resultType="java.lang.Integer"> <select id="count" resultType="java.lang.Integer">
select count(*) from inv_warehouse where name = #{name} and customerId = #{customerId} and code = #{code} select count(*)
from inv_warehouse
where name = #{name}
and customerId = #{customerId}
and code = #{code}
</select> </select>
</mapper> </mapper>

@ -2,25 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.inventory.StockPrintTempDao"> <mapper namespace="com.glxp.udi.admin.dao.inventory.StockPrintTempDao">
<select id="filterStockPrintTempEntity" parameterType="com.glxp.udi.admin.req.inventory.FilterStPrintTempRequest"
resultType="com.glxp.udi.admin.entity.inventory.StockPrintTempEntity">
SELECT * FROM inv_stockprint_pdf_temp
<where>
<if test="printCodeIdFk != '' and printCodeIdFk != null">
AND printCodeIdFk = #{printCodeIdFk}
</if>
<if test="id != '' and id != null">
AND id = #{id}
</if>
<if test="stockOrderFk != '' and stockOrderFk != null">
AND stockOrderFk = #{stockOrderFk}
</if>
</where>
</select>
<insert id="insertStockPrintTempEntity" keyProperty="id" <insert id="insertStockPrintTempEntity" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inventory.StockPrintTempEntity"> parameterType="com.glxp.udi.admin.entity.inventory.StockPrintTempEntity">
insert INTO inv_stockprint_pdf_temp insert INTO inv_stockprint_pdf_temp
@ -31,7 +12,6 @@
#{printCodeIdFk}, #{stockOrderFk}, #{genKey}) #{printCodeIdFk}, #{stockOrderFk}, #{genKey})
</insert> </insert>
<delete id="delete" parameterType="com.glxp.udi.admin.req.inventory.DeleteStPrintTempRequest"> <delete id="delete" parameterType="com.glxp.udi.admin.req.inventory.DeleteStPrintTempRequest">
DELETE DELETE
FROM inv_stockprint_pdf_temp FROM inv_stockprint_pdf_temp
@ -51,13 +31,22 @@
<update id="updateStockPrintTempEntity" parameterType="com.glxp.udi.admin.entity.inventory.InCodeLogEntity"> <update id="updateStockPrintTempEntity" parameterType="com.glxp.udi.admin.entity.inventory.InCodeLogEntity">
UPDATE inv_stockprint_pdf_temp UPDATE inv_stockprint_pdf_temp
<set> <set>
<if test="fileName != null">fileName=#{fileName},</if> <if test="fileName != null">
<if test="filePath != null">filePath=#{filePath},</if> fileName=#{fileName},
<if test="status != null">status=#{status},</if> </if>
<if test="printCodeIdFk != null">printCodeIdFk=#{printCodeIdFk},</if> <if test="filePath != null">
<if test="stockOrderFk != null">stockOrderFk=#{stockOrderFk},</if> filePath=#{filePath},
</if>
<if test="status != null">
status=#{status},
</if>
<if test="printCodeIdFk != null">
printCodeIdFk=#{printCodeIdFk},
</if>
<if test="stockOrderFk != null">
stockOrderFk=#{stockOrderFk},
</if>
</set> </set>
WHERE genKey = #{genKey} WHERE genKey = #{genKey}
</update> </update>
</mapper> </mapper>

@ -11,12 +11,15 @@
<select id="findSystemExcelTemplateByName" parameterType="java.lang.String" <select id="findSystemExcelTemplateByName" parameterType="java.lang.String"
resultType="com.glxp.udi.admin.entity.param.SystemExcelTemplateEntity"> resultType="com.glxp.udi.admin.entity.param.SystemExcelTemplateEntity">
SELECT * FROM system_excel_template where name = #{name} SELECT *
FROM system_excel_template
where name = #{name}
</select> </select>
<select id="getSystemExcelTemplate" parameterType="com.glxp.udi.admin.req.param.SystemExcelTemplateRequest" <select id="getSystemExcelTemplate" parameterType="com.glxp.udi.admin.req.param.SystemExcelTemplateRequest"
resultType="com.glxp.udi.admin.entity.param.SystemExcelTemplateEntity"> resultType="com.glxp.udi.admin.entity.param.SystemExcelTemplateEntity">
SELECT * FROM system_excel_template SELECT *
FROM system_excel_template
<where> <where>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and name like concat('%', #{name}, '%') and name like concat('%', #{name}, '%')
@ -47,12 +50,11 @@
</update> </update>
<insert id="insertSystemExcelTemplate" parameterType="com.glxp.udi.admin.entity.param.SystemExcelTemplateEntity"> <insert id="insertSystemExcelTemplate" parameterType="com.glxp.udi.admin.entity.param.SystemExcelTemplateEntity">
INSERT INTO system_excel_template(name,filePath,remark,create_time,update_time) values INSERT INTO system_excel_template(name, filePath, remark, create_time, update_time)
( #{name}, values (#{name},
#{filePath}, #{filePath},
#{remark}, #{remark},
#{create_time}, #{create_time},
#{update_time}) #{update_time})
</insert> </insert>
</mapper> </mapper>

@ -2,19 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.param.SystemPDFModuleDao"> <mapper namespace="com.glxp.udi.admin.dao.param.SystemPDFModuleDao">
<select id="queryPage" parameterType="com.glxp.udi.admin.req.param.SystemPDFModuleRequest"
resultType="com.glxp.udi.admin.entity.param.SystemPDFModuleEntity">
SELECT id,name,param,fieldExplain,remark,templateId,create_time,update_time,templateDlUrl,templateType
FROM system_pdf_module
<where>
<if test="templateId != null and '' != templateId">
AND `templateId` LIKE CONCAT(#{templateId},'%')
</if>
<if test="name != null and '' != name">
AND `name` LIKE CONCAT('%', #{name}, '%')
</if>
</where>
</select>
<update id="updateById" parameterType="com.glxp.udi.admin.entity.param.SystemPDFModuleEntity"> <update id="updateById" parameterType="com.glxp.udi.admin.entity.param.SystemPDFModuleEntity">
UPDATE system_pdf_module UPDATE system_pdf_module
@ -51,18 +38,15 @@
</update> </update>
<insert id="insertData" parameterType="com.glxp.udi.admin.entity.param.SystemPDFModuleEntity"> <insert id="insertData" parameterType="com.glxp.udi.admin.entity.param.SystemPDFModuleEntity">
insert INTO insert INTO system_pdf_module(name, param, fieldExplain, remark, templateId, create_time, update_time,
system_pdf_module(name,param,fieldExplain,remark,templateId,create_time,update_time,templateDlUrl,templateType templateDlUrl, templateType)
) values values (#{name},
(
#{name},
#{param}, #{param},
#{fieldExplain}, #{fieldExplain},
#{templateId}, #{templateId},
#{remark}, #{remark},
#{create_time}, #{create_time},
#{update_time},#{templateDlUrl},#{templateType} #{update_time}, #{templateDlUrl}, #{templateType})
)
</insert> </insert>
<select id="listPDFModules" parameterType="java.lang.Integer" <select id="listPDFModules" parameterType="java.lang.Integer"
@ -70,5 +54,4 @@
SELECT id, name SELECT id, name
FROM system_pdf_module FROM system_pdf_module
</select> </select>
</mapper> </mapper>

@ -2,7 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.param.SystemPDFTemplateDao"> <mapper namespace="com.glxp.udi.admin.dao.param.SystemPDFTemplateDao">
<update id="updateById" parameterType="com.glxp.udi.admin.entity.param.SystemPDFTemplateEntity"> <update id="updateById" parameterType="com.glxp.udi.admin.entity.param.SystemPDFTemplateEntity">
UPDATE system_pdf_template UPDATE system_pdf_template
<set> <set>
@ -51,10 +50,10 @@
SELECT id, name SELECT id, name
FROM system_pdf_template FROM system_pdf_template
</select> </select>
<select id="countByName" resultType="java.lang.Integer"> <select id="countByName" resultType="java.lang.Integer">
select count(*) select count(*)
from system_pdf_template from system_pdf_template
where name = #{name} where name = #{name}
</select> </select>
</mapper> </mapper>

@ -10,11 +10,14 @@
<select id="filterList" parameterType="com.glxp.udi.admin.req.itextpdf.SystemPDFTemplateRelevanceRequest" <select id="filterList" parameterType="com.glxp.udi.admin.req.itextpdf.SystemPDFTemplateRelevanceRequest"
resultType="com.glxp.udi.admin.res.param.SystemPDFTemplateRelevanceResponse"> resultType="com.glxp.udi.admin.res.param.SystemPDFTemplateRelevanceResponse">
select basic_bussiness_type.`name` localActionName,system_pdf_template_relevance.id, select basic_bussiness_type.`name` localActionName,
system_pdf_template_relevance.id,
basic_bussiness_type.action localAction, basic_bussiness_type.action localAction,
templateId, templateId,
moduleId, moduleId,
system_pdf_template_relevance.remark1, system_pdf_template_relevance.remark2,system_pdf_template_relevance.remark3, system_pdf_template_relevance.remark1,
system_pdf_template_relevance.remark2,
system_pdf_template_relevance.remark3,
system_pdf_template.name templateName system_pdf_template.name templateName
from basic_bussiness_type from basic_bussiness_type
LEFT JOIN system_pdf_template_relevance LEFT JOIN system_pdf_template_relevance
@ -36,11 +39,14 @@
<select id="filterAll" parameterType="com.glxp.udi.admin.req.itextpdf.SystemPDFTemplateRelevanceRequest" <select id="filterAll" parameterType="com.glxp.udi.admin.req.itextpdf.SystemPDFTemplateRelevanceRequest"
resultType="com.glxp.udi.admin.res.param.SystemPDFTemplateRelevanceResponse"> resultType="com.glxp.udi.admin.res.param.SystemPDFTemplateRelevanceResponse">
select basic_bussiness_type.`name` localActionName,system_pdf_template_relevance.id, select basic_bussiness_type.`name` localActionName,
system_pdf_template_relevance.id,
basic_bussiness_type.action localAction, basic_bussiness_type.action localAction,
templateId, templateId,
moduleId, moduleId,
system_pdf_template_relevance.remark1, system_pdf_template_relevance.remark2,system_pdf_template_relevance.remark3, system_pdf_template_relevance.remark1,
system_pdf_template_relevance.remark2,
system_pdf_template_relevance.remark3,
system_pdf_template.name templateName system_pdf_template.name templateName
from basic_bussiness_type from basic_bussiness_type
LEFT JOIN system_pdf_template_relevance LEFT JOIN system_pdf_template_relevance
@ -91,13 +97,11 @@
ignore ignore
INTO system_pdf_template_relevance INTO system_pdf_template_relevance
(templateId, customerId, adminId, moduleId, localAction) (templateId, customerId, adminId, moduleId, localAction)
values ( values (#{templateId},
#{templateId},
#{customerId}, #{customerId},
#{adminId}, #{adminId},
#{moduleId}, #{moduleId},
#{localAction} #{localAction})
)
</insert> </insert>
<update id="udpateRl" parameterType="com.glxp.udi.admin.entity.param.SystemPDFTemplateRelevanceEntity"> <update id="udpateRl" parameterType="com.glxp.udi.admin.entity.param.SystemPDFTemplateRelevanceEntity">
@ -127,9 +131,7 @@
<if test="remark3 != null"> <if test="remark3 != null">
remark3=#{remark3}, remark3=#{remark3},
</if> </if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
</mapper> </mapper>

@ -2,7 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.udi.admin.dao.param.SystemParamConfigCustomerDao"> <mapper namespace="com.glxp.udi.admin.dao.param.SystemParamConfigCustomerDao">
<resultMap id="BaseResultMap" type="com.glxp.udi.admin.entity.param.SystemParamConfigCustomerEntity"> <resultMap id="BaseResultMap" type="com.glxp.udi.admin.entity.param.SystemParamConfigCustomerEntity">
<!--@Table system_param_config_customer--> <!--@Table system_param_config_customer-->
<id column="id" jdbcType="INTEGER" property="id"/> <id column="id" jdbcType="INTEGER" property="id"/>
<result column="parentId" jdbcType="INTEGER" property="parentId"/> <result column="parentId" jdbcType="INTEGER" property="parentId"/>
@ -14,17 +13,28 @@
<result column="paramExplain" jdbcType="VARCHAR" property="paramExplain"/> <result column="paramExplain" jdbcType="VARCHAR" property="paramExplain"/>
<result column="customerId" jdbcType="VARCHAR" property="customerId"/> <result column="customerId" jdbcType="VARCHAR" property="customerId"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, parentId, paramName, paramKey, paramValue, paramStatus, paramType, paramExplain, id,
parentId,
paramName,
paramKey,
paramValue,
paramStatus,
paramType,
paramExplain,
customerId customerId
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from system_param_config_customer from system_param_config_customer
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</select> </select>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.udi.admin.entity.param.SystemParamConfigCustomerEntity" useGeneratedKeys="true">
<insert id="insertSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.param.SystemParamConfigCustomerEntity" useGeneratedKeys="true">
insert into system_param_config_customer insert into system_param_config_customer
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="parentId != null"> <if test="parentId != null">
@ -79,7 +89,9 @@
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.udi.admin.entity.param.SystemParamConfigCustomerEntity">
<update id="updateByPrimaryKeySelective"
parameterType="com.glxp.udi.admin.entity.param.SystemParamConfigCustomerEntity">
update system_param_config_customer update system_param_config_customer
<set> <set>
<if test="parentId != null"> <if test="parentId != null">
@ -109,6 +121,7 @@
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.glxp.udi.admin.entity.param.SystemParamConfigCustomerEntity"> <update id="updateByPrimaryKey" parameterType="com.glxp.udi.admin.entity.param.SystemParamConfigCustomerEntity">
update system_param_config_customer update system_param_config_customer
set parentId = #{parentId,jdbcType=INTEGER}, set parentId = #{parentId,jdbcType=INTEGER},
@ -123,7 +136,8 @@
</update> </update>
<select id="selectCustomizeParam" resultMap="BaseResultMap"> <select id="selectCustomizeParam" resultMap="BaseResultMap">
select * from system_param_config_customer where paramStatus = #{systemParamConfigRequest.paramStatus} select *
from system_param_config_customer where paramStatus = #{systemParamConfigRequest.paramStatus}
and customerId = #{systemParamConfigRequest.customerId} and customerId = #{systemParamConfigRequest.customerId}
and paramKey in and paramKey in
<foreach collection="systemParams" index="index" item="item" open="(" close=")" separator=","> <foreach collection="systemParams" index="index" item="item" open="(" close=")" separator=",">
@ -132,10 +146,16 @@
</select> </select>
<select id="countByCustomerId" resultType="int"> <select id="countByCustomerId" resultType="int">
select count(*) from system_param_config_customer where paramKey = #{paramKey} and customerId = #{customerId} select count(*)
from system_param_config_customer
where paramKey = #{paramKey}
and customerId = #{customerId}
</select> </select>
<select id="selectByParamKeyAndCustomerId" resultMap="BaseResultMap"> <select id="selectByParamKeyAndCustomerId" resultMap="BaseResultMap">
select * from system_param_config_customer where paramKey = #{paramKey} and customerId = #{customerId} select *
from system_param_config_customer
where paramKey = #{paramKey}
and customerId = #{customerId}
</select> </select>
</mapper> </mapper>

@ -2,16 +2,18 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.param.SystemParamConfigDao"> <mapper namespace="com.glxp.udi.admin.dao.param.SystemParamConfigDao">
<select id="findSystemParamConfig" parameterType="com.glxp.udi.admin.req.param.SystemParamConfigRequest" <select id="findSystemParamConfig" parameterType="com.glxp.udi.admin.req.param.SystemParamConfigRequest"
resultType="com.glxp.udi.admin.entity.param.SystemParamConfigEntity"> resultType="com.glxp.udi.admin.entity.param.SystemParamConfigEntity">
SELECT * FROM system_param_config WHERE id=#{id} SELECT *
FROM system_param_config
WHERE id = #{id}
</select> </select>
<select id="selectByParamName" parameterType="com.glxp.udi.admin.req.param.SystemParamConfigRequest" <select id="selectByParamName" parameterType="com.glxp.udi.admin.req.param.SystemParamConfigRequest"
resultType="com.glxp.udi.admin.entity.param.SystemParamConfigEntity"> resultType="com.glxp.udi.admin.entity.param.SystemParamConfigEntity">
SELECT * FROM system_param_config WHERE paramName=#{paramName} SELECT *
FROM system_param_config
WHERE paramName = #{paramName}
</select> </select>
<update id="updateParentId" parameterType="com.glxp.udi.admin.entity.param.SystemParamConfigEntity"> <update id="updateParentId" parameterType="com.glxp.udi.admin.entity.param.SystemParamConfigEntity">
@ -26,20 +28,18 @@
<insert id="insertData" parameterType="com.glxp.udi.admin.entity.param.SystemParamConfigEntity"> <insert id="insertData" parameterType="com.glxp.udi.admin.entity.param.SystemParamConfigEntity">
insert INTO system_param_config(paramName, insert INTO system_param_config(paramName,
paramKey,paramValue,paramStatus,paramType,paramExplain paramKey, paramValue, paramStatus, paramType, paramExplain)
) values values (#{paramName},
(
#{paramName},
#{paramKey}, #{paramKey},
#{paramValue}, #{paramValue},
#{paramStatus}, #{paramStatus},
#{paramType}, #{paramType},
#{paramExplain} #{paramExplain})
)
</insert> </insert>
<select id="selectCustomizeParam" resultType="com.glxp.udi.admin.entity.param.SystemParamConfigEntity"> <select id="selectCustomizeParam" resultType="com.glxp.udi.admin.entity.param.SystemParamConfigEntity">
select * from system_param_config where paramKey in select *
from system_param_config where paramKey in
<foreach collection="systemParams" index="index" item="item" open="(" close=")" separator=","> <foreach collection="systemParams" index="index" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>

Loading…
Cancel
Save