提交 20f93796 authored 作者: 000516's avatar 000516
package com.wangxiaolu.promotion.controller.activity.examine;
import com.alibaba.fastjson.JSONObject;
import com.wangxiaolu.promotion.enums.plan.PlanStatus;
import com.wangxiaolu.promotion.pojo.activity.examine.dto.ActivityExamineDto;
import com.wangxiaolu.promotion.pojo.activity.examine.vo.ExaPlanVo;
import com.wangxiaolu.promotion.result.basedata.R;
......
......@@ -167,7 +167,7 @@ public class PromPlanCoreController {
if (isAuth) {
employeeNo = "";
}
promPlanCoreService.deletePlan(activityPlanVo.getPlanIds(), employeeNo);
promPlanCoreService.deletePlan(activityPlanVo.getPlanIds(), employeeNo,activityPlanVo.getEmployeeNo());
return R.success();
}
......@@ -200,6 +200,9 @@ public class PromPlanCoreController {
return R.success();
}
/**
* 修改计划
*/
@PutMapping("/one")
public R putActivityPlan(@RequestBody ActivityPlanOperVo operVo){
if (Objects.isNull(operVo.getId())){
......@@ -214,6 +217,9 @@ public class PromPlanCoreController {
return R.success();
}
/**
* 变更归属人
*/
@PutMapping("/more")
public R putActivityPlans(@RequestBody ActivityPlanOperVo operVo){
if (Objects.isNull(operVo.getEmployeeId()) || Collections.isEmpty(operVo.getPlanIds())){
......
......@@ -21,7 +21,7 @@ public interface ActivityPlanInfoDao {
ActivityPlanInfoDto selectPlan(String storeCode, Date date);
void deleteByPlanIds(List<Long> planIds, String employeeNo);
void deleteByPlanIds(List<Long> planIds, String employeeNo,String operNo);
void updateList(JSONArray table, Long recordId);
......
......@@ -11,6 +11,7 @@ import com.wangxiaolu.promotion.domain.activityplanv2.mapper.entity.ActivityPlan
import com.wangxiaolu.promotion.domain.manage.wrapperQo.ActivityPlanInfoWrapper;
import com.wangxiaolu.promotion.enums.plan.PlanStatus;
import com.wangxiaolu.promotion.exception.DataException;
import com.wangxiaolu.promotion.exception.FlowException;
import com.wangxiaolu.promotion.pojo.PageInfo;
import com.wangxiaolu.promotion.pojo.activity.planv2.dto.ActivityPlanInfoDto;
import com.wangxiaolu.promotion.result.basedata.RCode;
......@@ -19,6 +20,7 @@ import org.apache.ibatis.exceptions.PersistenceException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Date;
import java.util.List;
......@@ -67,6 +69,11 @@ public class ActivityPlanInfoDaoImpl implements ActivityPlanInfoDao {
@Override
public void updateById(ActivityPlanInfoDto planDto) {
// todo 判断计划是否存在
// ActivityPlanInfoDo activityPlanInfoDo = activityPlanInfoMapper.selectPlan(planDto.getStoreCode(), planDto.getDate());
// if (Objects.isNull(activityPlanInfoDo)){
// throw new DataException(RCode.ACTIVITY_PLAN_IS_NULL);
// }
ActivityPlanInfoDo planDo = BeanUtils.transitionDto(planDto, ActivityPlanInfoDo.class);
activityPlanInfoMapper.updateById(planDo);
}
......@@ -95,6 +102,7 @@ public class ActivityPlanInfoDaoImpl implements ActivityPlanInfoDao {
@Override
public void updateByIds(List<Long> planIds, ActivityPlanInfoDto planDto) {
errorMoreDate(planIds);
activityPlanInfoMapper.updateByIds(planIds, planDto);
}
......@@ -114,18 +122,14 @@ public class ActivityPlanInfoDaoImpl implements ActivityPlanInfoDao {
}
@Override
public void deleteByPlanIds(List<Long> planIds, String employeeNo) {
public void deleteByPlanIds(List<Long> planIds, String employeeNo,String operNo) {
// 判断ID中是否包含之前数据、非个人数据
Integer count = activityPlanInfoMapper.selectNotDelCount(planIds,employeeNo);
if (count > 0 ) {
throw new DataException(RCode.ACTIVITY_PLAN_NOT_SELF_DELETE);
throw new FlowException(RCode.ACTIVITY_PLAN_NOT_SELF_DELETE);
}
Integer countToday = activityPlanInfoMapper.selectTodayCount(planIds);
// 今日数据存在时,判断当前时间是否在今日10点前
if (countToday > 0 && (LocalTime.now().getHour() >= 10)) {
throw new DataException(RCode.ACTIVITY_PLAN_NOT_DELETE);
}
activityPlanInfoMapper.updateIsDelete(planIds);
errorMoreDate(planIds);
activityPlanInfoMapper.updateIsDelete(planIds,operNo);
}
private LambdaQueryWrapper<ActivityPlanInfoDo> buildWrapper(ActivityPlanInfoWrapper wrapper) {
LambdaQueryWrapper<ActivityPlanInfoDo> qw = new LambdaQueryWrapper<>();
......@@ -169,5 +173,18 @@ public class ActivityPlanInfoDaoImpl implements ActivityPlanInfoDao {
return qw;
}
private void errorMoreDate(List<Long> planIds){
List<ActivityPlanInfoDo> todayPlans = activityPlanInfoMapper.selectTodayCount(planIds);
// 今日数据存在时,判断是否执行、上班时间顺延1小时
for (ActivityPlanInfoDo todayPlan : todayPlans) {
if (PlanStatus.EXECUTION.getCode().equals(todayPlan.getPlanStatus())) {
throw new FlowException(RCode.ACTIVITY_ID_IS_START.getCode(),String.format(RCode.ACTIVITY_ID_IS_START.getMsg(),todayPlan.getId()));
}
// 判断修改时间是否在促销员上班1小时内
if (LocalDateTime.now().isAfter(todayPlan.getClockInTime().plusHours(1))){
throw new FlowException(RCode.ACTIVITY_PLAN_ID_NOT_DELETE.getCode(),String.format(RCode.ACTIVITY_PLAN_ID_NOT_DELETE.getMsg(),todayPlan.getId()));
}
}
}
}
......@@ -26,13 +26,13 @@ public interface ActivityPlanInfoMapper extends BaseMapper<ActivityPlanInfoDo> {
ActivityPlanInfoDo selectPlan(String storeCode, Date date);
void updateIsDelete(List<Long> planIds);
void updateIsDelete(@Param("planIds") List<Long> planIds,@Param("employeeNo") String employeeNo);
Integer selectNotDelCount(@Param("planIds") List<Long> planIds,@Param("employeeNo") String employeeNo);
void updateOne(@Param("pDo") ActivityPlanInfoDo pDo,@Param("recordId") Long recordId);
Integer selectTodayCount(List<Long> planIds);
List<ActivityPlanInfoDo> selectTodayCount(List<Long> planIds);
void updatePlanStatus(@Param("id") Long planId, @Param("status") Integer status);
......
......@@ -121,11 +121,31 @@ public class ActivityExamineDO implements Serializable {
*/
private String temHs;
/**
* 当话术未达标时,有一个话术未达标原因的备注输入框
*/
private String temHsRemark;
/**
* 物料:齐全/缺少
*/
private String temWl;
/**
* 试吃品是否齐全:齐全/缺少
*/
private String temWlScp;
/**
* 是否有试吃台:有/无
*/
private String temWlSct;
/**
* 是否有试吃托盘:有/无
*/
private String temWlSctp;
/**
* 着装:达标/未达标
*/
......@@ -156,6 +176,11 @@ public class ActivityExamineDO implements Serializable {
*/
private String posPhotos;
/**
* 促销员的工资
*/
private BigDecimal temSalary;
/**
*
*/
......@@ -176,6 +201,11 @@ public class ActivityExamineDO implements Serializable {
*/
private String modifyBy;
/**
* 备注
*/
private String remark;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -45,9 +45,10 @@ public class QinCeClienteleStoreDaoImpl implements QinCeClienteleStoreDao {
try {
QinCeClienteleStoreDO qinCeShopDO = JSONObject.parseObject(responseData.toString(), QinCeClienteleStoreDO.class);
if (qinCeShopDO.getStoreStatus().equals("0")){
continue;
}
// if (qinCeShopDO.getStoreStatus().equals("0") && Objects.nonNull(qinCeShopDO.getQcId())){
// qinCeClienteleStoreMapper.updateStatusById(qinCeShopDO.getQcId());
// continue;
// }
// 添加经销商
List<JSONObject> dealers = qinCeShopDO.getDealers();
......@@ -104,6 +105,7 @@ public class QinCeClienteleStoreDaoImpl implements QinCeClienteleStoreDao {
// 指定字段查询
qw.select(QinCeClienteleStoreDO::getQcId,
QinCeClienteleStoreDO::getStoreName,
QinCeClienteleStoreDO::getStoreCode,
QinCeClienteleStoreDO::getDealersName,
QinCeClienteleStoreDO::getDealerId,
QinCeClienteleStoreDO::getLineName,
......@@ -138,6 +140,10 @@ public class QinCeClienteleStoreDaoImpl implements QinCeClienteleStoreDao {
if (StringUtils.isNotBlank(storeWrapper.getStoreNameVague())) {
qw.like(QinCeClienteleStoreDO::getStoreName, storeWrapper.getStoreNameVague().trim());
}
// 按经销商ID查询
if (StringUtils.isNotBlank(storeWrapper.getDealerId())) {
qw.eq(QinCeClienteleStoreDO::getDealerId, storeWrapper.getDealerId());
}
return qw;
}
......
......@@ -14,6 +14,7 @@ import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface QinCeClienteleStoreMapper extends BaseMapper<QinCeClienteleStoreDO> {
void updateStatusById(String qcId);
}
......
......@@ -30,4 +30,5 @@ public class StoreWrapper {
private String storeStatus = "1";
private String storeApprovalStatus = "3";
private String storeCode;
private String dealerId;
}
......@@ -119,10 +119,29 @@ public class ActivityExamineDto {
*/
private String temHs;
/**
* 当话术未达标时,有一个话术未达标原因的备注输入框
*/
private String temHsRemark;
/**
* 物料:齐全/缺少
*/
private String temWl;
/**
* 试吃品是否齐全:齐全/缺少
*/
private String temWlScp;
/**
* 是否有试吃台:有/无
*/
private String temWlSct;
/**
* 是否有试吃托盘:有/无
*/
private String temWlSctp;
/**
* 着装:达标/未达标
......@@ -148,6 +167,10 @@ public class ActivityExamineDto {
* POS金额
*/
private BigDecimal posRmb;
/**
* 促销员的工资
*/
private BigDecimal temSalary;
/**
* pos照片
......@@ -173,4 +196,9 @@ public class ActivityExamineDto {
* 修改人
*/
private String modifyBy;
/**
* 备注
*/
private String remark;
}
......@@ -6,7 +6,6 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.Date;
/**
* @author : liqiulin
......@@ -122,10 +121,29 @@ public class ExaPlanVo {
*/
private String temHs;
/**
* 当话术未达标时,有一个话术未达标原因的备注输入框
*/
private String temHsRemark;
/**
* 物料:齐全/缺少
*/
private String temWl;
/**
* 试吃品是否齐全:齐全/缺少
*/
private String temWlScp;
/**
* 是否有试吃台:有/无
*/
private String temWlSct;
/**
* 是否有试吃托盘:有/无
*/
private String temWlSctp;
/**
* 着装:达标/未达标
......@@ -156,6 +174,14 @@ public class ExaPlanVo {
* pos照片
*/
private JSONArray posPhotos;
/**
* 促销员的工资
*/
private BigDecimal temSalary;
/**
* 备注
*/
private String remark;
/**
* 操作人
*/
......
......@@ -32,4 +32,8 @@ public class ClienteleStoreQueryVo {
*/
private String storeStatus = "1";
private String storeApprovalStatus = "3";
/**
* 经销商ID(查询同一经销商内的门店)
*/
private String dealerId;
}
......@@ -18,7 +18,7 @@ public interface PromPlanCoreService {
void selfPlanAf(String planUuid);
void deletePlan(List<Long> planIds,String employeeNo);
void deletePlan(List<Long> planIds,String employeeNo,String operNo);
Map<String, Object> authPlanUp(ActivityPlanVo activityPlanVo, String filePath) throws DataException;
......
package com.wangxiaolu.promotion.service.activityplanv2.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
......@@ -19,17 +19,15 @@ import com.wangxiaolu.promotion.enums.plan.OperationType;
import com.wangxiaolu.promotion.enums.plan.PlanStatus;
import com.wangxiaolu.promotion.exception.DataException;
import com.wangxiaolu.promotion.exception.FlowException;
import com.wangxiaolu.promotion.exception.ParamException;
import com.wangxiaolu.promotion.pojo.activity.manage.vo.ActivityPlanVo;
import com.wangxiaolu.promotion.pojo.activity.planv2.dto.ActivityPlanInfoDto;
import com.wangxiaolu.promotion.pojo.activity.planv2.dto.ActivityPlanRecordDto;
import com.wangxiaolu.promotion.pojo.activity.manage.vo.ActivityPlanVo;
import com.wangxiaolu.promotion.pojo.activity.planv2.vo.ActivityPlanOperVo;
import com.wangxiaolu.promotion.pojo.user.dto.ManageEmployeeInfoDto;
import com.wangxiaolu.promotion.pojo.user.dto.QinCeClienteleStoreDto;
import com.wangxiaolu.promotion.result.basedata.RCode;
import com.wangxiaolu.promotion.service.activityplanv2.PromPlanCoreService;
import com.wangxiaolu.promotion.utils.DateUtils;
import groovyjarjarpicocli.CommandLine;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -38,6 +36,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.time.*;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
/**
......@@ -482,11 +481,20 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService {
ActivityPlanInfoDto dto = activityPlanInfoDao.selectById(operVo.getId());
// 已执行的计划不可修改
if (PlanStatus.EXECUTION.getCode().equals(dto.getPlanStatus())){
throw new FlowException(RCode.ACTIVITY_PLAN_EXECUTE_ERROR);
throw new FlowException(RCode.ACTIVITY_IS_START);
}
// 判断修改时间是否在促销员上班1小时内
if (LocalDateTime.now().isAfter(dto.getClockInTime().plusHours(1))){
dto.setErrorMsg("已超促销员上班时间1小时,不可修改;");
// 不可修改活动日期 <= 今日 的计划
if (DateUtils.parseDateBylocalDate(dto.getDate()).isBefore(LocalDate.now())){
throw new FlowException(RCode.ACTIVITY_PLAN_NOT_DELETE);
}
// 判断修改后 月底 >= 活动日期 > 今日
LocalDate today = LocalDate.now();
Date planDate = operVo.getDate();
LocalDate localDatePlan = DateUtils.parseDateBylocalDate(planDate);
LocalDate lastDayOfMonth = today.with(TemporalAdjusters.lastDayOfMonth());
if (!localDatePlan.isAfter(today) || localDatePlan.isAfter(lastDayOfMonth)){
throw new FlowException(RCode.ACTIVITY_PLAN_DATA_ERROR);
}
ActivityPlanInfoDto planDto = new ActivityPlanInfoDto();
......@@ -500,7 +508,24 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService {
.setOrgName(employeeInfoDto.getDeptQcName());
}
StoreWrapper storeWrap = new StoreWrapper().setStoreCode(operVo.getStoreCode());
QinCeClienteleStoreDto storeDto = qinCeClienteleStoreDao.getOneStore(storeWrap);
if (!storeDto.getDealerId().equals(dto.getDealerId())){
throw new FlowException(RCode.QINCE_STORE_DEALER_ERROR);
}
planDto.setId(operVo.getId())
.setLineName(storeDto.getLineName())
.setStoreCode(storeDto.getStoreCode())
.setStoreName(storeDto.getStoreName())
.setDealerId(storeDto.getDealerId())
.setDealerName(storeDto.getDealersName())
.setProvince(storeDto.getStoreMssProvince())
.setCity(storeDto.getStoreMssCity())
.setArea(storeDto.getStoreMssArea())
.setAddr(storeDto.getStoreAddr())
.setDate(planDate)
.setPattern(operVo.getPattern())
.setClockInTime(operVo.getClockInTime())
.setClockOutTime(operVo.getClockOutTime())
......@@ -739,7 +764,7 @@ public class PromPlanCoreServiceImpl implements PromPlanCoreService {
}
@Override
public void deletePlan(List<Long> planIds,String employeeNo) {
activityPlanInfoDao.deleteByPlanIds(planIds, employeeNo);
public void deletePlan(List<Long> planIds,String employeeNo,String operNo) {
activityPlanInfoDao.deleteByPlanIds(planIds, employeeNo,operNo);
}
}
......@@ -8,7 +8,7 @@ package com.wangxiaolu.promotion.service.user;
public interface QinCeDataTaskService {
void departmentSyncTask();
void employeeSyncTask();
void employeeSyncTask(int offset);
void shopDetailAllTask();
......
......@@ -64,9 +64,9 @@ public class QinCeDataTaskServiceImpl implements QinCeDataTaskService {
}
@Override
public void employeeSyncTask() {
public void employeeSyncTask(int offset) {
// 查询组织架构参数、创建url
Map<String, Object> params = qinCeUtils.queryEmployeeParam(false);
Map<String, Object> params = qinCeUtils.queryEmployeeParam(offset);
String url = qinCeUtils.builderUrl(QinCeUtils.QUERY_EMPLOYEE, params);
// 发起请求、接收结果
JSONObject resultJson = OkHttp.postQC(url, params);
......
......@@ -50,4 +50,11 @@ public class DateUtils {
Instant instant = zonedDateTime.toInstant();
return Date.from(instant);
}
public static LocalDate parseDateBylocalDate(Date date) {
if (date == null) {
return null;
}
return date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
}
}
......@@ -92,13 +92,13 @@ public class QinCeUtils {
/**
* 查询[人员]参数
*/
public Map<String, Object> queryEmployeeParam(boolean queryId) {
public Map<String, Object> queryEmployeeParam(int offset) {
Map<String, Object> params = new HashMap<>();
// 根据来源勤策的员工唯一标识精确查询
if (queryId) {
params.put("id", "");
}
DateTime dateTime = DateUtil.offsetDay(new Date(), -1);
// if (queryId) {
// params.put("id", "");
// }
DateTime dateTime = DateUtil.offsetDay(new Date(), offset);
params.put("modify_date", DateUtil.format(dateTime, DatePattern.NORM_DATE_PATTERN));
return params;
}
......
......@@ -45,10 +45,20 @@ public class XxlJobHandler {
@XxlJob("qince_employee_task")
public void employeeSyncTask(){
log.info("[xxl-job] start === 同步昨日修改过的员工数据");
qinCeDataTaskService.employeeSyncTask();
qinCeDataTaskService.employeeSyncTask(-1);
log.info("[xxl-job] end === 同步昨日修改过的员工修改数据");
}
/**
* t更新的员工数据
*/
@XxlJob("qince_employee_task_today")
public void employeeSyncTaskToday(){
log.info("[xxl-job] start === 同步今日修改过的员工数据");
qinCeDataTaskService.employeeSyncTask(0);
log.info("[xxl-job] end === 同步今日修改过的员工修改数据");
}
/**
* 1小时内修改过的终端数据
*/
......
......@@ -7,81 +7,27 @@
<resultMap id="BaseResultMap" type="com.wangxiaolu.promotion.domain.user.mapper.entity.QinCeClienteleStoreDO">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="qcId" column="qc_id" jdbcType="VARCHAR"/>
<result property="storeId" column="store_id" jdbcType="VARCHAR"/>
<result property="creatorWaiqinId" column="creator_waiqin_id" jdbcType="VARCHAR"/>
<result property="creatorName" column="creator_name" jdbcType="VARCHAR"/>
<result property="creatorId" column="creator_id" jdbcType="VARCHAR"/>
<result property="returnPoolReason" column="return_pool_reason" jdbcType="VARCHAR"/>
<result property="storeName" column="store_name" jdbcType="VARCHAR"/>
<result property="storeCode" column="store_code" jdbcType="VARCHAR"/>
<result property="storeManager" column="store_manager" jdbcType="VARCHAR"/>
<result property="storeManagerId" column="store_manager_id" jdbcType="VARCHAR"/>
<result property="storeManagerWaiqin365Id" column="store_manager_waiqin365_id" jdbcType="VARCHAR"/>
<result property="storeType" column="store_type" jdbcType="VARCHAR"/>
<result property="storeTypeCode" column="store_type_code" jdbcType="VARCHAR"/>
<result property="storeTypeId" column="store_type_id" jdbcType="VARCHAR"/>
<result property="storeLevelId" column="store_level_id" jdbcType="VARCHAR"/>
<result property="storeLevel" column="store_level" jdbcType="VARCHAR"/>
<result property="storeDeptWaiqin365Id" column="store_dept_waiqin365_id" jdbcType="VARCHAR"/>
<result property="storeDeptId" column="store_dept_id" jdbcType="VARCHAR"/>
<result property="storeDeptName" column="store_dept_name" jdbcType="VARCHAR"/>
<result property="storeDistrict" column="store_district" jdbcType="VARCHAR"/>
<result property="storeDistrictFullPath" column="store_district_full_path" jdbcType="VARCHAR"/>
<result property="storeDistrictWaiqin365Id" column="store_district_waiqin365_id" jdbcType="VARCHAR"/>
<result property="storeThirdDistrictId" column="store_third_district_id" jdbcType="VARCHAR"/>
<result property="storeMssProvince" column="store_mss_province" jdbcType="VARCHAR"/>
<result property="storeMssProvinceCode" column="store_mss_province_code" jdbcType="VARCHAR"/>
<result property="storeMssCity" column="store_mss_city" jdbcType="VARCHAR"/>
<result property="storeMssCityCode" column="store_mss_city_code" jdbcType="VARCHAR"/>
<result property="storeMssArea" column="store_mss_area" jdbcType="VARCHAR"/>
<result property="storeMssAreaCode" column="store_mss_area_code" jdbcType="VARCHAR"/>
<result property="storeMssStreet" column="store_mss_street" jdbcType="VARCHAR"/>
<result property="storeMssStreetCode" column="store_mss_street_code" jdbcType="VARCHAR"/>
<result property="storeAddr" column="store_addr" jdbcType="VARCHAR"/>
<result property="storeCooperateStatusId" column="store_cooperate_status_id" jdbcType="VARCHAR"/>
<result property="storeCooperateStatus" column="store_cooperate_status" jdbcType="CHAR"/>
<result property="storeKaSys" column="store_ka_sys" jdbcType="VARCHAR"/>
<result property="storeTel" column="store_tel" jdbcType="VARCHAR"/>
<result property="storeFax" column="store_fax" jdbcType="VARCHAR"/>
<result property="storePost" column="store_post" jdbcType="VARCHAR"/>
<result property="storeRemarks" column="store_remarks" jdbcType="VARCHAR"/>
<result property="tradingareaBig" column="tradingarea_big" jdbcType="VARCHAR"/>
<result property="tradingarea" column="tradingarea" jdbcType="VARCHAR"/>
<result property="tradingareaLevelCode" column="tradingarea_level_code" jdbcType="VARCHAR"/>
<result property="tradingareaLevelName" column="tradingarea_level_name" jdbcType="VARCHAR"/>
<result property="storeDistrictId" column="store_district_id" jdbcType="VARCHAR"/>
<result property="storeDistrictCode" column="store_district_code" jdbcType="VARCHAR"/>
<result property="storeDistrictCreateTime" column="store_district_create_time" jdbcType="CHAR"/>
<result property="storeDistrictModifyTime" column="store_district_modify_time" jdbcType="CHAR"/>
<result property="storeDistrictCreatorName" column="store_district_creator_name" jdbcType="VARCHAR"/>
<result property="storeDistrictModifyierName" column="store_district_modifyier_name" jdbcType="VARCHAR"/>
<result property="storeDistrictStatus" column="store_district_status" jdbcType="CHAR"/>
<result property="storeRelLevelId" column="store_rel_level_id" jdbcType="VARCHAR"/>
<result property="storeLabel" column="store_label" jdbcType="VARCHAR"/>
<result property="storeLabelId" column="store_label_id" jdbcType="VARCHAR"/>
<result property="storeAssistantId" column="store_assistant_id" jdbcType="VARCHAR"/>
<result property="storeAssistantName" column="store_assistant_name" jdbcType="VARCHAR"/>
<result property="storeRoadMsg" column="store_road_msg" jdbcType="VARCHAR"/>
<result property="storeHouseNumber" column="store_house_number" jdbcType="VARCHAR"/>
<result property="storeLiscenceName" column="store_liscence_name" jdbcType="VARCHAR"/>
<result property="storeRegistrationNo" column="store_registration_no" jdbcType="VARCHAR"/>
<result property="storeRegistrationDate" column="store_registration_date" jdbcType="VARCHAR"/>
<result property="storeOperator" column="store_operator" jdbcType="VARCHAR"/>
<result property="storeSaleDirect" column="store_sale_direct" jdbcType="VARCHAR"/>
<result property="storeModifyTime" column="store_modify_time" jdbcType="VARCHAR"/>
<result property="storeModifyierName" column="store_modifyier_name" jdbcType="VARCHAR"/>
<result property="storeCreateApprovalTime" column="store_create_approval_time" jdbcType="VARCHAR"/>
<result property="storeModifyApprovalTime" column="store_modify_approval_time" jdbcType="VARCHAR"/>
<result property="storeSourceType" column="store_source_type" jdbcType="VARCHAR"/>
<result property="storeSellingArea" column="store_selling_area" jdbcType="VARCHAR"/>
<result property="storeCashiersNum" column="store_cashiers_num" jdbcType="VARCHAR"/>
<result property="storeShelfNum" column="store_shelf_num" jdbcType="VARCHAR"/>
<result property="storeTotalNum" column="store_total_num" jdbcType="VARCHAR"/>
<result property="storeSelfProductNum" column="store_self_product_num" jdbcType="VARCHAR"/>
<result property="storeOpenTime" column="store_open_time" jdbcType="TIMESTAMP"/>
<result property="storeCloseTime" column="store_close_time" jdbcType="TIMESTAMP"/>
<result property="storePictures" column="store_pictures" jdbcType="VARCHAR"/>
<result property="storeLiscence" column="store_liscence" jdbcType="VARCHAR"/>
<result property="storeManagerCode" column="store_manager_code" jdbcType="VARCHAR"/>
<result property="storeCreatorCode" column="store_creator_code" jdbcType="VARCHAR"/>
<result property="storeModifierCode" column="store_modifier_code" jdbcType="VARCHAR"/>
......@@ -90,34 +36,7 @@
<result property="createTime" column="create_time" jdbcType="CHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,qc_id,store_id,
creator_waiqin_id,creator_name,creator_id,
return_pool_reason,store_name,store_code,
store_manager,store_manager_id,store_manager_waiqin365_id,
store_type,store_type_code,store_type_id,
store_level_id,store_level,store_dept_waiqin365_id,
store_dept_id,store_dept_name,store_district,
store_district_full_path,store_district_waiqin365_id,store_third_district_id,
store_mss_province,store_mss_province_code,store_mss_city,
store_mss_city_code,store_mss_area,store_mss_area_code,
store_mss_street,store_mss_street_code,store_addr,
store_cooperate_status_id,store_cooperate_status,store_ka_sys,
store_tel,store_fax,store_post,
store_remarks,tradingarea_big,tradingarea,
tradingarea_level_code,tradingarea_level_name,store_district_id,
store_district_code,store_district_create_time,store_district_modify_time,
store_district_creator_name,store_district_modifyier_name,store_district_status,
store_rel_level_id,store_label,store_label_id,
store_assistant_id,store_assistant_name,store_road_msg,
store_house_number,store_liscence_name,store_registration_no,
store_registration_date,store_operator,store_sale_direct,
store_modify_time,store_modifyier_name,store_create_approval_time,
store_modify_approval_time,store_source_type,store_selling_area,
store_cashiers_num,store_shelf_num,store_total_num,
store_self_product_num,store_open_time,store_close_time,
store_pictures,store_liscence,store_manager_code,
store_creator_code,store_modifier_code,store_approval_status,
store_status,create_time
</sql>
<update id="updateStatusById" >
update qince_clientele_store set store_status = '0' where qc_id = #{qcId}
</update>
</mapper>
......@@ -99,7 +99,8 @@
<update id="updateIsDelete" parameterType="java.util.List">
update activity_plan_info
set is_delete = 0
set is_delete = 0,
modify_by = (select name from manage_employee_info mei where mei.employee_no = #{employeeNo})
where id in
<foreach collection="planIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
......@@ -120,9 +121,8 @@
</if>
</select>
<select id="selectTodayCount" resultType="java.lang.Integer">
select count(*)
from activity_plan_info
<select id="selectTodayCount" resultMap="SimResultMap">
select id,clock_in_time, plan_status from activity_plan_info
where id in
<foreach collection="planIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
......
......@@ -11,8 +11,6 @@
<result property="employeeNo" column="employee_no" jdbcType="VARCHAR"/>
<result property="planId" column="plan_id" jdbcType="BIGINT"/>
<result property="planStatus" column="plan_status" jdbcType="VARCHAR"/>
<result property="reportedIds" column="reported_ids" jdbcType="VARCHAR"/>
<result property="clockIds" column="clock_ids" jdbcType="VARCHAR"/>
<result property="deptQcOrgName" column="dept_qc_org_name" jdbcType="VARCHAR"/>
<result property="manageName" column="manage_name" jdbcType="VARCHAR"/>
<result property="city" column="city" jdbcType="VARCHAR"/>
......@@ -38,6 +36,12 @@
<result property="modifyTime" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="modifyBy" column="modify_by" jdbcType="VARCHAR"/>
<result property="temHsRemark" column="tem_hs_remark" jdbcType="VARCHAR"/>
<result property="temWlScp" column="tem_wl_scp" jdbcType="VARCHAR"/>
<result property="temWlSct" column="tem_wl_sct" jdbcType="VARCHAR"/>
<result property="temWlSctp" column="tem_wl_sctp" jdbcType="VARCHAR"/>
<result property="temSalary" column="tem_salary" jdbcType="DECIMAL"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -50,7 +54,7 @@
tem_hs,tem_wl,tem_zz,
tem_work_photos,store_tc_photo,store_zhj_photo,
pos_rmb,pos_photos,create_time,
modify_time,create_by,modify_by
modify_time,create_by,modify_by,tem_hs_remark,tem_hs_remark,tem_wl_scp,tem_wl_sct,tem_wl_sctp,tem_salary,remark
</sql>
<select id="selectByPlanId" resultMap="BaseResultMap">
......
......@@ -47,7 +47,7 @@ class OkHttpTest {
@Test
void postEmployee() {
// 查询组织架构参数
Map<String, Object> params = qinCeUtils.queryEmployeeParam(false);
Map<String, Object> params = qinCeUtils.queryEmployeeParam(0);
// 创建url
String url = qinCeUtils.builderUrl(QinCeUtils.QUERY_EMPLOYEE,params);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论