11
This commit is contained in:
parent
98f0d2c3d1
commit
dbe624497f
@ -70,7 +70,7 @@ public class BaseTimeZoneController extends BaseController {
|
||||
**/
|
||||
@GetMapping("/listZone")
|
||||
public AjaxResult listZone() {
|
||||
return success(baseTimeZoneService.list());
|
||||
return success(baseTimeZoneService.listAllZoneAndTime());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -31,6 +31,10 @@ public class BaseTimeZone
|
||||
@Excel(name = "时区标准名称", readConverterExp = "如=,“=Asia/Shanghai”,遵循,I=ANA,时=区数据库命名规范")
|
||||
private String zoneName;
|
||||
|
||||
/** 时区中文 */
|
||||
@Excel(name = "时区中文")
|
||||
private String zoneCn;
|
||||
|
||||
/** UTC 偏移量(如 “+08:00”“-05:00”“+03:30”) */
|
||||
@Excel(name = "UTC 偏移量", readConverterExp = "如=,“=+08:00”“-05:00”“+03:30”")
|
||||
private String utcOffset;
|
||||
|
||||
@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.base.domain.BaseTimeZone;
|
||||
import com.ruoyi.base.vo.BaseCountryVO;
|
||||
import com.ruoyi.base.vo.TimeZoneVO;
|
||||
|
||||
/**
|
||||
* 时区Service接口
|
||||
@ -25,4 +26,13 @@ public interface IBaseTimeZoneService extends IService<BaseTimeZone> {
|
||||
* @date 15:34 2025/11/17
|
||||
**/
|
||||
IPage<BaseTimeZone> queryListPage(BaseTimeZone pageReqVO, Page<BaseTimeZone> page);
|
||||
|
||||
/**
|
||||
* 获取时区列表--含当前时间
|
||||
*
|
||||
* @return com.ruoyi.base.vo.BaseCountryVO
|
||||
* @author PQZ
|
||||
* @date 15:02 2025/11/17
|
||||
**/
|
||||
List<TimeZoneVO> listAllZoneAndTime();
|
||||
}
|
||||
|
||||
@ -1,10 +1,14 @@
|
||||
package com.ruoyi.base.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.base.vo.BaseCountryVO;
|
||||
import com.ruoyi.base.vo.TimeZoneVO;
|
||||
import com.ruoyi.utils.DateTimeUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -22,6 +26,8 @@ import com.ruoyi.base.service.IBaseTimeZoneService;
|
||||
public class BaseTimeZoneServiceImpl extends ServiceImpl<BaseTimeZoneMapper, BaseTimeZone> implements IBaseTimeZoneService {
|
||||
@Autowired
|
||||
private BaseTimeZoneMapper baseTimeZoneMapper;
|
||||
@Autowired
|
||||
private DateTimeUtil dateTimeUtil;
|
||||
|
||||
/**
|
||||
* 分页查询时区列表
|
||||
@ -36,4 +42,26 @@ public class BaseTimeZoneServiceImpl extends ServiceImpl<BaseTimeZoneMapper, Bas
|
||||
public IPage<BaseTimeZone> queryListPage(BaseTimeZone pageReqVO, Page<BaseTimeZone> page) {
|
||||
return baseTimeZoneMapper.queryListPage(pageReqVO, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取时区列表--含当前时间
|
||||
*
|
||||
* @return com.ruoyi.base.vo.BaseCountryVO
|
||||
* @author PQZ
|
||||
* @date 15:02 2025/11/17
|
||||
**/
|
||||
@Override
|
||||
public List<TimeZoneVO> listAllZoneAndTime() {
|
||||
List<BaseTimeZone> list = this.list();
|
||||
List<TimeZoneVO> rtnList = new ArrayList<>();
|
||||
for (BaseTimeZone item : list) {
|
||||
TimeZoneVO vo = new TimeZoneVO();
|
||||
BeanUtils.copyProperties(item, vo);
|
||||
vo.setNowTime(dateTimeUtil.getZoneTime(item.getZoneName()));
|
||||
rtnList.add(vo);
|
||||
}
|
||||
//按时间先后排序
|
||||
rtnList.sort((o1, o2) -> o1.getNowTime().compareTo(o2.getNowTime()));
|
||||
return rtnList;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.base.vo;
|
||||
|
||||
import com.ruoyi.base.domain.BaseTimeZone;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.TimeZone;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class TimeZoneVO extends BaseTimeZone {
|
||||
/** 当前时间*/
|
||||
private String nowTime;
|
||||
}
|
||||
@ -19,9 +19,7 @@ import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.cus.domain.CusMainSeas;
|
||||
import com.ruoyi.cus.domain.CusTimeAxis;
|
||||
import com.ruoyi.cus.service.ICusImportService;
|
||||
import com.ruoyi.cus.service.ICusMainSeasService;
|
||||
import com.ruoyi.cus.service.ICusTimeAxisService;
|
||||
import com.ruoyi.cus.service.*;
|
||||
import com.ruoyi.cus.vo.CusMainVO;
|
||||
import com.ruoyi.cus.vo.MainVO;
|
||||
import com.ruoyi.utils.CodeGenerator;
|
||||
@ -42,7 +40,6 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.cus.domain.CusMain;
|
||||
import com.ruoyi.cus.service.ICusMainService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@ -66,6 +63,16 @@ public class CusMainController extends BaseController {
|
||||
private ICusTimeAxisService cusTimeAxisService;
|
||||
@Autowired
|
||||
private ICusMainSeasService cusMainSeasService;
|
||||
@Autowired
|
||||
private ICusManagerService cusManagerService;
|
||||
@Autowired
|
||||
private ICusCompanyService cusCompanyService;
|
||||
@Autowired
|
||||
private ICusMarkService cusMarkService;
|
||||
@Autowired
|
||||
private ICusContactsService cusContactsService;
|
||||
@Autowired
|
||||
private ICusBankService cusBankService;
|
||||
|
||||
/**
|
||||
* 生成客户编码
|
||||
@ -232,20 +239,32 @@ public class CusMainController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 删除客户信息
|
||||
* 删除客户信息---只会单个删除
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cus:main:remove')")
|
||||
@Log(title = "客户信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids) {
|
||||
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||
String cusId = list.get(0);
|
||||
//时间轴信息
|
||||
CusTimeAxis cusTimeAxis = new CusTimeAxis();
|
||||
cusTimeAxis.setBusiMaxCatg("客户");
|
||||
cusTimeAxis.setBusiCatg("修改");
|
||||
cusTimeAxis.setContent("删除客户信息");
|
||||
cusTimeAxis.setCusId(list.get(0));
|
||||
cusTimeAxis.setCusId(cusId);
|
||||
cusTimeAxisService.saveNewTimeAxis(cusTimeAxis);
|
||||
|
||||
//删除其他子表信息-删除管理信息
|
||||
cusManagerService.deleteCusData(cusId);
|
||||
//删除公司信息
|
||||
cusCompanyService.deleteCusData(cusId);
|
||||
//删除联系人信息
|
||||
cusContactsService.deleteCusData(cusId);
|
||||
//删除唛头信息
|
||||
cusMarkService.deleteCusMark(cusId);
|
||||
//删除银行信息
|
||||
cusBankService.deleteCusData(cusId);
|
||||
return toAjax(cusMainService.removeByIds(list));
|
||||
}
|
||||
|
||||
|
||||
@ -10,8 +10,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.cus.domain.CusMain;
|
||||
import com.ruoyi.cus.domain.CusTimeAxis;
|
||||
import com.ruoyi.cus.service.ICusMainService;
|
||||
import com.ruoyi.cus.service.ICusTimeAxisService;
|
||||
import com.ruoyi.cus.service.*;
|
||||
import com.ruoyi.cus.vo.MainVO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -30,7 +29,6 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.cus.domain.CusMainSeas;
|
||||
import com.ruoyi.cus.service.ICusMainSeasService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
@ -49,6 +47,16 @@ public class CusMainSeasController extends BaseController {
|
||||
private ICusMainService cusMainService;
|
||||
@Autowired
|
||||
private ICusTimeAxisService cusTimeAxisService;
|
||||
@Autowired
|
||||
private ICusManagerService cusManagerService;
|
||||
@Autowired
|
||||
private ICusCompanyService cusCompanyService;
|
||||
@Autowired
|
||||
private ICusMarkService cusMarkService;
|
||||
@Autowired
|
||||
private ICusContactsService cusContactsService;
|
||||
@Autowired
|
||||
private ICusBankService cusBankService;
|
||||
|
||||
/**
|
||||
* 查询公海客户信息列表
|
||||
@ -117,13 +125,25 @@ public class CusMainSeasController extends BaseController {
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids) {
|
||||
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||
String cusId = list.get(0);
|
||||
//时间轴信息
|
||||
CusTimeAxis cusTimeAxis = new CusTimeAxis();
|
||||
cusTimeAxis.setBusiMaxCatg("客户");
|
||||
cusTimeAxis.setBusiCatg("修改");
|
||||
cusTimeAxis.setContent("删除公海客户信息");
|
||||
cusTimeAxis.setCusId(list.get(0));
|
||||
cusTimeAxis.setCusId(cusId);
|
||||
cusTimeAxisService.saveNewTimeAxis(cusTimeAxis);
|
||||
|
||||
//删除其他子表信息-删除管理信息
|
||||
cusManagerService.deleteCusData(cusId);
|
||||
//删除公司信息
|
||||
cusCompanyService.deleteCusData(cusId);
|
||||
//删除联系人信息
|
||||
cusContactsService.deleteCusData(cusId);
|
||||
//删除唛头信息
|
||||
cusMarkService.deleteCusMark(cusId);
|
||||
//删除银行信息
|
||||
cusBankService.deleteCusData(cusId);
|
||||
return toAjax(cusMainSeasService.removeByIds(list));
|
||||
}
|
||||
|
||||
|
||||
@ -18,4 +18,12 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
public interface CusBankMapper extends BaseMapper<CusBank>
|
||||
{
|
||||
IPage<CusBank> queryListPage(@Param("entity") CusBank entity, Page<CusBank> page);
|
||||
|
||||
/**
|
||||
* 删除客户银行信息
|
||||
* @author vinjor-M
|
||||
* @date 10:14 2025/11/24
|
||||
* @return int
|
||||
**/
|
||||
int deleteCusData(String cusId);
|
||||
}
|
||||
|
||||
@ -18,4 +18,12 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
public interface CusCompanyMapper extends BaseMapper<CusCompany>
|
||||
{
|
||||
IPage<CusCompany> queryListPage(@Param("entity") CusCompany entity, Page<CusCompany> page);
|
||||
|
||||
/**
|
||||
* 删除客户公司信息
|
||||
* @author vinjor-M
|
||||
* @date 10:14 2025/11/24
|
||||
* @return int
|
||||
**/
|
||||
int deleteCusData(String cusId);
|
||||
}
|
||||
|
||||
@ -27,4 +27,12 @@ public interface CusContactsMapper extends BaseMapper<CusContacts>
|
||||
* @return void
|
||||
**/
|
||||
void updateOtherDefault(@Param("cusId") String cusId);
|
||||
|
||||
/**
|
||||
* 删除客户联系人信息
|
||||
* @author vinjor-M
|
||||
* @date 10:14 2025/11/24
|
||||
* @return int
|
||||
**/
|
||||
int deleteCusData(String cusId);
|
||||
}
|
||||
|
||||
@ -26,4 +26,12 @@ public interface CusManagerMapper extends BaseMapper<CusManager>
|
||||
* @return int
|
||||
**/
|
||||
int updateByCusId(@Param("entity") CusManager entity);
|
||||
|
||||
/**
|
||||
* 删除客户管理信息
|
||||
* @author vinjor-M
|
||||
* @date 10:14 2025/11/24
|
||||
* @return int
|
||||
**/
|
||||
int deleteCusData(String cusId);
|
||||
}
|
||||
|
||||
@ -18,4 +18,13 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
public interface CusMarkMapper extends BaseMapper<CusMark>
|
||||
{
|
||||
IPage<CusMark> queryListPage(@Param("entity") CusMark entity, Page<CusMark> page);
|
||||
|
||||
/**
|
||||
* 删除客户唛头信息
|
||||
* @author vinjor-M
|
||||
* @date 9:34 2025/11/26
|
||||
* @param cusId TODO
|
||||
* @return int
|
||||
**/
|
||||
int deleteCusMark(@Param("cusId") String cusId);
|
||||
}
|
||||
|
||||
@ -25,4 +25,12 @@ public interface ICusBankService extends IService<CusBank> {
|
||||
* @date 15:58 2025/11/20
|
||||
**/
|
||||
void saveOrUpdateByAccount(List<CusBank> cusBankList);
|
||||
|
||||
/**
|
||||
* 根据客户id删除数据
|
||||
* @author vinjor-M
|
||||
* @date 9:20 2025/11/26
|
||||
* @param cusId 客户id
|
||||
**/
|
||||
void deleteCusData(String cusId);
|
||||
}
|
||||
|
||||
@ -25,4 +25,12 @@ public interface ICusCompanyService extends IService<CusCompany> {
|
||||
* @date 15:15 2025/11/20
|
||||
**/
|
||||
void saveOrUpdateByCusName(List<CusCompany> cusCompanyList);
|
||||
|
||||
/**
|
||||
* 根据客户id删除数据
|
||||
* @author vinjor-M
|
||||
* @date 9:20 2025/11/26
|
||||
* @param cusId 客户id
|
||||
**/
|
||||
void deleteCusData(String cusId);
|
||||
}
|
||||
|
||||
@ -40,4 +40,12 @@ public interface ICusContactsService extends IService<CusContacts> {
|
||||
* @param cusId TODO
|
||||
**/
|
||||
void updateOtherDefault(String cusId);
|
||||
|
||||
/**
|
||||
* 根据客户id删除数据
|
||||
* @author vinjor-M
|
||||
* @date 9:20 2025/11/26
|
||||
* @param cusId 客户id
|
||||
**/
|
||||
void deleteCusData(String cusId);
|
||||
}
|
||||
|
||||
@ -32,4 +32,12 @@ public interface ICusManagerService extends IService<CusManager> {
|
||||
* @date 10:13 2025/11/24
|
||||
**/
|
||||
void updateByCusId(CusManager cusManager);
|
||||
|
||||
/**
|
||||
* 根据客户id删除数据
|
||||
* @author vinjor-M
|
||||
* @date 9:20 2025/11/26
|
||||
* @param cusId 客户id
|
||||
**/
|
||||
void deleteCusData(String cusId);
|
||||
}
|
||||
|
||||
@ -15,4 +15,12 @@ import com.ruoyi.cus.domain.CusMark;
|
||||
public interface ICusMarkService extends IService<CusMark>
|
||||
{
|
||||
IPage<CusMark> queryListPage(CusMark pageReqVO, Page<CusMark> page);
|
||||
|
||||
/**
|
||||
* 根据客户id删除数据
|
||||
* @author vinjor-M
|
||||
* @date 9:20 2025/11/26
|
||||
* @param cusId 客户id
|
||||
**/
|
||||
void deleteCusMark(String cusId);
|
||||
}
|
||||
|
||||
@ -98,4 +98,15 @@ public class CusBankServiceImpl extends ServiceImpl<CusBankMapper, CusBank> impl
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据客户id删除数据
|
||||
*
|
||||
* @param cusId 客户id
|
||||
* @author vinjor-M
|
||||
* @date 9:20 2025/11/26
|
||||
**/
|
||||
@Override
|
||||
public void deleteCusData(String cusId) {
|
||||
cusBankMapper.deleteCusData(cusId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -97,4 +97,15 @@ public class CusCompanyServiceImpl extends ServiceImpl<CusCompanyMapper, CusComp
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据客户id删除数据
|
||||
*
|
||||
* @param cusId 客户id
|
||||
* @author vinjor-M
|
||||
* @date 9:20 2025/11/26
|
||||
**/
|
||||
@Override
|
||||
public void deleteCusData(String cusId) {
|
||||
cusCompanyMapper.deleteCusData(cusId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,4 +120,16 @@ public class CusContactsServiceImpl extends ServiceImpl<CusContactsMapper,CusCon
|
||||
this.updateBatchById(toUpdateList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据客户id删除数据
|
||||
*
|
||||
* @param cusId 客户id
|
||||
* @author vinjor-M
|
||||
* @date 9:20 2025/11/26
|
||||
**/
|
||||
@Override
|
||||
public void deleteCusData(String cusId) {
|
||||
cusContactsMapper.deleteCusData(cusId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ import com.ruoyi.cus.mapper.*;
|
||||
import com.ruoyi.cus.service.*;
|
||||
import com.ruoyi.cus.vo.*;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.ruoyi.utils.DateTimeUtil;
|
||||
import com.ruoyi.utils.SnowflakeIdGenerator;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -61,6 +62,8 @@ public class CusMainServiceImpl extends ServiceImpl<CusMainMapper,CusMain> impl
|
||||
private ICusMainSeasService cusMainSeasService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private DateTimeUtil dateTimeUtil;
|
||||
|
||||
@Override
|
||||
public IPage<MainVO> queryListPage(MainVO pageReqVO, Page<CusMain> page) {
|
||||
@ -253,15 +256,17 @@ public class CusMainServiceImpl extends ServiceImpl<CusMainMapper,CusMain> impl
|
||||
//查公海客户信息
|
||||
CusMainSeas cusMainSeas = cusMainSeasService.getById(id);
|
||||
BeanUtils.copyProperties(cusMainSeas, mainVO);
|
||||
mainVO.setCusLabelList(JSON.parseArray(cusMainSeas.getCusLabels()));
|
||||
cusViewVO.setCusMain(mainVO);
|
||||
}else{
|
||||
//正常客户
|
||||
CusMain cusMain = this.getById(id);
|
||||
BeanUtils.copyProperties(cusMain, mainVO);
|
||||
mainVO.setCusLabelList(JSON.parseArray(cusMain.getCusLabels()));
|
||||
cusViewVO.setCusMain(mainVO);
|
||||
}
|
||||
mainVO.setCusLabelList(JSON.parseArray(mainVO.getCusLabels()));
|
||||
//设置客户当前时间
|
||||
if(StringUtils.isNotEmpty(mainVO.getZoneName())){
|
||||
mainVO.setNowTime(dateTimeUtil.getZoneTime(mainVO.getZoneName()));
|
||||
}
|
||||
cusViewVO.setCusMain(mainVO);
|
||||
//2.客户联系人信息
|
||||
CusContacts contacts = new CusContacts();
|
||||
contacts.setCusId(id);
|
||||
|
||||
@ -108,4 +108,16 @@ public class CusManagerServiceImpl extends ServiceImpl<CusManagerMapper, CusMana
|
||||
cusManagerMapper.updateByCusId(cusManager);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据客户id删除数据
|
||||
*
|
||||
* @param cusId 客户id
|
||||
* @author vinjor-M
|
||||
* @date 9:20 2025/11/26
|
||||
**/
|
||||
@Override
|
||||
public void deleteCusData(String cusId) {
|
||||
cusManagerMapper.deleteCusData(cusId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -26,4 +26,17 @@ public class CusMarkServiceImpl extends ServiceImpl<CusMarkMapper,CusMark> impl
|
||||
public IPage<CusMark> queryListPage(CusMark pageReqVO, Page<CusMark> page) {
|
||||
return cusMarkMapper.queryListPage(pageReqVO, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据客户id删除数据
|
||||
*
|
||||
* @param cusId 客户id
|
||||
* @author vinjor-M
|
||||
* @date 9:20 2025/11/26
|
||||
**/
|
||||
@Override
|
||||
public void deleteCusMark(String cusId) {
|
||||
cusMarkMapper.deleteCusMark(cusId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -42,4 +42,7 @@ public class MainVO extends CusMain {
|
||||
/** 最近联系时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date contactTime;
|
||||
|
||||
/** 客户所在时区当前时间 */
|
||||
private String nowTime;
|
||||
}
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
package com.ruoyi.utils;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
@Component
|
||||
public class DateTimeUtil {
|
||||
|
||||
/**
|
||||
* 获取某时区当前时间
|
||||
* @author vinjor-M
|
||||
* @date 10:50 2025/11/26
|
||||
* @param zoneName TODO
|
||||
* @return java.lang.String
|
||||
**/
|
||||
public String getZoneTime(String zoneName){
|
||||
// 1. 定义目标时区ID(推荐使用 IANA 时区ID,避免旧版 ID 兼容问题)
|
||||
ZoneId zoneId = ZoneId.of(zoneName);
|
||||
|
||||
// 2. 获取该时区的当前时间(ZonedDateTime 包含 日期+时间+时区+偏移量)
|
||||
ZonedDateTime zonedDateTime = ZonedDateTime.now(zoneId);
|
||||
|
||||
// 3. (可选)格式化时间为自定义格式(如:yyyy-MM-dd HH:mm:ss zzzz)
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss zzzz");
|
||||
return zonedDateTime.format(formatter);
|
||||
}
|
||||
}
|
||||
@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<resultMap type="BaseTimeZone" id="BaseTimeZoneResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="zoneName" column="zone_name" />
|
||||
<result property="zoneCn" column="zone_cn" />
|
||||
<result property="utcOffset" column="utc_offset" />
|
||||
<result property="abbreviation" column="abbreviation" />
|
||||
<result property="usesDst" column="uses_dst" />
|
||||
@ -15,13 +16,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseTimeZoneVo">
|
||||
select id, zone_name, utc_offset, abbreviation, uses_dst, dst_offset, description from base_time_zone
|
||||
select id, zone_name, zone_cn,utc_offset, abbreviation, uses_dst, dst_offset, description from base_time_zone
|
||||
</sql>
|
||||
|
||||
<select id="queryListPage" parameterType="BaseTimeZone" resultMap="BaseTimeZoneResult">
|
||||
<include refid="selectBaseTimeZoneVo"/>
|
||||
<where>
|
||||
<if test="entity.zoneName != null and entity.zoneName != ''"> and zone_name like concat('%', #{entity.zoneName}, '%')</if>
|
||||
<if test="entity.zoneCn != null and entity.zoneCn != ''"> and zone_cn like concat('%', #{entity.zoneCn}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -34,4 +34,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by update_time desc
|
||||
</select>
|
||||
|
||||
<update id="deleteCusData">
|
||||
update cus_bank set del_flag = '1' where cus_id = #{cusId}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -21,6 +21,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<sql id="selectCusCompanyVo">
|
||||
select id, cus_id, cus_from, cus_level, busi_type, contact_address, del_flag, creator, create_time, updater, update_time from cus_company
|
||||
</sql>
|
||||
<update id="deleteCusData">
|
||||
update cus_company set del_flag = '1' where cus_id = #{cusId}
|
||||
</update>
|
||||
|
||||
<select id="queryListPage" parameterType="CusCompany" resultMap="CusCompanyResult">
|
||||
<include refid="selectCusCompanyVo"/>
|
||||
|
||||
@ -52,4 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="entity.updateTime != null "> and update_time = #{entity.updateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
<update id="deleteCusData">
|
||||
update cus_contacts set del_flag = '1' where cus_id = #{cusId}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -23,6 +23,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<sql id="selectCusManagerVo">
|
||||
select id, cus_id, user_id,user_name, follow_step, seas_reason, seas_group, old_dept, del_flag, creator, create_time, updater, update_time from cus_manager
|
||||
</sql>
|
||||
<update id="deleteCusData">
|
||||
update cus_manager set del_flag = '1' where cus_id = #{cusId}
|
||||
</update>
|
||||
<select id="queryListPage" parameterType="CusManager" resultMap="CusManagerResult">
|
||||
<include refid="selectCusManagerVo"/>
|
||||
<where>
|
||||
|
||||
@ -32,4 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="entity.updateTime != null "> and update_time = #{entity.updateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
<update id="deleteCusMark">
|
||||
update cus_mark set del_flag = '1' where cus_id = #{cusId}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -78,12 +78,21 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="时区" label-width="100px">
|
||||
<el-select style="width: 100%" v-model="formData.mainInfo.zoneName" filterable placeholder="时区" clearable>
|
||||
<el-option
|
||||
v-for="item in timeZoneList"
|
||||
:key="item.zoneName"
|
||||
:label="dict.zoneName+'('+dict.utcOffset+')'"
|
||||
:value="item.zoneName"
|
||||
/>
|
||||
<el-tooltip v-for="item in timeZoneList" class="item" effect="dark" :content="'客户当地时间:'+item.nowTime" placement="top-start">
|
||||
<el-option
|
||||
:key="item.zoneName"
|
||||
:label="item.zoneCn+'('+item.utcOffset+')'"
|
||||
:value="item.zoneName"
|
||||
>
|
||||
<span v-if="parseTime(new Date(), '{y}-{m}-{d}')==item.nowTime.substring(0,10)">
|
||||
{{item.nowTime.substring(11,16)}}-{{item.zoneCn}}-{{item.utcOffset}}
|
||||
</span>
|
||||
<span v-else>
|
||||
<span style="color: #ffba00">{{item.nowTime.substring(11,16)}}</span>
|
||||
-{{item.zoneCn}}-{{item.utcOffset}}
|
||||
</span>
|
||||
</el-option>
|
||||
</el-tooltip>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -388,7 +388,7 @@ export default {
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.title = '用户导入'
|
||||
this.upload.title = '客户导入'
|
||||
this.upload.open = true
|
||||
},
|
||||
/**
|
||||
|
||||
@ -119,12 +119,21 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="时区">
|
||||
<el-select style="width: 100%" v-model="formData.mainInfo.zoneName" filterable placeholder="时区" clearable>
|
||||
<el-option
|
||||
v-for="dict in timeZoneList"
|
||||
:key="dict.zoneName"
|
||||
:label="dict.zoneName+'('+dict.utcOffset+')'"
|
||||
:value="dict.zoneName"
|
||||
/>
|
||||
<el-tooltip v-for="item in timeZoneList" class="item" effect="dark" :content="'客户当地时间:'+item.nowTime" placement="top-start">
|
||||
<el-option
|
||||
:key="item.zoneName"
|
||||
:label="item.zoneCn+'('+item.utcOffset+')'"
|
||||
:value="item.zoneName"
|
||||
>
|
||||
<span v-if="parseTime(new Date(), '{y}-{m}-{d}')==item.nowTime.substring(0,10)">
|
||||
{{item.nowTime.substring(11,16)}}-{{item.zoneCn}}-{{item.utcOffset}}
|
||||
</span>
|
||||
<span v-else>
|
||||
<span style="color: #ffba00">{{item.nowTime.substring(11,16)}}</span>
|
||||
-{{item.zoneCn}}-{{item.utcOffset}}
|
||||
</span>
|
||||
</el-option>
|
||||
</el-tooltip>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<div class="time-container">
|
||||
<i class="el-icon-time dl-hover"/>
|
||||
<span title="客户所在国家当前时间" class="meta-value">--</span>
|
||||
<span v-if="" title="客户所在国家当前时间" class="meta-value">{{mainInfo.cusMain.nowTime?mainInfo.cusMain.nowTime.substring(0,16):'--'}}</span>
|
||||
</div>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<div class="customer-code-container">
|
||||
|
||||
@ -362,7 +362,7 @@ export default {
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.title = '用户导入'
|
||||
this.upload.title = '客户导入'
|
||||
this.upload.open = true
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user