Merge branch 'master' of http://git.xdadan.loc/tanex/emis-service
This commit is contained in:
commit
bc8603ecbc
@ -0,0 +1,132 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisTmsCustomerSiteController.java
|
||||
* @author heyu
|
||||
* @date 2025-08-11 04:52:26
|
||||
* @Copyright: ShangHai Duta 2025 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 月结客户网点维护 控制器 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.web.emis;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xdadan.erp.common.annotation.Log;
|
||||
import com.xdadan.erp.common.core.controller.BaseController;
|
||||
import com.xdadan.erp.common.core.domain.AjaxResult;
|
||||
import com.xdadan.erp.common.core.page.TableDataInfo;
|
||||
import com.xdadan.erp.common.enums.BusinessType;
|
||||
import com.xdadan.erp.common.utils.poi.ExcelUtil;
|
||||
|
||||
import com.xdadan.erp.emis.domain.EmisTmsCustomerSite;
|
||||
import com.xdadan.erp.emis.service.IEmisTmsCustomerSiteService;
|
||||
|
||||
/**
|
||||
* 月结客户网点维护Controller
|
||||
*
|
||||
* @author heyu
|
||||
* @date 2025-08-11 04:52:26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/emis/emisTmsCustomerSite")
|
||||
public class EmisTmsCustomerSiteController extends EmisBaseController {
|
||||
@Autowired
|
||||
private IEmisTmsCustomerSiteService emisTmsCustomerSiteService;
|
||||
|
||||
/**
|
||||
* 查询月结客户网点维护列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisTmsCustomerSite:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EmisTmsCustomerSite emisTmsCustomerSite) {
|
||||
startPage();
|
||||
List<EmisTmsCustomerSite> list = emisTmsCustomerSiteService.selectEmisTmsCustomerSiteList(emisTmsCustomerSite);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出月结客户网点维护列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisTmsCustomerSite:export')")
|
||||
@Log(title = "月结客户网点维护", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EmisTmsCustomerSite emisTmsCustomerSite) {
|
||||
List<EmisTmsCustomerSite> list = emisTmsCustomerSiteService.selectEmisTmsCustomerSiteList(emisTmsCustomerSite);
|
||||
ExcelUtil<EmisTmsCustomerSite> util = new ExcelUtil<EmisTmsCustomerSite>(EmisTmsCustomerSite.class);
|
||||
util.exportExcel(response, list, "月结客户网点维护数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取月结客户网点维护详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisTmsCustomerSite:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(emisTmsCustomerSiteService.selectEmisTmsCustomerSiteById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增月结客户网点维护
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisTmsCustomerSite:add')")
|
||||
@Log(title = "月结客户网点维护", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EmisTmsCustomerSite emisTmsCustomerSite) {
|
||||
return toAjax(emisTmsCustomerSiteService.insertEmisTmsCustomerSite(emisTmsCustomerSite));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改月结客户网点维护
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisTmsCustomerSite:edit')")
|
||||
@Log(title = "月结客户网点维护", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EmisTmsCustomerSite emisTmsCustomerSite) {
|
||||
return toAjax(emisTmsCustomerSiteService.updateEmisTmsCustomerSite(emisTmsCustomerSite));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除月结客户网点维护
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisTmsCustomerSite:remove')")
|
||||
@Log(title = "月结客户网点维护", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(emisTmsCustomerSiteService.deleteEmisTmsCustomerSiteByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查网点列表名称是否重复
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisTmsCustomerSite:query')")
|
||||
@GetMapping("/checkDuplicate")
|
||||
public AjaxResult checkDuplicate(@RequestParam("siteListName") String siteListName,
|
||||
@RequestParam(value = "excludeId", required = false) Long excludeId) {
|
||||
boolean isDuplicate = emisTmsCustomerSiteService.checkSiteListNameDuplicate(siteListName, excludeId);
|
||||
return AjaxResult.success("检查完成", isDuplicate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据网点列表名称查询记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisTmsCustomerSite:query')")
|
||||
@GetMapping("/getByName")
|
||||
public AjaxResult getByName(@RequestParam("siteListName") String siteListName) {
|
||||
EmisTmsCustomerSite result = emisTmsCustomerSiteService.selectEmisTmsCustomerSiteByName(siteListName);
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisTmsCustomerSite.java
|
||||
* @author heyu
|
||||
* @date 2025-08-11 04:52:26
|
||||
* @Copyright: ShangHai Duta 2025 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 月结客户网点维护 实体类 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.emis.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xdadan.erp.common.annotation.audit.DataAuditField;
|
||||
import com.xdadan.erp.common.annotation.audit.DataAuditTable;
|
||||
import com.xdadan.erp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName EmisTmsCustomerSite
|
||||
* @Description 月结客户网点维护
|
||||
* @author heyu
|
||||
* @date 2025-08-11 04:52:26
|
||||
*/
|
||||
@Data
|
||||
public class EmisTmsCustomerSite extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/* id */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
/* 自定义网点列表名称 */
|
||||
private String siteListName;
|
||||
/* 网点代码,多个用逗号分隔 */
|
||||
private String siteCode;
|
||||
|
||||
private List<EmisSite> emisSiteList;
|
||||
|
||||
}
|
||||
@ -21,17 +21,20 @@ import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @ClassName EmisSiteMapper
|
||||
* @Description <p> 网点 Mapper 接口 </p>
|
||||
* @Description
|
||||
* <p>
|
||||
* 网点 Mapper 接口
|
||||
* </p>
|
||||
* @author linfso
|
||||
* @date 2023-12-14 13:02:46
|
||||
*/
|
||||
@CacheNamespace(implementation= MybatisRedisCache.class,eviction=MybatisRedisCache.class)
|
||||
public interface EmisSiteMapper extends BaseMapper<EmisSite>
|
||||
{
|
||||
@CacheNamespace(implementation = MybatisRedisCache.class, eviction = MybatisRedisCache.class)
|
||||
public interface EmisSiteMapper extends BaseMapper<EmisSite> {
|
||||
/**
|
||||
* 主键查询
|
||||
* @param id
|
||||
* @return
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisSite selectEmisSiteById(Long id);
|
||||
|
||||
@ -42,31 +45,32 @@ public interface EmisSiteMapper extends BaseMapper<EmisSite>
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param emisSite
|
||||
* @param emisSite
|
||||
* @return 集合
|
||||
*/
|
||||
public List<EmisSite> selectEmisSiteList(EmisSite emisSite);
|
||||
|
||||
/**
|
||||
* 网点作为仓库
|
||||
*
|
||||
* @param emisSite
|
||||
* @return
|
||||
*/
|
||||
public List<Map> selectEmisSiteListAsWarehouse(EmisSite emisSite);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* 新增
|
||||
*
|
||||
* @param emisSite
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public int insertEmisSite(EmisSite emisSite);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param emisSite
|
||||
* @return
|
||||
* @param emisSite
|
||||
* @return
|
||||
*/
|
||||
public int updateEmisSite(EmisSite emisSite);
|
||||
|
||||
@ -100,4 +104,14 @@ public interface EmisSiteMapper extends BaseMapper<EmisSite>
|
||||
* @return
|
||||
*/
|
||||
List<EmisSite> selectSiteByConditions(EmisSite emisSite);
|
||||
|
||||
public EmisSite getEmisSiteByCodeWithoutName(@Param("siteCode") String siteCode);
|
||||
|
||||
/**
|
||||
* 根据网点代码列表批量查询网点信息(不包含网点名称)
|
||||
*
|
||||
* @param siteCodes 网点代码列表
|
||||
* @return 网点信息列表
|
||||
*/
|
||||
public List<EmisSite> getEmisSiteByCodesWithoutName(@Param("siteCodes") List<String> siteCodes);
|
||||
}
|
||||
|
||||
@ -0,0 +1,92 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisTmsCustomerSiteMapper.java
|
||||
* @author heyu
|
||||
* @date 2025-08-11 04:52:26
|
||||
* @Copyright: ShangHai Duta 2025 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 月结客户网点维护 数据层 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.emis.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.xdadan.erp.emis.domain.EmisTmsCustomerSite;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @ClassName EmisTmsCustomerSiteMapper
|
||||
* @Description 月结客户网点维护
|
||||
* @author heyu
|
||||
* @date 2025-08-11 04:52:26
|
||||
*/
|
||||
public interface EmisTmsCustomerSiteMapper extends BaseMapper<EmisTmsCustomerSite> {
|
||||
/**
|
||||
* 主键查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisTmsCustomerSite selectEmisTmsCustomerSiteById(Long id);
|
||||
|
||||
/**
|
||||
* 查询月结客户网点维护列表
|
||||
*
|
||||
* @param emisTmsCustomerSite
|
||||
* @return 月结客户网点维护集合
|
||||
*/
|
||||
public List<EmisTmsCustomerSite> selectEmisTmsCustomerSiteList(EmisTmsCustomerSite emisTmsCustomerSite);
|
||||
|
||||
/**
|
||||
* 新增月结客户网点维护
|
||||
*
|
||||
* @param emisTmsCustomerSite
|
||||
* @return
|
||||
*/
|
||||
public int insertEmisTmsCustomerSite(EmisTmsCustomerSite emisTmsCustomerSite);
|
||||
|
||||
/**
|
||||
* 修改月结客户网点维护
|
||||
*
|
||||
* @param emisTmsCustomerSite
|
||||
* @return
|
||||
*/
|
||||
public int updateEmisTmsCustomerSite(EmisTmsCustomerSite emisTmsCustomerSite);
|
||||
|
||||
/**
|
||||
* 删除月结客户网点维护信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public int deleteEmisTmsCustomerSiteById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除月结客户网点维护
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
public int deleteEmisTmsCustomerSiteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据网点列表名称查询记录
|
||||
*
|
||||
* @param siteListName 网点列表名称
|
||||
* @return 月结客户网点维护记录
|
||||
*/
|
||||
public EmisTmsCustomerSite selectEmisTmsCustomerSiteByName(@Param("siteListName") String siteListName);
|
||||
|
||||
/**
|
||||
* 检查网点列表名称是否重复(排除指定ID)
|
||||
*
|
||||
* @param siteListName 网点列表名称
|
||||
* @param excludeId 排除的ID
|
||||
* @return 重复记录数量
|
||||
*/
|
||||
public int countBySiteListNameExcludeId(@Param("siteListName") String siteListName,
|
||||
@Param("excludeId") Long excludeId);
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: IEmisTmsCustomerSiteService.java
|
||||
* @author heyu
|
||||
* @date 2025-08-11 04:52:26
|
||||
* @Copyright: ShangHai Duta 2025 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 月结客户网点维护 服务类接口 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.emis.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.xdadan.erp.emis.domain.EmisTmsCustomerSite;
|
||||
|
||||
/**
|
||||
* @ClassName IEmisTmsCustomerSiteService
|
||||
* @Description 月结客户网点维护
|
||||
* @author heyu
|
||||
* @date 2025-08-11 04:52:26
|
||||
*/
|
||||
public interface IEmisTmsCustomerSiteService {
|
||||
/**
|
||||
* 主键查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisTmsCustomerSite selectEmisTmsCustomerSiteById(Long id);
|
||||
|
||||
/**
|
||||
* 查询月结客户网点维护列表
|
||||
*
|
||||
* @param emisTmsCustomerSite 月结客户网点维护
|
||||
* @return 月结客户网点维护集合
|
||||
*/
|
||||
public List<EmisTmsCustomerSite> selectEmisTmsCustomerSiteList(EmisTmsCustomerSite emisTmsCustomerSite);
|
||||
|
||||
/**
|
||||
* 新增月结客户网点维护
|
||||
*
|
||||
* @param emisTmsCustomerSite 月结客户网点维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmisTmsCustomerSite(EmisTmsCustomerSite emisTmsCustomerSite);
|
||||
|
||||
/**
|
||||
* 修改月结客户网点维护
|
||||
*
|
||||
* @param emisTmsCustomerSite 月结客户网点维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmisTmsCustomerSite(EmisTmsCustomerSite emisTmsCustomerSite);
|
||||
|
||||
/**
|
||||
* 批量删除月结客户网点维护
|
||||
*
|
||||
* @param ids 需要删除的月结客户网点维护主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisTmsCustomerSiteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除月结客户网点维护信息
|
||||
*
|
||||
* @param id 月结客户网点维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisTmsCustomerSiteById(Long id);
|
||||
|
||||
/**
|
||||
* 检查网点列表名称是否重复
|
||||
*
|
||||
* @param siteListName 网点列表名称
|
||||
* @param excludeId 排除的ID(用于修改时检查)
|
||||
* @return true-重复 false-不重复
|
||||
*/
|
||||
public boolean checkSiteListNameDuplicate(String siteListName, Long excludeId);
|
||||
|
||||
/**
|
||||
* 根据网点列表名称查询记录
|
||||
*
|
||||
* @param siteListName 网点列表名称
|
||||
* @return 月结客户网点维护记录
|
||||
*/
|
||||
public EmisTmsCustomerSite selectEmisTmsCustomerSiteByName(String siteListName);
|
||||
}
|
||||
@ -0,0 +1,227 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisTmsCustomerSiteServiceImpl.java
|
||||
* @author heyu
|
||||
* @date 2025-08-11 04:52:26
|
||||
* @Copyright: ShangHai Duta 2025 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 月结客户网点维护 服务实现类 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.emis.service.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.xdadan.erp.emis.domain.EmisSite;
|
||||
import com.xdadan.erp.emis.domain.EmisTmsCustomerSite;
|
||||
import com.xdadan.erp.emis.mapper.EmisSiteMapper;
|
||||
import com.xdadan.erp.emis.mapper.EmisTmsCustomerSiteMapper;
|
||||
import com.xdadan.erp.emis.service.IEmisTmsCustomerSiteService;
|
||||
|
||||
/**
|
||||
* @ClassName EmisTmsCustomerSiteServiceImpl
|
||||
* @Description 月结客户网点维护
|
||||
* @author heyu
|
||||
* @date 2025-08-11 04:52:26
|
||||
*/
|
||||
@Service
|
||||
public class EmisTmsCustomerSiteServiceImpl implements IEmisTmsCustomerSiteService {
|
||||
@Autowired
|
||||
private EmisTmsCustomerSiteMapper emisTmsCustomerSiteMapper;
|
||||
|
||||
@Autowired
|
||||
private EmisSiteMapper emisSiteMapper;
|
||||
|
||||
/**
|
||||
* 主键查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public EmisTmsCustomerSite selectEmisTmsCustomerSiteById(Long id) {
|
||||
EmisTmsCustomerSite emisTmsCustomerSite = emisTmsCustomerSiteMapper.selectEmisTmsCustomerSiteById(id);
|
||||
if (emisTmsCustomerSite != null && emisTmsCustomerSite.getSiteCode() != null) {
|
||||
// 收集需要查询的网点代码
|
||||
String[] siteCodes = emisTmsCustomerSite.getSiteCode().split(",");
|
||||
Set<String> siteCodeSet = Arrays.stream(siteCodes)
|
||||
.map(String::trim)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
// 批量查询网点信息
|
||||
Map<String, EmisSite> siteCodeMap = new HashMap<>();
|
||||
if (!siteCodeSet.isEmpty()) {
|
||||
List<EmisSite> allSites = emisSiteMapper.getEmisSiteByCodesWithoutName(new ArrayList<>(siteCodeSet));
|
||||
for (EmisSite site : allSites) {
|
||||
if (site != null && site.getSiteCode() != null) {
|
||||
siteCodeMap.put(site.getSiteCode(), site);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 填充关联的网点信息
|
||||
List<EmisSite> emisSiteList = Arrays.stream(siteCodes)
|
||||
.map(code -> siteCodeMap.get(code.trim()))
|
||||
.filter(site -> site != null)
|
||||
.collect(Collectors.toList());
|
||||
emisTmsCustomerSite.setEmisSiteList(emisSiteList);
|
||||
}
|
||||
return emisTmsCustomerSite;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询月结客户网点维护列表
|
||||
*
|
||||
* @param emisTmsCustomerSite 月结客户网点维护
|
||||
* @return 月结客户网点维护集合
|
||||
*/
|
||||
@Override
|
||||
public List<EmisTmsCustomerSite> selectEmisTmsCustomerSiteList(EmisTmsCustomerSite emisTmsCustomerSite) {
|
||||
List<EmisTmsCustomerSite> list = emisTmsCustomerSiteMapper.selectEmisTmsCustomerSiteList(emisTmsCustomerSite);
|
||||
|
||||
// 批量收集所有需要查询的网点代码
|
||||
Set<String> allSiteCodes = new HashSet<>();
|
||||
for (EmisTmsCustomerSite item : list) {
|
||||
if (item.getSiteCode() != null) {
|
||||
String[] siteCodes = item.getSiteCode().split(",");
|
||||
for (String code : siteCodes) {
|
||||
allSiteCodes.add(code.trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 批量查询所有网点信息
|
||||
Map<String, EmisSite> siteCodeMap = new HashMap<>();
|
||||
if (!allSiteCodes.isEmpty()) {
|
||||
List<EmisSite> allSites = emisSiteMapper.getEmisSiteByCodesWithoutName(new ArrayList<>(allSiteCodes));
|
||||
for (EmisSite site : allSites) {
|
||||
if (site != null && site.getSiteCode() != null) {
|
||||
siteCodeMap.put(site.getSiteCode(), site);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 为每个记录填充关联的网点信息
|
||||
for (EmisTmsCustomerSite item : list) {
|
||||
if (item.getSiteCode() != null) {
|
||||
String[] siteCodes = item.getSiteCode().split(",");
|
||||
List<EmisSite> emisSiteList = Arrays.stream(siteCodes)
|
||||
.map(code -> siteCodeMap.get(code.trim()))
|
||||
.filter(site -> site != null)
|
||||
.collect(Collectors.toList());
|
||||
item.setEmisSiteList(emisSiteList);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增月结客户网点维护
|
||||
*
|
||||
* @param emisTmsCustomerSite 月结客户网点维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertEmisTmsCustomerSite(EmisTmsCustomerSite emisTmsCustomerSite) {
|
||||
// 检查网点列表名称是否重复
|
||||
if (checkSiteListNameDuplicate(emisTmsCustomerSite.getSiteListName(), null)) {
|
||||
throw new RuntimeException("网点列表名称已存在,请使用其他名称");
|
||||
}
|
||||
|
||||
// 只保存siteListName和siteCode
|
||||
if (emisTmsCustomerSite.getEmisSiteList() != null && !emisTmsCustomerSite.getEmisSiteList().isEmpty()) {
|
||||
String siteCode = emisTmsCustomerSite.getEmisSiteList().stream()
|
||||
.map(EmisSite::getSiteCode)
|
||||
.collect(Collectors.joining(","));
|
||||
emisTmsCustomerSite.setSiteCode(siteCode);
|
||||
}
|
||||
return emisTmsCustomerSiteMapper.insertEmisTmsCustomerSite(emisTmsCustomerSite);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改月结客户网点维护
|
||||
*
|
||||
* @param emisTmsCustomerSite 月结客户网点维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateEmisTmsCustomerSite(EmisTmsCustomerSite emisTmsCustomerSite) {
|
||||
// 检查网点列表名称是否重复(排除当前记录)
|
||||
if (checkSiteListNameDuplicate(emisTmsCustomerSite.getSiteListName(), emisTmsCustomerSite.getId())) {
|
||||
throw new RuntimeException("网点列表名称已存在,请使用其他名称");
|
||||
}
|
||||
|
||||
if (emisTmsCustomerSite.getEmisSiteList() != null && !emisTmsCustomerSite.getEmisSiteList().isEmpty()) {
|
||||
String siteCode = emisTmsCustomerSite.getEmisSiteList().stream()
|
||||
.map(EmisSite::getSiteCode)
|
||||
.collect(Collectors.joining(","));
|
||||
emisTmsCustomerSite.setSiteCode(siteCode);
|
||||
}
|
||||
return emisTmsCustomerSiteMapper.updateEmisTmsCustomerSite(emisTmsCustomerSite);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除月结客户网点维护
|
||||
*
|
||||
* @param ids 需要删除的月结客户网点维护主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmisTmsCustomerSiteByIds(Long[] ids) {
|
||||
return emisTmsCustomerSiteMapper.deleteEmisTmsCustomerSiteByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除月结客户网点维护信息
|
||||
*
|
||||
* @param id 月结客户网点维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmisTmsCustomerSiteById(Long id) {
|
||||
return emisTmsCustomerSiteMapper.deleteEmisTmsCustomerSiteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查网点列表名称是否重复
|
||||
*
|
||||
* @param siteListName 网点列表名称
|
||||
* @param excludeId 排除的ID(用于修改时检查)
|
||||
* @return true-重复 false-不重复
|
||||
*/
|
||||
@Override
|
||||
public boolean checkSiteListNameDuplicate(String siteListName, Long excludeId) {
|
||||
if (siteListName == null || siteListName.trim().isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
int count = emisTmsCustomerSiteMapper.countBySiteListNameExcludeId(siteListName.trim(), excludeId);
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据网点列表名称查询记录
|
||||
*
|
||||
* @param siteListName 网点列表名称
|
||||
* @return 月结客户网点维护记录
|
||||
*/
|
||||
@Override
|
||||
public EmisTmsCustomerSite selectEmisTmsCustomerSiteByName(String siteListName) {
|
||||
if (siteListName == null || siteListName.trim().isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return emisTmsCustomerSiteMapper.selectEmisTmsCustomerSiteByName(siteListName.trim());
|
||||
}
|
||||
}
|
||||
@ -135,6 +135,126 @@
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="EmisSite" id="EasyEmisSiteResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="siteCode" column="site_code" />
|
||||
<result property="siteName" column="site_name" />
|
||||
<result property="siteNameEn" column="site_name_en" />
|
||||
<result property="parentSiteCode" column="parent_site_code" />
|
||||
<result property="defaultCurrency" column="default_currency" />
|
||||
<result property="cutOffTime" column="cut_off_time" />
|
||||
<result property="superiorFinanceCenterCode" column="superior_finance_center_code" />
|
||||
<result property="siteType" column="site_type" />
|
||||
<result property="scopeType" column="scope_type" />
|
||||
<result property="defaultDestinationNameCode" column="default_destination_name_code" />
|
||||
<result property="defaultSendPlace" column="default_send_place" />
|
||||
<result property="countryCode" column="country_code" />
|
||||
<result property="province" column="province" />
|
||||
<result property="city" column="city" />
|
||||
<result property="county" column="county" />
|
||||
<result property="town" column="town" />
|
||||
<result property="areaCode" column="area_code" />
|
||||
<result property="areaName" column="area_name" />
|
||||
<result property="rangeName" column="range_name" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="principal" column="principal" />
|
||||
<result property="manager" column="manager" />
|
||||
<result property="managerPhone" column="manager_phone" />
|
||||
<result property="salePhone" column="sale_phone" />
|
||||
<result property="exigencePhone" column="exigence_phone" />
|
||||
<result property="fax" column="fax" />
|
||||
<result property="siteLevels" column="site_levels" />
|
||||
<result property="siteDesc" column="site_desc" />
|
||||
<result property="dispatchRange" column="dispatch_range" />
|
||||
<result property="notDispatchRange" column="not_dispatch_range" />
|
||||
<result property="publicRemark" column="public_remark" />
|
||||
<result property="privateRemark" column="private_remark" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="financialAccount" column="financial_account" />
|
||||
<result property="tbSerName" column="tb_ser_name" />
|
||||
<result property="tbSerTel" column="tb_ser_tel" />
|
||||
<result property="tbSerWw" column="tb_ser_ww" />
|
||||
<result property="carStartTime" column="car_start_time" />
|
||||
<result property="carEndTime" column="car_end_time" />
|
||||
<result property="blWeb" column="bl_web" />
|
||||
<result property="joinTime" column="join_time" />
|
||||
<result property="mapsCoordinate" column="maps_coordinate" />
|
||||
<result property="specserviceRange" column="specservice_range" />
|
||||
<result property="qq" column="qq" />
|
||||
<result property="email" column="email" />
|
||||
<result property="serviceQuality" column="service_quality" />
|
||||
<result property="salesQuality" column="sales_quality" />
|
||||
<result property="levels" column="levels" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="siteLimite" column="site_limite" />
|
||||
<result property="jyMobile" column="jy_mobile" />
|
||||
<result property="jyPwd" column="jy_pwd" />
|
||||
<result property="blNotInput" column="bl_not_input" />
|
||||
<result property="stopDate" column="stop_date" />
|
||||
<result property="blAllowAgentMoney" column="bl_allow_agent_money" />
|
||||
<result property="blAllowTopayment" column="bl_allow_topayment" />
|
||||
<result property="goodsPaymentLimited" column="goods_payment_limited" />
|
||||
<result property="topaymentLimited" column="topayment_limited" />
|
||||
<result property="blRec" column="bl_rec" />
|
||||
<result property="blDisp" column="bl_disp" />
|
||||
<result property="blCome" column="bl_come" />
|
||||
<result property="blOpenTaobao" column="bl_open_taobao" />
|
||||
<result property="blArbitrationDepartment" column="bl_arbitration_department" />
|
||||
<result property="blAllowAgentSign" column="bl_allow_agent_sign" />
|
||||
<result property="blMessage" column="bl_message" />
|
||||
<result property="blProvide" column="bl_provide" />
|
||||
<result property="blProjectclient" column="bl_projectclient" />
|
||||
<result property="blVipSite" column="bl_vip_site" />
|
||||
<result property="blDispatchZt" column="bl_dispatch_zt" />
|
||||
<result property="blBilltoAccount" column="bl_billto_account" />
|
||||
<result property="accountCode" column="account_code" />
|
||||
<result property="address" column="address" />
|
||||
<result property="dispDeliveryMode" column="disp_delivery_mode" />
|
||||
<result property="transTypeId" column="trans_type_id" />
|
||||
<result property="transTypeName" column="trans_type_name" />
|
||||
<result property="orgId" column="org_id" />
|
||||
<result property="orgName" column="org_name" />
|
||||
<result property="dataFrom" column="data_from" />
|
||||
<result property="siteArea" column="site_area" />
|
||||
<result property="blAllowDispAgentMoney" column="bl_allow_disp_agent_money" />
|
||||
<result property="dispGoodsPaymentLimited" column="disp_goods_payment_limited" />
|
||||
<result property="dispDeliverySite" column="disp_delivery_site" />
|
||||
<result property="dispDeliverySiteCode" column="disp_delivery_site_code" />
|
||||
<result property="vendorName" column="vendor_name" />
|
||||
<result property="creditCode" column="credit_code" />
|
||||
<result property="blCargoService" column="bl_cargo_service" />
|
||||
<result property="blHandlingService" column="bl_handling_service" />
|
||||
<result property="pickupCenterSiteCode" column="pickup_center_site_code" />
|
||||
<result property="blDispGood" column="bl_disp_good" />
|
||||
<result property="blPushJd" column="bl_push_jd" />
|
||||
<result property="pushDate" column="push_date" />
|
||||
<result property="reason" column="reason" />
|
||||
<result property="sitePos" column="site_pos" />
|
||||
<result property="distributeCode" column="distribute_code" />
|
||||
<result property="blPushSite" column="bl_push_site" />
|
||||
<result property="logoType" column="logo_type" />
|
||||
<result property="sizeCode2" column="size_code2" />
|
||||
<result property="sizeCode3" column="size_code3" />
|
||||
<result property="auditStatus" column="audit_status" />
|
||||
<result property="auditDate" column="audit_date" />
|
||||
<result property="auditManCode" column="audit_man_code" />
|
||||
<result property="auditSiteCode" column="audit_site_code" />
|
||||
<result property="blClass" column="bl_class" />
|
||||
<result property="blMaterial" column="bl_material" />
|
||||
<result property="soonPieceType" column="soon_piece_type" />
|
||||
<result property="provinceArea" column="province_area" />
|
||||
<result property="secondArea" column="second_area" />
|
||||
<result property="secondAreaCode" column="second_area_code" />
|
||||
<result property="provinceAreaCode" column="province_area_code" />
|
||||
<result property="blDispGoodName" column="bl_disp_good_name" />
|
||||
<result property="blNotRec" column="bl_not_rec" />
|
||||
<result property="blNotDisp" column="bl_not_disp" />
|
||||
<result property="blNotCashOut" column="bl_not_cash_out" />
|
||||
<result property="status" column="status" />
|
||||
<result property="incrementService" column="increment_service" />
|
||||
<result property="blWarehouseIn" column="bl_warehouse_in" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisSiteVo">
|
||||
select id, site_code, site_name, site_name_en, parent_site_code, default_currency, cut_off_time, superior_finance_center_code, site_type, scope_type, default_destination_name_code, default_send_place, country_code, province, city, county, town, area_code, area_name, range_name, phone, principal, manager, manager_phone, sale_phone, exigence_phone, fax, site_levels, site_desc, dispatch_range, not_dispatch_range, public_remark, private_remark, order_num, financial_account, tb_ser_name, tb_ser_tel, tb_ser_ww, car_start_time, car_end_time, bl_web, join_time, maps_coordinate, specservice_range, qq, email, service_quality, sales_quality, levels, warehouse_name, site_limite, jy_mobile, jy_pwd, bl_not_input, stop_date, bl_allow_agent_money, bl_allow_topayment, goods_payment_limited, topayment_limited, bl_rec, bl_disp, bl_come, bl_open_taobao, bl_arbitration_department, bl_allow_agent_sign, bl_message, bl_provide, bl_projectclient, bl_vip_site, bl_dispatch_zt, bl_billto_account, account_code, address, disp_delivery_mode, trans_type_id, trans_type_name, org_id, org_name, data_from, site_area, bl_allow_disp_agent_money, disp_goods_payment_limited, disp_delivery_site, disp_delivery_site_code, vendor_name, credit_code, bl_cargo_service, bl_handling_service, pickup_center_site_code, bl_disp_good, bl_push_jd, push_date, reason, site_pos, distribute_code, bl_push_site, logo_type, size_code2, size_code3, audit_status, audit_date, audit_man_code, audit_site_code, bl_class, bl_material, soon_piece_type, province_area, second_area, second_area_code, province_area_code, bl_disp_good_name, bl_not_rec, bl_not_disp, bl_not_cash_out, status, increment_service, bl_warehouse_in, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_site
|
||||
</sql>
|
||||
@ -353,6 +473,21 @@
|
||||
where a.del_flag='0' and a.site_code = #{siteCode} limit 1
|
||||
</select>
|
||||
|
||||
<select id="getEmisSiteByCodeWithoutName" parameterType="String" resultMap="EasyEmisSiteResult">
|
||||
select id, site_code, site_name, site_name_en, parent_site_code, default_currency, cut_off_time, superior_finance_center_code, site_type, scope_type, default_destination_name_code, default_send_place, country_code, province, city, county, town, area_code, area_name, range_name, phone, principal, manager, manager_phone, sale_phone, exigence_phone, fax, site_levels, site_desc, dispatch_range, not_dispatch_range, public_remark, private_remark, order_num, financial_account, tb_ser_name, tb_ser_tel, tb_ser_ww, car_start_time, car_end_time, bl_web, join_time, maps_coordinate, specservice_range, qq, email, service_quality, sales_quality, levels, warehouse_name, site_limite, jy_mobile, jy_pwd, bl_not_input, stop_date, bl_allow_agent_money, bl_allow_topayment, goods_payment_limited, topayment_limited, bl_rec, bl_disp, bl_come, bl_open_taobao, bl_arbitration_department, bl_allow_agent_sign, bl_message, bl_provide, bl_projectclient, bl_vip_site, bl_dispatch_zt, bl_billto_account, account_code, address, disp_delivery_mode, trans_type_id, trans_type_name, org_id, org_name, data_from, site_area, bl_allow_disp_agent_money, disp_goods_payment_limited, disp_delivery_site, disp_delivery_site_code, vendor_name, credit_code, bl_cargo_service, bl_handling_service, pickup_center_site_code, bl_disp_good, bl_push_jd, push_date, reason, site_pos, distribute_code, bl_push_site, logo_type, size_code2, size_code3, audit_status, audit_date, audit_man_code, audit_site_code, bl_class, bl_material, soon_piece_type, province_area, second_area, second_area_code, province_area_code, bl_disp_good_name, bl_not_rec, bl_not_disp, bl_not_cash_out, status, increment_service, bl_warehouse_in, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
from emis_site a
|
||||
where a.del_flag='0' and a.site_code = #{siteCode} limit 1
|
||||
</select>
|
||||
|
||||
<select id="getEmisSiteByCodesWithoutName" parameterType="java.util.List" resultMap="EasyEmisSiteResult">
|
||||
select id, site_code, site_name, site_name_en, parent_site_code, default_currency, cut_off_time, superior_finance_center_code, site_type, scope_type, default_destination_name_code, default_send_place, country_code, province, city, county, town, area_code, area_name, range_name, phone, principal, manager, manager_phone, sale_phone, exigence_phone, fax, site_levels, site_desc, dispatch_range, not_dispatch_range, public_remark, private_remark, order_num, financial_account, tb_ser_name, tb_ser_tel, tb_ser_ww, car_start_time, car_end_time, bl_web, join_time, maps_coordinate, specservice_range, qq, email, service_quality, sales_quality, levels, warehouse_name, site_limite, jy_mobile, jy_pwd, bl_not_input, stop_date, bl_allow_agent_money, bl_allow_topayment, goods_payment_limited, topayment_limited, bl_rec, bl_disp, bl_come, bl_open_taobao, bl_arbitration_department, bl_allow_agent_sign, bl_message, bl_provide, bl_projectclient, bl_vip_site, bl_dispatch_zt, bl_billto_account, account_code, address, disp_delivery_mode, trans_type_id, trans_type_name, org_id, org_name, data_from, site_area, bl_allow_disp_agent_money, disp_goods_payment_limited, disp_delivery_site, disp_delivery_site_code, vendor_name, credit_code, bl_cargo_service, bl_handling_service, pickup_center_site_code, bl_disp_good, bl_push_jd, push_date, reason, site_pos, distribute_code, bl_push_site, logo_type, size_code2, size_code3, audit_status, audit_date, audit_man_code, audit_site_code, bl_class, bl_material, soon_piece_type, province_area, second_area, second_area_code, province_area_code, bl_disp_good_name, bl_not_rec, bl_not_disp, bl_not_cash_out, status, increment_service, bl_warehouse_in, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
from emis_site a
|
||||
where a.del_flag='0' and a.site_code in
|
||||
<foreach collection="siteCodes" item="siteCode" open="(" separator="," close=")">
|
||||
#{siteCode}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getEmisSiteByName" parameterType="String" resultMap="EmisSiteResult">
|
||||
select id, site_code, site_name, site_name_en, parent_site_code, default_currency, cut_off_time, superior_finance_center_code, site_type, scope_type, default_destination_name_code, default_send_place, country_code, province, city, county, town, area_code, area_name, range_name, phone, principal, manager, manager_phone, sale_phone, exigence_phone, fax, site_levels, site_desc, dispatch_range, not_dispatch_range, public_remark, private_remark, order_num, financial_account, tb_ser_name, tb_ser_tel, tb_ser_ww, car_start_time, car_end_time, bl_web, join_time, maps_coordinate, specservice_range, qq, email, service_quality, sales_quality, levels, warehouse_name, site_limite, jy_mobile, jy_pwd, bl_not_input, stop_date, bl_allow_agent_money, bl_allow_topayment, goods_payment_limited, topayment_limited, bl_rec, bl_disp, bl_come, bl_open_taobao, bl_arbitration_department, bl_allow_agent_sign, bl_message, bl_provide, bl_projectclient, bl_vip_site, bl_dispatch_zt, bl_billto_account, account_code, address, disp_delivery_mode, trans_type_id, trans_type_name, org_id, org_name, data_from, site_area, bl_allow_disp_agent_money, disp_goods_payment_limited, disp_delivery_site, disp_delivery_site_code, vendor_name, credit_code, bl_cargo_service, bl_handling_service, pickup_center_site_code, bl_disp_good, bl_push_jd, push_date, reason, site_pos, distribute_code, bl_push_site, logo_type, size_code2, size_code3, audit_status, audit_date, audit_man_code, audit_site_code, bl_class, bl_material, soon_piece_type, province_area, second_area, second_area_code, province_area_code, bl_disp_good_name, bl_not_rec, bl_not_disp, bl_not_cash_out, status, increment_service, bl_warehouse_in, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
||||
from emis_site a
|
||||
|
||||
@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xdadan.erp.emis.mapper.EmisTmsCustomerSiteMapper">
|
||||
|
||||
<resultMap type="EmisTmsCustomerSite" id="EmisTmsCustomerSiteResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="siteListName" column="site_list_name" />
|
||||
<result property="siteCode" column="site_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisTmsCustomerSiteVo">
|
||||
select id, site_list_name, site_code, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_tms_customer_site
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisTmsCustomerSiteList" parameterType="EmisTmsCustomerSite" resultMap="EmisTmsCustomerSiteResult">
|
||||
<include refid="selectEmisTmsCustomerSiteVo"/>
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="siteListName != null and siteListName != ''"> and site_list_name like concat('%', #{siteListName}, '%')</if>
|
||||
<if test="siteCode != null and siteCode != ''"> and site_code like concat('%', #{siteCode}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEmisTmsCustomerSiteById" parameterType="Long" resultMap="EmisTmsCustomerSiteResult">
|
||||
<include refid="selectEmisTmsCustomerSiteVo"/>
|
||||
where del_flag='0' and id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectEmisTmsCustomerSiteByName" parameterType="String" resultMap="EmisTmsCustomerSiteResult">
|
||||
<include refid="selectEmisTmsCustomerSiteVo"/>
|
||||
where del_flag='0' and site_list_name = #{siteListName}
|
||||
</select>
|
||||
|
||||
<select id="countBySiteListNameExcludeId" resultType="int">
|
||||
select count(1) from emis_tms_customer_site
|
||||
where del_flag='0' and site_list_name = #{siteListName}
|
||||
<if test="excludeId != null">
|
||||
and id != #{excludeId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisTmsCustomerSite" parameterType="EmisTmsCustomerSite" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_tms_customer_site
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="siteListName != null">site_list_name,</if>
|
||||
<if test="siteCode != null">site_code,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createSite != null">create_site,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="siteListName != null">#{siteListName},</if>
|
||||
<if test="siteCode != null">#{siteCode},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createSite != null">#{createSite},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmisTmsCustomerSite" parameterType="EmisTmsCustomerSite">
|
||||
update emis_tms_customer_site
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="siteListName != null">site_list_name = #{siteListName},</if>
|
||||
<if test="siteCode != null">site_code = #{siteCode},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateSite != null">update_site = #{updateSite},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisTmsCustomerSiteById" parameterType="Long">
|
||||
update emis_tms_customer_site set del_flag = '1' where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisTmsCustomerSiteByIds" parameterType="String">
|
||||
update emis_tms_customer_site set del_flag = '1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -1205,7 +1205,7 @@
|
||||
<if test="custNo != null and custNo != ''"> and cust_no like concat('%', #{custNo}, '%')</if>
|
||||
<if test="custName != null and custName != ''"> and cust_name like concat('%', #{custName}, '%')</if>
|
||||
<if test="transLineType != null and transLineType != ''"> and trans_line_type=#{transLineType}</if>
|
||||
<if test="productType != null and productType != ''"> and product_type=#{productType}</if>
|
||||
<if test="productType != null and productType != ''"> and FIND_IN_SET(product_type,#{productType})</if>
|
||||
<if test="timeType != null and timeType != ''"> and time_type like concat('%', #{timeType}, '%')</if>
|
||||
<if test="meterType != null and meterType != ''"> and meter_type=#{meterType}</if>
|
||||
<if test="carryType != null and carryType != ''">and FIND_IN_SET(a.carry_type,#{carryType})</if>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user