UserNewWageServiceImpl.java 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  1. package cn.com.lzt.userwage.service.impl;
  2. import java.io.Serializable;
  3. import java.math.BigDecimal;
  4. import java.util.ArrayList;
  5. import java.util.HashMap;
  6. import java.util.List;
  7. import java.util.Map;
  8. import java.util.UUID;
  9. import org.apache.commons.collections.CollectionUtils;
  10. import org.apache.commons.lang3.StringUtils;
  11. import org.jeecgframework.core.common.model.json.AjaxJson;
  12. import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
  13. import org.jeecgframework.core.constant.Globals;
  14. import org.jeecgframework.core.util.ApplicationContextUtil;
  15. import org.jeecgframework.core.util.JeecgDataAutorUtils;
  16. import org.jeecgframework.core.util.MyBeanUtils;
  17. import org.jeecgframework.core.util.MyClassLoader;
  18. import org.jeecgframework.core.util.StringUtil;
  19. import org.jeecgframework.minidao.pojo.MiniDaoPage;
  20. import org.jeecgframework.web.cgform.enhance.CgformEnhanceJavaInter;
  21. import org.jeecgframework.web.system.pojo.base.TSDepart;
  22. import org.jeecgframework.web.system.pojo.base.TSUserOrg;
  23. import org.jeecgframework.web.system.service.SystemService;
  24. import org.springframework.beans.factory.annotation.Autowired;
  25. import org.springframework.stereotype.Service;
  26. import org.springframework.transaction.annotation.Transactional;
  27. import cn.com.lzt.arrangeduty.dto.ProjectDepartDto;
  28. import cn.com.lzt.userwage.dao.UserNewWageMinidaoDao;
  29. import cn.com.lzt.userwage.dto.UserNewWageDto;
  30. import cn.com.lzt.userwage.dto.UserWageViewDto;
  31. import cn.com.lzt.userwage.entity.UserNewWageEntity;
  32. import cn.com.lzt.userwage.service.UserNewWageServiceI;
  33. @Service("userNewWageService")
  34. @Transactional
  35. public class UserNewWageServiceImpl extends CommonServiceImpl implements UserNewWageServiceI {
  36. @Autowired
  37. UserNewWageMinidaoDao userWageMinidaoDao;
  38. @Autowired
  39. SystemService systemService;
  40. public void delete(UserNewWageEntity entity) throws Exception{
  41. super.delete(entity);
  42. //执行删除操作增强业务
  43. this.doDelBus(entity);
  44. }
  45. public Serializable save(UserNewWageEntity entity) throws Exception{
  46. Serializable t = super.save(entity);
  47. //执行新增操作增强业务
  48. this.doAddBus(entity);
  49. return t;
  50. }
  51. public void saveOrUpdate(UserNewWageEntity entity) throws Exception{
  52. super.saveOrUpdate(entity);
  53. //执行更新操作增强业务
  54. this.doUpdateBus(entity);
  55. }
  56. /**
  57. * 新增操作增强业务
  58. * @param t
  59. * @return
  60. */
  61. private void doAddBus(UserNewWageEntity t) throws Exception{
  62. //-----------------sql增强 start----------------------------
  63. //-----------------sql增强 end------------------------------
  64. //-----------------java增强 start---------------------------
  65. //-----------------java增强 end-----------------------------
  66. }
  67. /**
  68. * 更新操作增强业务
  69. * @param t
  70. * @return
  71. */
  72. private void doUpdateBus(UserNewWageEntity t) throws Exception{
  73. //-----------------sql增强 start----------------------------
  74. //-----------------sql增强 end------------------------------
  75. //-----------------java增强 start---------------------------
  76. //-----------------java增强 end-----------------------------
  77. }
  78. /**
  79. * 删除操作增强业务
  80. * @param id
  81. * @return
  82. */
  83. private void doDelBus(UserNewWageEntity t) throws Exception{
  84. //-----------------sql增强 start----------------------------
  85. //-----------------sql增强 end------------------------------
  86. //-----------------java增强 start---------------------------
  87. //-----------------java增强 end-----------------------------
  88. }
  89. private Map<String,Object> populationMap(UserNewWageEntity t){
  90. Map<String,Object> map = new HashMap<String,Object>();
  91. map.put("id", t.getId());
  92. map.put("userid", t.getUserid());
  93. map.put("belong_unitid", t.getBelongUnitid());
  94. map.put("dutiesid", t.getDutiesid());
  95. map.put("monthly", t.getMonthly());
  96. map.put("basic_wage", t.getBasicWage());
  97. map.put("duties_allowance", t.getDutiesAllowance());
  98. map.put("certificate_subsidy", t.getCertificateSubsidy());
  99. map.put("traffic_subsidy", t.getTrafficSubsidy());
  100. map.put("megathermal_subsidy", t.getMegathermalSubsidy());
  101. map.put("only_child_cost", t.getOnlyChildCost());
  102. // map.put("other_subsidy", t.getOtherSubsidy());
  103. map.put("bonus", t.getBonus());
  104. // map.put("project_performance", t.getProjectPerformance());
  105. map.put("meals_subsidy_day", t.getMealsSubsidyDay());
  106. map.put("meals_subsidy_night", t.getMealsSubsidyNight());
  107. map.put("meals_subsidy", t.getMealsSubsidy());
  108. map.put("overtimepay_timeout", t.getOvertimepayTimeout());
  109. map.put("overtimepay_fixed", t.getOvertimepayFixed());
  110. map.put("duty", t.getDuty());
  111. map.put("special_overtime", t.getSpecialOvertime());
  112. map.put("sick_leave_debit", t.getSickLeaveDebit());
  113. map.put("thing_leave_debit", t.getThingLeaveDebit());
  114. map.put("absence_debit", t.getAbsenceDebit());
  115. map.put("payment_subsidy", t.getPaymentSubsidy());
  116. map.put("social_security_debit", t.getSocialSecurityDebit());
  117. map.put("provident_fund_debit", t.getProvidentFundDebit());
  118. map.put("pre_tax_mone", t.getPreTaxMone());
  119. map.put("other_debit", t.getOtherDebit());
  120. map.put("daikou_debit", t.getDaikouDebit());
  121. map.put("reissue",t.getReissue());
  122. map.put("tax_money", t.getTaxMoney());
  123. map.put("actual_money", t.getActualMoney());
  124. map.put("status", t.getStatus());
  125. map.put("remark", t.getRemark());
  126. return map;
  127. }
  128. /**
  129. * 替换sql中的变量
  130. * @param sql
  131. * @param t
  132. * @return
  133. */
  134. public String replaceVal(String sql,UserNewWageEntity t){
  135. sql = sql.replace("#{id}",String.valueOf(t.getId()));
  136. sql = sql.replace("#{userid}",String.valueOf(t.getUserid()));
  137. sql = sql.replace("#{belong_unitid}",String.valueOf(t.getBelongUnitid()));
  138. sql = sql.replace("#{dutiesid}",String.valueOf(t.getDutiesid()));
  139. sql = sql.replace("#{monthly}",String.valueOf(t.getMonthly()));
  140. sql = sql.replace("#{basic_wage}",String.valueOf(t.getBasicWage()));
  141. sql = sql.replace("#{duties_allowance}",String.valueOf(t.getDutiesAllowance()));
  142. sql = sql.replace("#{certificate_subsidy}",String.valueOf(t.getCertificateSubsidy()));
  143. sql = sql.replace("#{traffic_subsidy}",String.valueOf(t.getTrafficSubsidy()));
  144. sql = sql.replace("#{megathermal_subsidy}",String.valueOf(t.getMegathermalSubsidy()));
  145. sql = sql.replace("#{only_child_cost}",String.valueOf(t.getOnlyChildCost()));
  146. // sql = sql.replace("#{other_subsidy}",String.valueOf(t.getOtherSubsidy()));
  147. sql = sql.replace("#{bonus}",String.valueOf(t.getBonus()));
  148. // sql = sql.replace("#{project_performance}",String.valueOf(t.getProjectPerformance()));
  149. sql = sql.replace("#{meals_subsidy_day}",String.valueOf(t.getMealsSubsidyDay()));
  150. sql = sql.replace("#{meals_subsidy_night}",String.valueOf(t.getMealsSubsidyNight()));
  151. sql = sql.replace("#{meals_subsidy}",String.valueOf(t.getMealsSubsidy()));
  152. sql = sql.replace("#{overtimepay_timeout}",String.valueOf(t.getOvertimepayTimeout()));
  153. sql = sql.replace("#{overtimepay_fixed}",String.valueOf(t.getOvertimepayFixed()));
  154. sql = sql.replace("#{duty}",String.valueOf(t.getDuty()));
  155. sql = sql.replace("#{special_overtime}",String.valueOf(t.getSpecialOvertime()));
  156. sql = sql.replace("#{sick_leave_debit}",String.valueOf(t.getSickLeaveDebit()));
  157. sql = sql.replace("#{thing_leave_debit}",String.valueOf(t.getThingLeaveDebit()));
  158. sql = sql.replace("#{absence_debit}",String.valueOf(t.getAbsenceDebit()));
  159. sql = sql.replace("#{payment_subsidy}",String.valueOf(t.getPaymentSubsidy()));
  160. sql = sql.replace("#{social_security_debit}",String.valueOf(t.getSocialSecurityDebit()));
  161. sql = sql.replace("#{provident_fund_debit}",String.valueOf(t.getProvidentFundDebit()));
  162. sql = sql.replace("#{pre_tax_mone}",String.valueOf(t.getPreTaxMone()));
  163. sql = sql.replace("#{other_debit}",String.valueOf(t.getOtherDebit()));
  164. sql = sql.replace("#{daikou_debit}",String.valueOf(t.getDaikouDebit()));
  165. sql = sql.replace("#{tax_money}",String.valueOf(t.getTaxMoney()));
  166. sql = sql.replace("#{actual_money}",String.valueOf(t.getActualMoney()));
  167. sql = sql.replace("#{reissue}",String.valueOf(t.getReissue()));
  168. sql = sql.replace("#{status}",String.valueOf(t.getStatus()));
  169. sql = sql.replace("#{remark}",String.valueOf(t.getRemark()));
  170. sql = sql.replace("#{UUID}",UUID.randomUUID().toString());
  171. return sql;
  172. }
  173. /**
  174. * 执行JAVA增强
  175. */
  176. private void executeJavaExtend(String cgJavaType,String cgJavaValue,Map<String,Object> data) throws Exception {
  177. if(StringUtil.isNotEmpty(cgJavaValue)){
  178. Object obj = null;
  179. try {
  180. if("class".equals(cgJavaType)){
  181. //因新增时已经校验了实例化是否可以成功,所以这块就不需要再做一次判断
  182. obj = MyClassLoader.getClassByScn(cgJavaValue).newInstance();
  183. }else if("spring".equals(cgJavaType)){
  184. obj = ApplicationContextUtil.getContext().getBean(cgJavaValue);
  185. }
  186. if(obj instanceof CgformEnhanceJavaInter){
  187. CgformEnhanceJavaInter javaInter = (CgformEnhanceJavaInter) obj;
  188. javaInter.execute("t_bus_user_wage",data);
  189. }
  190. } catch (Exception e) {
  191. e.printStackTrace();
  192. throw new Exception("执行JAVA增强出现异常!");
  193. }
  194. }
  195. }
  196. @Override
  197. public List<UserNewWageDto> getAllEntities(UserNewWageDto userWageDto,List<String> uidList,String moth,String authSql) {
  198. return userWageMinidaoDao.getAllEntities(userWageDto,uidList,moth,authSql);
  199. }
  200. @Override
  201. public MiniDaoPage<UserNewWageDto> getPagedEntities(UserNewWageDto userWageDto,List<String> uidList,String moth,int page, int rows, String authSql) {
  202. return userWageMinidaoDao.getPagedEntities(userWageDto,uidList,moth,page, rows,authSql);
  203. }
  204. @Override
  205. public List<UserNewWageDto> getAll(UserNewWageDto userWageDto,List<String> uidList,String moth,String authSql) {
  206. return userWageMinidaoDao.getAll(userWageDto,uidList,moth,authSql);
  207. }
  208. @Override
  209. public MiniDaoPage<UserWageViewDto> getViewEntities(UserWageViewDto userWageViewDto,List<String> uidList,int page, int rows,String authSql) {
  210. return userWageMinidaoDao.getViewEntities(userWageViewDto,uidList, page, rows, authSql);
  211. }
  212. @Override
  213. public Map<String, Integer> getMoneySUM(UserNewWageDto userWageDto,List<String> uidList,String moth) {
  214. return userWageMinidaoDao.getMoneySUM(userWageDto,uidList,moth);
  215. }
  216. @Override
  217. public BigDecimal getMoney(UserNewWageEntity userWageDto) {
  218. // if("ff8080816275ac02016283c8b3a30025".equals(userWageDto.getUserid())) {
  219. // System.out.println("ff8080816275ac02016283c8b3a30025");
  220. // }
  221. BigDecimal big = new BigDecimal(userWageDto.getBasicWage().toString());
  222. if(userWageDto.getDutiesAllowance() != null){
  223. big = big.add(userWageDto.getDutiesAllowance());
  224. }
  225. if(userWageDto.getCertificateSubsidy() != null){
  226. big = big.add(userWageDto.getCertificateSubsidy());
  227. }
  228. if(userWageDto.getTrafficSubsidy()!= null){
  229. big = big.add(userWageDto.getTrafficSubsidy());
  230. }
  231. if(userWageDto.getMegathermalSubsidy()!= null){
  232. big = big.add(userWageDto.getMegathermalSubsidy());
  233. }
  234. if(userWageDto.getOnlyChildCost()!= null){
  235. big = big.add(userWageDto.getOnlyChildCost());
  236. }
  237. // if(userWageDto.getOtherSubsidy()!= null){
  238. // big = big.add(userWageDto.getOtherSubsidy());
  239. // }
  240. if(userWageDto.getDuty()!= null){
  241. big = big.add(userWageDto.getDuty());
  242. }
  243. // if(userWageDto.getProjectPerformance()!= null){
  244. // big = big.add(userWageDto.getProjectPerformance());
  245. // }
  246. if(userWageDto.getMealsSubsidyDay()!= null){
  247. big = big.add(userWageDto.getMealsSubsidyDay());
  248. }
  249. if(userWageDto.getMealsSubsidyNight()!= null){
  250. big = big.add(userWageDto.getMealsSubsidyNight());
  251. }
  252. // // 奖金和项目绩效计入应发 zy 20180425
  253. if(userWageDto.getBonus()!= null){
  254. big = big.add(userWageDto.getBonus());
  255. }
  256. // if(userWageDto.getProjectPerformance()!= null){
  257. // big = big.add(userWageDto.getProjectPerformance());
  258. // }
  259. if(userWageDto.getMealsSubsidy()!= null){
  260. big = big.add(userWageDto.getMealsSubsidy());
  261. }
  262. if(userWageDto.getOvertimepayTimeout()!= null){
  263. big = big.add(userWageDto.getOvertimepayTimeout());
  264. }
  265. if(userWageDto.getOvertimepayFixed()!= null){
  266. big = big.add(userWageDto.getOvertimepayFixed());
  267. }
  268. /* if(userWageDto.getDuty()!= null){
  269. big = big.add(userWageDto.getDuty());
  270. }*/
  271. if(userWageDto.getSpecialOvertime()!= null){
  272. big = big.add(userWageDto.getSpecialOvertime());
  273. }
  274. if(userWageDto.getSickLeaveDebit()!= null){
  275. big = big.subtract(userWageDto.getSickLeaveDebit());
  276. }
  277. if(userWageDto.getThingLeaveDebit()!= null){
  278. big = big.subtract(userWageDto.getThingLeaveDebit());
  279. }
  280. if(userWageDto.getAbsenceDebit()!= null){
  281. big = big.subtract(userWageDto.getAbsenceDebit());
  282. }
  283. /*if(userWageDto.getSocialSecurityDebit()!= null){
  284. big = big.subtract(userWageDto.getSocialSecurityDebit());
  285. }
  286. if(userWageDto.getProvidentFundDebit()!= null){
  287. big = big.subtract(userWageDto.getProvidentFundDebit());
  288. }*/
  289. if(userWageDto.getOtherDebit()!= null){
  290. big = big.subtract(userWageDto.getOtherDebit());
  291. }
  292. if(userWageDto.getDaikouDebit()!= null){
  293. big = big.subtract(userWageDto.getDaikouDebit());
  294. }
  295. if(userWageDto.getReissue()!= null){
  296. big = big.add(userWageDto.getReissue());
  297. }
  298. if(userWageDto.getPaymentSubsidy()!= null){
  299. big = big.add(userWageDto.getPaymentSubsidy());
  300. }
  301. return big;
  302. }
  303. /**
  304. * 保存新增/更新的行数据
  305. */
  306. @Override
  307. public AjaxJson addOrEdit(List<UserNewWageEntity> entitys) throws Exception {
  308. String message = null;
  309. AjaxJson j = new AjaxJson();
  310. if(CollectionUtils.isNotEmpty(entitys)){
  311. for(UserNewWageEntity jeecgDemo:entitys){
  312. if (StringUtil.isNotEmpty(jeecgDemo.getId())) {
  313. UserNewWageEntity t =systemService.get(UserNewWageEntity.class, jeecgDemo.getId());
  314. try {
  315. message = "员工工资核算: " + jeecgDemo.getUserid() + "被更新成功";
  316. MyBeanUtils.copyBeanNotNull2Bean(jeecgDemo, t);
  317. // t.setPreTaxMone(this.getMoney(t));
  318. t.recalculatePreTaxMoney();
  319. t.recalculateActualMoney();
  320. t.recalculateComCost();
  321. // if(StringUtils.isNotEmpty(t.getPreTaxMone().toString())){
  322. // t.setActualMoney(t.getPreTaxMone().subtract(t.getTaxMoney()));
  323. // }else{
  324. // t.setActualMoney(t.getPreTaxMone());
  325. // }
  326. //
  327. // if(t.getSocialSecurityDebit()!= null && t.getSocialSecurityDebit().intValue() > 0){
  328. // t.setActualMoney(t.getActualMoney().subtract(t.getSocialSecurityDebit()));
  329. // }
  330. // if(t.getProvidentFundDebit()!= null && t.getProvidentFundDebit().intValue() > 0){
  331. // t.setActualMoney(t.getActualMoney().subtract(t.getProvidentFundDebit()));
  332. // }
  333. //
  334. this.saveOrUpdate(t);
  335. systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
  336. } catch (Exception e) {
  337. e.printStackTrace();
  338. }
  339. } else {
  340. try {
  341. message = "JeecgDemo例子: " + jeecgDemo.getUserid() + "被添加成功";
  342. //jeecgDemo.setStatus("0");
  343. jeecgDemo.recalculatePreTaxMoney();
  344. jeecgDemo.recalculateActualMoney();
  345. jeecgDemo.recalculateComCost();
  346. this.save(jeecgDemo);
  347. systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
  348. } catch (Exception e) {
  349. e.printStackTrace();
  350. }
  351. }
  352. }
  353. }
  354. return j;
  355. }
  356. @Override
  357. public Map<String, Integer> getMoneyViewSUM(UserWageViewDto userWageiewDto,List<String> uidList) {
  358. return userWageMinidaoDao.getMoneyViewSUM(userWageiewDto,uidList);
  359. }
  360. /**
  361. * 工资进行确认和上报
  362. */
  363. @Override
  364. public AjaxJson updateStatus(List<String> idList,boolean status) {
  365. String message = null;
  366. AjaxJson j = new AjaxJson();
  367. if(CollectionUtils.isNotEmpty(idList)){
  368. for (String id : idList) {
  369. UserNewWageEntity t =systemService.get(UserNewWageEntity.class, id);
  370. if(t != null){
  371. j.setSuccess(true);
  372. if(status){
  373. message = t.getMonthly()+",员工id为:"+t.getUserid()+"的工资进行了上报";
  374. t.setStatus("1");
  375. }else{
  376. message = t.getMonthly()+",员工id为:"+t.getUserid()+"的工资进行了确认";
  377. t.setStatus("2");
  378. }
  379. systemService.saveOrUpdate(t);
  380. systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
  381. }
  382. }
  383. }
  384. return j;
  385. }
  386. @Override
  387. public List<UserNewWageEntity> getByuserid(String userid, String monthly) {
  388. return userWageMinidaoDao.getByuserid(userid, monthly);
  389. }
  390. @Override
  391. public List<ProjectDepartDto> getProjectDepartAll(ProjectDepartDto projectDepartDto,String userid) {
  392. List<ProjectDepartDto> projectDepartDtoList = new ArrayList<ProjectDepartDto>();
  393. if(StringUtils.isNotEmpty(userid)){
  394. List<TSUserOrg> ts = this.getSession().createQuery("from TSUserOrg where tsUser.id = :userId and status = 0").setParameter("userId",userid).list();
  395. if(!ts.isEmpty()){
  396. boolean temp = false;
  397. for (TSUserOrg tsUserOrg : ts) {
  398. TSDepart tss = get(TSDepart.class, tsUserOrg.getTsDepart().getId());
  399. if(tss != null && tss.getTSPDepart() != null){
  400. if("1".equals(tss.getTSPDepart().getOrgType())&&"2".equals(tss.getOrgType()) || "4".equals(tss.getOrgType())){
  401. temp = true;
  402. break;
  403. }
  404. }else{
  405. if("1".equals(tss.getOrgType())){
  406. temp = true;
  407. break;
  408. }
  409. }
  410. }
  411. if(temp){
  412. List<TSDepart> tsDepartsList = this.getSession().createQuery("from TSDepart where parentdepartid is null").list();
  413. List<String> idList = null;
  414. if(!tsDepartsList.isEmpty()){
  415. idList=new ArrayList<String>();
  416. for (TSDepart idTSDepart : tsDepartsList) {
  417. List<TSDepart> dt = this.getSession().createQuery("from TSDepart where parentdepartid = :parentdepartid and orgType = 2").setParameter("parentdepartid", idTSDepart.getId()).list();
  418. if(!dt.isEmpty()){
  419. for (TSDepart tsDepart : dt) {
  420. idList.add(tsDepart.getId());
  421. }
  422. }
  423. }
  424. projectDepartDto.getDepartIdList().addAll(idList);
  425. }
  426. List<String> orgTypeList=new ArrayList<String>();
  427. orgTypeList.add(Globals.org_type_3);
  428. orgTypeList.add(Globals.org_type_5);
  429. projectDepartDto.getOrgTypeList().addAll(orgTypeList);
  430. String authSql = JeecgDataAutorUtils.loadDataSearchConditonSQLString();
  431. projectDepartDtoList=userWageMinidaoDao.getProjectDepartAll(projectDepartDto, authSql);
  432. }else{
  433. List<String> idList=new ArrayList<String>();
  434. for (TSUserOrg tsUserOrg : ts) {
  435. TSDepart tss = get(TSDepart.class, tsUserOrg.getTsDepart().getId());
  436. idList.add(selectById(tss.getId()));
  437. }
  438. projectDepartDto.getDepartIdList().addAll(idList);
  439. String authSql = JeecgDataAutorUtils.loadDataSearchConditonSQLString();
  440. projectDepartDtoList=userWageMinidaoDao.getProjectDepartAll(projectDepartDto, authSql);
  441. }
  442. }
  443. }
  444. return projectDepartDtoList;
  445. }
  446. private String selectById(String id){
  447. String temp = "";
  448. TSDepart tsDepart = systemService.getEntity(TSDepart.class,id);
  449. if("3".equals(tsDepart.getOrgType()) || "5".equals(tsDepart.getOrgType())){
  450. temp = tsDepart.getId();
  451. }else{
  452. if(tsDepart.getTSPDepart() != null){
  453. selectById(tsDepart.getTSPDepart().getId());
  454. }
  455. }
  456. return temp;
  457. }
  458. /* (non-Javadoc)
  459. * @see cn.com.lzt.userwage.service.UserNewWageServiceI#getManagerWagePagedEntities(cn.com.lzt.userwage.dto.UserNewWageDto, java.util.List, java.lang.String, int, int, java.lang.String)
  460. */
  461. @Override
  462. public MiniDaoPage<UserNewWageDto> getManagerWagePagedEntities(UserNewWageDto userWageDto, List<String> uidList, String moth, int page, int rows, String authSql) {
  463. return userWageMinidaoDao.getManagerWagePagedEntities(userWageDto,uidList,moth,page, rows,authSql);
  464. }
  465. /* (non-Javadoc)
  466. * @see cn.com.lzt.userwage.service.UserNewWageServiceI#getAllManagerNewWageEntities(cn.com.lzt.userwage.dto.UserNewWageDto, java.util.List, java.lang.String, java.lang.String)
  467. */
  468. @Override
  469. public List<UserNewWageDto> getAllManagerNewWageEntities(UserNewWageDto userWageDto, List<String> uidList, String moth, String authSql) {
  470. return userWageMinidaoDao.getAllManagerNewWageEntities(userWageDto, uidList, moth, authSql);
  471. }
  472. }