叫料pda功能修改

master
zpl 3 years ago
parent 588d94f13b
commit 220e27039e

@ -7,6 +7,8 @@ import com.foreverwin.mesnac.common.dto.SfcDispatchDto;
import com.foreverwin.mesnac.common.enums.HandleEnum;
import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.dispatch.dto.IssueItemDto;
import com.foreverwin.mesnac.meapi.mapper.NwaUserMapper;
import com.foreverwin.mesnac.meapi.mapper.UserGroupMapper;
import com.foreverwin.mesnac.meapi.model.NwaUser;
import com.foreverwin.mesnac.meapi.service.NwaUserService;
import com.foreverwin.mesnac.meapi.service.UserGroupService;
@ -50,6 +52,8 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
private CallItemService callItemService;
@Autowired
private NwaUserService nwaUserService;
@Autowired
private UserGroupMapper userGroupMapper;
@Override
public void sfcDispatchCallItem(String site, String user, List<SfcDispatchDto> sfcDispatchList) {
@ -150,12 +154,13 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
public List<CallItem> findCallItemListPda(CallItem callItem) {
String site = CommonMethods.getSite();
String user = CommonMethods.getUser();
NwaUser byId = nwaUserService.getById(HandleEnum.USER.getHandle(site, user));
String language = LocaleContextHolder.getLocale().getLanguage();
callItem.setCallType(Constants.CALL_TYPE_MATERIAL);
List<NwaUser> nwaUsers = nwaUserService.checkUserGroup(site, "CJ_ZR,ADMINISTRATORS");
if (nwaUsers.contains(byId)){
return callItemMapper.findCallItemListPda(site,language,null,callItem);
for (NwaUser nwaUser:nwaUsers) {
if (user.equals(nwaUser.getUserName())){
return callItemMapper.findCallItemListPda(site,language,null,callItem);
}
}
return callItemMapper.findCallItemListPda(site,language,user,callItem);
}
@ -183,7 +188,6 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i
List<CallItem> callItemList = (List<CallItem>) map.get("callItemList");
String parse = JSON.toJSONString(callItemList);
List<CallItem> callItems = JSONObject.parseArray(parse, CallItem.class);
CallItem callItem1 = callItems.get(0);
LocalDateTime dateTime = LocalDateTime.now();
for (CallItem callItem : callItems) {
callItemMapper.updateCallItemStatusByCallItem(site,status, user, dateTime, callItem);

Loading…
Cancel
Save