| | |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.service.ITCompanyCityService; |
| | | import com.stylefeng.guns.modular.system.service.ITRegionService; |
| | | import com.stylefeng.guns.modular.system.service.IUserService; |
| | | import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.service.ITCompanyService; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | @Autowired |
| | | private ITTaxiCardService cardService; |
| | | |
| | | @Autowired |
| | | private ITCompanyCityService tCompanyCityService; |
| | |
| | | return list; |
| | | } |
| | | |
| | | |
| | | |
| | | //// 移除经营区域时校验 |
| | | @RequestMapping(value = "/searchArea") |
| | | @ResponseBody |
| | | public Object searchArea(Integer companyId, Integer id) { |
| | | List<TTaxiCard> list = cardService.selectList(new EntityWrapper<TTaxiCard>().eq("companyId",companyId)); |
| | | for (TTaxiCard tTaxiCard : list) { |
| | | if (ToolUtil.isNotEmpty(tTaxiCard.getCompanyCityId())){ |
| | | String[] arr = tTaxiCard.getCompanyCityId().split(";"); |
| | | for (String s : arr) { |
| | | if (s.equals(id.toString())){ |
| | | return "该区域正被打车卡使用,不允许移除"; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取分公司管理列表 |
| | | */ |
| | |
| | | //添加经营区域 |
| | | public void addSocpe(String subArr,Integer id){ |
| | | JSONArray jsonArray = JSON.parseArray(subArr); |
| | | |
| | | |
| | | List<Integer> integers = new ArrayList<>(); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | integers.add(jsonObject.getInteger("recordId")); |
| | | } |
| | | |
| | | tCompanyCityService.delete(new EntityWrapper<TCompanyCity>().eq("companyId", id).notIn("id",integers)); |
| | | |
| | | |
| | | tCompanyCityService.delete(new EntityWrapper<TCompanyCity>().eq("companyId", id)); |
| | | int size = jsonArray.size(); |
| | | for (int i = 0; i < size; i++){ |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |