Commit c57e9844 by guojuxing

Merge remote-tracking branch 'origin/developer' into developer

parents 1ac80a57 f30b49cc
......@@ -534,4 +534,15 @@ public interface StoreApiService {
* @throws
*/
ServiceResponse<List<StoreDTO>> listStoreFromDb(Integer enterpriseId, StoreSearchDbDTO storeSearchDbDTO);
/**
* hasUnCompleteStatusStore 商户下不启用的门店里是否存在有未完善的门店
* @Title: hasUnCompleteStatusStore
* @Description:
* @author zhiwj
* @param enterpriseId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Boolean> true:有存在未完善的门店, false:所有门店都已完善
* @throws
*/
ServiceResponse<Boolean> hasUnCompleteStatusStore(Integer enterpriseId);
}
......@@ -76,7 +76,7 @@ public interface TabStoreInfoMapper {
* @Title: countByBrandId
* @Description:
* @author zhiwj
* @param brandId
* @param brandId
* @return java.lang.Integer
* @throws
*/
......@@ -247,4 +247,15 @@ public interface TabStoreInfoMapper {
* @throws
*/
Integer getStoreIdByStoreInfoId(@Param("enterpriseId") Integer enterpriseId, @Param("storeInfoId") Integer storeInfoId);
/**
* hasUnCompleteStatusStore
* @Title: hasUnCompleteStatusStore
* @Description:
* @author zhiwj
* @param enterpriseId
* @return boolean
* @throws
*/
Integer hasUnCompleteStatusStore(@Param("enterpriseId") Integer enterpriseId);
}
\ No newline at end of file
......@@ -492,4 +492,15 @@ public interface StoreService {
* @throws
*/
int refreshStoreIndex(Integer enterpriseId, Integer storeGroupId);
/**
* hasUnCompleteStatusStore 商户下不启用的门店里是否存在有未完善的门店
* @Title: hasUnCompleteStatusStore
* @Description:
* @author zhiwj
* @param enterpriseId
* @return boolean
* @throws
*/
boolean hasUnCompleteStatusStore(Integer enterpriseId);
}
......@@ -572,4 +572,9 @@ public class StoreServiceImpl implements StoreService {
public int refreshStoreIndex(Integer enterpriseId, Integer storeGroupId) {
return this.tabStoreMapper.refreshStoreIndexByStoreGroup(enterpriseId, storeGroupId);
}
@Override
public boolean hasUnCompleteStatusStore(Integer enterpriseId) {
return tabStoreInfoMapper.hasUnCompleteStatusStore(enterpriseId) != null;
}
}
\ No newline at end of file
......@@ -738,8 +738,13 @@ public class ClerkApiServiceImpl implements ClerkApiService {
public ServiceResponse updateClerkLeader(Integer clerkId) {
TabClerk clerk = this.clerkService.getById(clerkId);
clerk.setPositionId(com.gic.store.constant.Constants.CLERK_LEADER_POSITION_ID);
String positionName = this.clerkPositionService.getByClerkPositionId(clerk.getPositionId()).getPositionName();
clerk.setPositionName(positionName);
TabClerk oldClerk = this.clerkService.getClerkLeaderByStoreInfoId(clerk.getEnterpriseId(), clerk.getStoreInfoId());
oldClerk.setPositionId(com.gic.store.constant.Constants.CLERK_POSITION_ID);
String oldPositionName = this.clerkPositionService.getByClerkPositionId(com.gic.store.constant.Constants.CLERK_POSITION_ID).getPositionName();
oldClerk.setPositionName(oldPositionName);
this.clerkService.update(oldClerk);
this.clerkService.update(clerk);
......
......@@ -382,6 +382,11 @@ public class StoreApiServiceImpl implements StoreApiService {
}
@Override
public ServiceResponse<Boolean> hasUnCompleteStatusStore(Integer enterpriseId) {
return ServiceResponse.success(this.storeService.hasUnCompleteStatusStore(enterpriseId));
}
@Override
public ServiceResponse<Integer> countByOverflowStatus(Integer enterpriseId) {
this.storeService.countByOverflowStatus(enterpriseId, 0);
return EnterpriseServiceResponse.success(this.storeService.countByOverflowStatus(enterpriseId, 0));
......
......@@ -409,9 +409,9 @@
</if>
</where>
</select>
<select id="listAllClerkId" resultMap="BaseResultMap">
<select id="listAllClerkId" resultType="int">
select
<include refid="Base_Column_List" />
clerk_id
from tab_clerk
where enterprise_id = #{enterpriseId}
</select>
......
......@@ -556,4 +556,14 @@
and t1.store_info_id = #{storeInfoId}
and t2.enterprise_id = #{enterpriseId}
</select>
<select id="hasUnCompleteStatusStore" resultType="java.lang.Integer">
select
1
from tab_store_info t1,tab_store t2 where t1.store_info_id = t2.store_info_id
and t2.enterprise_id = #{enterpriseId}
and t2.own_type = 0
and t1.status = 2
and t1.complete_status = 0
limit 1
</select>
</mapper>
\ No newline at end of file
......@@ -2,6 +2,7 @@ package com.gic.store.web.controller;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.annotation.HeaderSignIgnore;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.download.utils.log.LogUtils;
import com.gic.enterprise.error.ErrorCode;
......@@ -61,6 +62,7 @@ public class ClerkImportController {
* @throws Exception
*/
@RequestMapping("/clerk-import-template-download")
@HeaderSignIgnore
public Object download(HttpServletRequest request, HttpServletResponse response) throws Exception {
String fileName = " 导购资料导入模板.xlsx";
......
......@@ -459,6 +459,12 @@ public class StoreController extends DownloadUtils {
return RestResponse.success(EntityUtil.changeEntityListByJSON(StoreExportFieldVO.class, listSource));
}
@RequestMapping("/has-uncomplete-status-store")
public RestResponse hasUnCompleteStatusStore() {
ServiceResponse<Boolean> serviceResponse = this.storeApiService.hasUnCompleteStatusStore(UserDetailUtils.getUserDetail().getEnterpriseId());
return ResultControllerUtils.commonResult(serviceResponse);
}
@RequestMapping("export-store-list")
public RestResponse exportStoreList(HttpServletRequest request, @RequestBody StoreExportQO storeExportQO){
storeExportQO.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
......
......@@ -3,6 +3,7 @@ package com.gic.store.web.controller;
import com.alibaba.fastjson.JSON;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.annotation.HeaderSignIgnore;
import com.gic.commons.util.GlobalInfo;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.download.utils.log.LogUtils;
......@@ -73,6 +74,7 @@ public class StoreImportController {
*/
@IgnoreLogin
@RequestMapping("/store-import-template-download")
@HeaderSignIgnore
public Object download(HttpServletRequest request, HttpServletResponse response) throws Exception {
// ClassPathResource res = new ClassPathResource("门店资料导入模板.xlsx");
String regionIdStr = request.getParameter("regionId");
......
......@@ -3,6 +3,7 @@ package com.gic.store.web.controller;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.annotation.HeaderSignIgnore;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.download.utils.OperationResultUtils;
......@@ -33,7 +34,9 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -103,6 +106,7 @@ public class StoreTagController {
@RequestMapping("/template-download")
@IgnoreLogin
@HeaderSignIgnore
public Object download(HttpServletRequest request, HttpServletResponse response) throws Exception {
String fileName = " 门店标签批量导入模板.xlsx";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment