| | |
| | | * @date 2023/7/6 16:51 |
| | | */ |
| | | public interface StoreMapper extends BaseMapper<TStore> { |
| | | List<TStoreListVo> listAll(@Param("page") Page<TStoreListVo> page, @Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode, @Param("name") String name, @Param("phone") String phone, @Param("shopName") String shopName); |
| | | List<TStoreListVo> listAll(@Param("page") Page<TStoreListVo> page, @Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode, @Param("name") String name, @Param("phone") String phone, @Param("shopName") String shopName, @Param("operatorId") Integer operatorId); |
| | | |
| | | |
| | | /** |
| | |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | list = storeService.listAllStore(page,provinceCode,cityCode,name,phone,shopName,objectId); |
| | | }else { |
| | | list = storeService.listAll(page,provinceCode,cityCode,name,phone,shopName); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | list = storeService.listAll(page,provinceCode,cityCode,name,phone,shopName,objectId); |
| | | } |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | |
| | | |
| | | }else { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, pCode1)); |
| | | tStore.setProvince(one.getName()); |
| | | tStore.setProvinceCode(one.getCode()); |
| | | if (one !=null){ |
| | | tStore.setProvince(one.getName()); |
| | | tStore.setProvinceCode(one.getCode()); |
| | | } |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, cCode1)); |
| | | tStore.setCity(one1.getName()); |
| | | tStore.setCityCode(one1.getCode()); |
| | | if (one1 !=null){ |
| | | tStore.setCity(one1.getName()); |
| | | tStore.setCityCode(one1.getCode()); |
| | | } |
| | | } |
| | | tStore.setStartTime(time.split(" - ")[0]); |
| | | tStore.setEndTime(time.split(" - ")[1]); |
| | | tStore.setIds(ids); |
| | | tStore.setType(type); |
| | | if (UserExt.getUser().getObjectType()==2){ |
| | | tStore.setType(2); |
| | | }else{ |
| | | tStore.setType(type); |
| | | } |
| | | |
| | | tStore.setOperatorId(yyId); |
| | | tStore.setState(1); |
| | | tStore.setCreateTime(new Date()); |
| | |
| | | user.setPassword(SecureUtil.md5("a123456")); |
| | | user.setObjectType(3); |
| | | user.setStatus(1); |
| | | user.setObjectId(tStore.getId()); |
| | | userMapper.insert(user); |
| | | tStore.setStoreStaffId(user.getId()); |
| | | tStore.setLon(lon); |
| | | tStore.setLat(lat); |
| | | tStore.setOperatorId(UserExt.getUser().getObjectId()); |
| | | storeService.save(tStore); |
| | | |
| | | |
| | | user.setObjectId(tStore.getId()); |
| | | userMapper.insert(user); |
| | | |
| | | |
| | | |
| | | |
| | |
| | | site.setCityManagerId(cityManagerId); |
| | | site.setInsertTime(new Date()); |
| | | site.setState(1); |
| | | site.setOperatorId(UserExt.getUser().getObjectId()); |
| | | Integer integer1 = siteClient.addSite(site); |
| | | |
| | | HashMap<String, String> map = new HashMap<>(); |
| | |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | List<Store> stores = new ArrayList<>(); |
| | | if (objectType ==2 ){ |
| | | stores= storeClient.getStoreByCityManagerId(objectId); |
| | | List<TStore> operatorId = storeService.list(new QueryWrapper<TStore>().eq("operatorId", objectId)); |
| | | model.addAttribute("stores",operatorId); |
| | | }else if(objectType == 3){ |
| | | stores= storeClient.getStoreByStoreStaffId(objectId);; |
| | | stores= storeClient.getStoreByStoreStaffId(objectId); |
| | | model.addAttribute("stores",stores); |
| | | } |
| | | List<TOperator> list = tOperatorService.list(); |
| | | model.addAttribute("yysList",list); |
| | |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("objectType",objectType); |
| | | model.addAttribute("objectId",objectId); |
| | | model.addAttribute("stores",stores); |
| | | |
| | | return PREFIX + "TSite_add.html"; |
| | | |
| | | } |
| | |
| | | */ |
| | | List<Map<String, Object>> queryProvince(String cityCode); |
| | | |
| | | List<TStoreListVo> listAll(Page<TStoreListVo> page, String provinceCode, String cityCode, String name, String phone, String shopName); |
| | | List<TStoreListVo> listAll(Page<TStoreListVo> page, String provinceCode, String cityCode, String name, String phone, String shopName,Integer objectId); |
| | | |
| | | /** |
| | | * 根据省编号获取所有市 |
| | |
| | | public class StoreServiceImpl extends ServiceImpl<StoreMapper, TStore> implements IStoreService { |
| | | |
| | | @Override |
| | | public List<TStoreListVo> listAll(Page<TStoreListVo> page, String provinceCode, String cityCode, String name, String phone, String shopName) { |
| | | return this.baseMapper.listAll(page,provinceCode,cityCode,name,phone,shopName); |
| | | public List<TStoreListVo> listAll(Page<TStoreListVo> page, String provinceCode, String cityCode, String name, String phone, String shopName,Integer operatorId) { |
| | | return this.baseMapper.listAll(page,provinceCode,cityCode,name,phone,shopName,operatorId); |
| | | } |
| | | @Override |
| | | public List<TStoreListVo> listAllStore(Page<TStoreListVo> page, String provinceCode, String cityCode, String name, String phone, String shopName,Integer id) { |
| | |
| | | <if test="shopName !=null and shopName !=''"> |
| | | and t1.name like concat("%",#{shopName},"%") |
| | | </if> |
| | | <if test="operatorId !=null and operatorId !=''"> |
| | | and t1.operatorId = #{operatorId} |
| | | </if> |
| | | </select> |
| | | <select id="queryProvince" resultType="map"> |
| | | select * from ( |
| | |
| | | </select> |
| | | <select id="listAllStore" resultType="com.dsh.guns.modular.system.model.TStoreListVo"> |
| | | select t1.*,t2.name userName,t2.phone userPhone,t3.name yysName from t_store t1 left join sys_user t2 on t1.storeStaffId = t2.id left join t_operator t3 on t1.operatorId = t3.id |
| | | where t1.id =#{id} |
| | | where t1.id =#{operatorId} |
| | | <if test="provinceCode !=null and provinceCode !=''"> |
| | | and t1.provinceCode = #{provinceCode} |
| | | </if> |
| | |
| | | </div> |
| | | </div> |
| | | @} |
| | | |
| | | @if(role=='1'){ |
| | | <div id="yys1" > |
| | | <div class="form-group" id="provinceCode1"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <#input id="name" name="门店名称" type="text"/> |
| | | <#input id="phone" name="联系电话" type="text"/> |
| | | <div class="form-group"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | <label class="col-sm-3 control-label">所在市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode"> |
| | | <option value="">选择市</option> |
| | | @for(obj in list1){ |
| | | <option value="${obj.id}" ${item.cityCode == obj.code ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <#input id="name" name="门店名称" type="text" value="${item.name}"/> |
| | | <#input id="phone" name="联系电话" type="text" value="${item.phone}"/> |
| | | <div hidden id="longitude" value="${item.lon}"></div> |
| | |
| | | <button class="btn btn-outline btn-success" type="file" onclick="UploadFileFn()"><i class="fa fa-upload"></i>上传文件</button> |
| | | </div> |
| | | </div> |
| | | @if(objectType==1){ |
| | | <div class="row" id="app1"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">*实景图片(请上传不超过五张图片): </label> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(objectType==1){ |
| | | <#input style="width: 300px" id="ids" name="*添加闸机:" placeholder="请输入闸机ID" type="text"/> |
| | | @} |
| | | @if(objectType==1){ |
| | | <div class="form-group" style=" margin-left: 17%;" > |
| | | <label class="col-sm-1 control-label">场地说明:</label> |
| | | <div class="col-sm-5"> |
| | | <textarea type="text/plain" id="editor" style="height: 300px;width: 800px;"></textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | @} |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5" > |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSite.addSubmit()"/> |
| | |
| | | } |
| | | |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | |
| | | }); |
| | | ajax.set(this.tCarInfoData); |
| | | ajax.set("provinceCode",pCode); |
| | |
| | | left join t_operator t4 on t1.operatorId = t4.id |
| | | <where> |
| | | <if test="query.objectType == 2"> |
| | | and t1.cityManagerId = #{query.objectId} |
| | | and t1.operatorId = #{query.objectId} |
| | | </if> |
| | | <if test="query.objectType == 3"> |
| | | and t2.id = #{query.objectId} |
| | |
| | | select id, name from t_store where state = 1 and cityCode = #{cityCode} |
| | | </select> |
| | | <select id="getStoreByCityManagerId" resultType="com.dsh.other.entity.Store"> |
| | | select * from t_store where cityManagerId = #{id} |
| | | select * from t_store where operatorId = #{id} |
| | | </select> |
| | | <select id="getStoreByStoreStaffId" resultType="com.dsh.other.entity.Store"> |
| | | select * from t_store where id = #{id} |