| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- package com.xcgl.weixin.dao;
- import java.util.List;
- import java.util.Map;
- import org.jeecgframework.minidao.annotation.MiniDao;
- import org.jeecgframework.minidao.annotation.Param;
- import org.jeecgframework.minidao.annotation.Sql;
- import org.jeecgframework.web.system.pojo.base.TSUser;
- import org.springframework.stereotype.Repository;
- import com.xcgl.projecttask.entity.ProjecttaskEntity;
- import com.xcgl.taskresult.entity.TaskResultEntity;
- import com.xcgl.weixin.entity.AuthorityDto;
- import com.xcgl.weixin.entity.SensorLiveDto;
- import com.xcgl.weixin.entity.UserAccessoryDto;
- import com.xcgl.weixin.entity.UserDto;
- import cn.com.lzt.warehouse.entity.WarehouseEntity;
- @Repository
- @MiniDao
- public interface WXDao {
-
- public UserDto getUser(@Param("openid") String openid);
-
- public List<AuthorityDto> getAuthByOpenid(@Param("openid") String openid);
-
- public List<ProjecttaskEntity> getTaskListAll(@Param("openid") String openid,@Param("qrydate") String qrydate,@Param("projectid") String projectid,
- @Param("taskid") String taskid);
-
- public List<ProjecttaskEntity> getTaskListDone(@Param("openid") String openid,@Param("qrydate") String qrydate,@Param("projectid") String projectid,
- @Param("taskid") String taskid);
-
- //outdata 逾期
- public List<ProjecttaskEntity> getTaskListNotDone(@Param("openid") String openid,@Param("qrydate") String qrydate,@Param("projectid") String projectid,
- @Param("taskid") String taskid,@Param("outDate") String outDate);
- public List<SensorLiveDto> getSensorLiveData(@Param("qrydate") String qrydate,@Param("projectid") String projectid);
-
- public List<UserDto> getProjectUsers(@Param("projectid") String projectid);
-
- public List<UserAccessoryDto> getUserAccessory(@Param("userid") String userid);
-
- public List<Map<String,Object>> getTodayWorkStati(@Param("projectid") String projectid,@Param("qrydate") String qrydate);
-
- public List<Map<String,Object>> getWeekWorkStati(@Param("projectid") String projectid,@Param("today") String today,@Param("laseweekday") String laseweekday);
-
- public List<Map<String,Object>> getDeviceStatusSumData(@Param("projectid") String projectid,@Param("qrydate") String qrydate);
-
- public List<Map<String,Object>> getTodayWork4PushMsg(@Param("today") String today);
-
- public TaskResultEntity getTaskResult(@Param("openid") String openid, @Param("taskid") String taskid);
-
- public List<Map<String,String>> getTaskStati(@Param("openid") String openid, @Param("projectid") String projectid
- , @Param("today") String today
- , @Param("weekstart") String weekstart
- , @Param("weekend") String weekend
- , @Param("monthstart") String monthstart
- , @Param("monthend") String monthend);
- @Sql("select warehouse_name as warehouseName from t_b_warehouse where id not in(select warehouse_id from t_b_orders where order_months = :yearmonth)")
- public List<WarehouseEntity> getNotSubmitOnhandReportWarehouseList(@Param("yearmonth") String yearmonth);
-
- /**
- * 按人员角色 查询用户,只查询有openid 的人员
- * */
- @Sql("select id,openid from t_s_user where id in (select roleuser.userid from t_s_role_user roleuser left join t_s_role role on roleuser.roleid = role.id where role.rolecode = :rolecode) and openid is not null")
- public List<Map<String,Object>> getXZBFJLUsers(@Param("rolecode") String rolecode);
-
- /**
- * 按人员角色 查询用户
- * */
- @Sql("select user.id as id ,openid,bu.realname as realname,user.usernum as usernum,bu.username as username from t_s_user user "
- + "left join t_s_base_user bu on bu.id = user.id"
- + " where user.id in (select roleuser.userid from t_s_role_user roleuser "
- + "left join t_s_role role on roleuser.roleid = role.id "
- + "where role.rolecode = :rolecode)")
- public List<Map<String,Object>> getUsersByRoleCode(@Param("rolecode") String rolecode);
-
- /**
- * 按人员角色 查询openid不空的用户
- * */
- @Sql("select user.id as id ,openid,bu.realname as realname,user.usernum as usernum,bu.username as username from t_s_user user "
- + "left join t_s_base_user bu on bu.id = user.id"
- + " where user.id in (select roleuser.userid from t_s_role_user roleuser "
- + "left join t_s_role role on roleuser.roleid = role.id "
- + "where role.rolecode = :rolecode ) and user.openid is not null")
- public List<Map<String,Object>> getUsersByRoleCodeOpenidNotNull(@Param("rolecode") String rolecode);
-
- /**
- * 查询工资策略未配置或配置错误人员
- * */
- @Sql("select distinct CONCAT(realname,'(',glcname,')' ) as realName from ( "
- + "select bu.realname,dept.glcname from t_bus_user_personnel per "
- + "left join t_s_base_user bu on bu.id = per.userid "
- + "left join t_s_user_org uorg on uorg.user_id = bu.id and uorg.ifpluralism = '0' "
- + "left join t_s_depart dept on dept.id = uorg.org_id "
- + "where leave_date is null and delete_flag = '0' and not exists (select * from t_bus_user_wagestrategy uwage where uwage.userid = per.userid) "
- + "union all "
- + "select bu.realname,dept.glcname "
- + "from t_bus_user_wagestrategy uwage "
- + "left join t_s_base_user bu on bu.id = uwage.userid "
- + "left join t_s_user_org uorg on uorg.user_id = bu.id and uorg.ifpluralism = '0' "
- + "left join t_s_depart dept on dept.id = uorg.org_id "
- + "left join t_s_depart wdept on wdept.id = uwage.belong_unitid "
- + "left join t_bus_user_personnel per on per.userid = bu.id "
- + "where bu.delete_flag = '0' and uwage.belong_unitid <> uorg.org_id and leave_date is null "
- + ") temp order by glcname")
- public List<TSUser> getNoWageUserList();
- }
|