| | |
| | | import com.matrix.system.hive.bean.SysWorkBeatuistaff; |
| | | import com.matrix.system.hive.dao.SysBeauticianStateDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.plugin.util.DateUtils; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.service.SysWorkBeatuistaffService; |
| | | import com.matrix.system.hive.service.SysWorktimeService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | @RequestMapping(value = "/getKanban") |
| | | public @ResponseBody |
| | | AjaxResult showCwzyList(String timeStr) { |
| | | Long shopId = getMe().getShopId(); |
| | | return getCwzyList(timeStr,shopId); |
| | | } |
| | | |
| | | public AjaxResult getCwzyList(String timeStr,Long shopId){ |
| | | |
| | | if (timeStr == null || timeStr.equals("")) { |
| | | timeStr = DateUtils.dateToString(new Date(), "yyyy-MM-dd"); |
| | | timeStr = DateUtil.dateToString(new Date(), "yyyy-MM-dd"); |
| | | } |
| | | // 查询上班下班的最大时间段 |
| | | Date currentDate = DateUtils.stringToDate(timeStr, DateUtils.DATE_FORMAT_DD); |
| | | Date currentDate = DateUtil.stringToDate(timeStr, DateUtil.DATE_FORMAT_DD); |
| | | // 把日期调整为当前查询日期 |
| | | Long shopId = 16L; //getMe().getShopId(); |
| | | |
| | | |
| | | Date maxTime = worktimeService.findMaxTime(shopId); |
| | | //如果没有获取到门店的排班时间,无法查询占用情况 |
| | |
| | | |
| | | //计算表头的时间间隔 |
| | | buildTimeSpan(startTime, maxTime, result); |
| | | |
| | | return result; |
| | | return result; |
| | | } |
| | | |
| | | private void buildTimeSpan(Date startTime, Date maxTime, AjaxResult result) { |
| | |
| | | } |
| | | } |
| | | |
| | | class OccupancySPan { |
| | | public class OccupancySPan { |
| | | /** |
| | | * 休息 |
| | | */ |
| | |
| | | */ |
| | | static final int WORKTYPE_OCCUPANCY = 3; |
| | | |
| | | @ApiModelProperty(value = "色块长度") |
| | | Long spanLength; |
| | | @ApiModelProperty(value = "占用状态,1休息,2 上班,3 占用") |
| | | int workType; |
| | | @ApiModelProperty(value = "床位名称") |
| | | String bedName; |
| | | @ApiModelProperty(value = "项目名称") |
| | | String projName; |
| | | @ApiModelProperty(value = "会员名称") |
| | | String vipName; |
| | | @ApiModelProperty(value = "服务单id") |
| | | Long serviceId; |
| | | @ApiModelProperty(value = "服务单状态") |
| | | String serviceState; |
| | | |
| | | |