Pu Zhibing
2 天以前 5dacdee9b54c78372b68140e2b068d03a620eab9
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TComplaintController.java
@@ -4,26 +4,22 @@
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.core.beetl.ShiroExtUtil;
import com.stylefeng.guns.core.common.constant.factory.PageFactory;
import com.stylefeng.guns.core.shiro.ShiroKit;
import com.stylefeng.guns.core.util.SinataUtil;
import com.stylefeng.guns.modular.system.model.TProblem;
import com.stylefeng.guns.modular.system.model.TComplaint;
import com.stylefeng.guns.modular.system.model.TSystemNotice;
import com.stylefeng.guns.modular.system.service.ITComplaintService;
import com.stylefeng.guns.modular.system.service.ITSystemNoticeService;
import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.beans.factory.annotation.Autowired;
import com.stylefeng.guns.core.log.LogObjectHolder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.stylefeng.guns.modular.system.model.TComplaint;
import com.stylefeng.guns.modular.system.service.ITComplaintService;
import org.springframework.web.bind.annotation.ResponseBody;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.annotation.Resource;
import java.util.Date;
import java.util.Map;
@@ -36,23 +32,25 @@
@Controller
@RequestMapping("/tComplaint")
public class TComplaintController extends BaseController {
    private String PREFIX = "/system/tComplaint/";
    @Autowired
    private ITComplaintService tComplaintService;
    @Autowired
    private ITSystemNoticeService tSystemNoticeService;
    @Autowired
    private PushMinistryOfTransportUtil pushMinistryOfTransportUtil;
    @Resource
    private ShiroExtUtil shiroExtUtil;
    @Value("${pushMinistryOfTransport}")
    private boolean pushMinistryOfTransport;
    /**
     * 跳转到投诉列表首页
     */
@@ -116,7 +114,7 @@
            endTime = timeArray[1];
        }
        Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage();
        page.setRecords(tComplaintService.getComplaintList(page, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), beginTime, endTime, userName, userPhone, driverPhone, isHandle, null));
        page.setRecords(tComplaintService.getComplaintList(page, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), beginTime, endTime, userName, userPhone, driverPhone, isHandle, null));
        return super.packForBT(page);
    }
@@ -127,18 +125,18 @@
    @ResponseBody
    public Object immediately(@RequestParam Integer id,@RequestParam String handleResult) {
        TComplaint tComplaint = tComplaintService.selectById(id);
        if(SinataUtil.isNotEmpty(tComplaint)){
        if(SinataUtil.isNotEmpty(tComplaint)) {
            tComplaint.setHandleResult(handleResult);
            tComplaint.setHandleUserId(ShiroExtUtil.getUser().getId());
            tComplaint.setHandleUserId(shiroExtUtil.getUser().getId());
            tComplaint.setIsHandle(1);
            tComplaint.setHandleTime(new Date());
            tComplaintService.updateById(tComplaint);
            //增加系统消息
            TSystemNotice notice = new TSystemNotice();
            notice.setType(2);
            notice.setUserType(1);
            notice.setContent("投诉处理结果:【"+handleResult+"】。");
            notice.setContent("投诉处理结果:【" + handleResult + "】。");
            notice.setUserId(tComplaint.getUserId());
            notice.setInsertTime(new Date());
            notice.setRead(1);