ContractStatusController.java 1.75 KB
package com.thinkgem.jeesite.modules.eci.Controller;

import com.thinkgem.jeesite.modules.eci.dao.ElecLicenseInfoDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@ResponseBody
@RequestMapping("signed")
public class ContractStatusController {

    private static Logger logger = LoggerFactory.getLogger(ContractStatusController.class);

    @Autowired
    ElecLicenseInfoDao licenseInfoDao;

    @RequestMapping(method = RequestMethod.POST, value = "/received")
    public void received(@RequestParam("contractId") String contractId,
                         @RequestParam(value = "tenantId", required = false) String tenantId,
                         @RequestParam(value = "tenantName", required = false) String tenantName,
                         @RequestParam(value = "sn", required = false) String sn,
                         @RequestParam("status") String status,
                         @RequestParam(value = "type", required = false) String type,
                         @RequestParam(value = "contact", required = false) String contact,
                         @RequestParam(value = "operatorName", required = false) String operatorName,
                         @RequestParam(value = "operatorMobile", required = false) String operatorMobile,
                         @RequestParam(value = "operatorNumber", required = false) String operatorNumber,
                         @RequestParam(value = "receiverNumber", required = false) String receiverNumber) {

        logger.info("contractId=" + contractId, "status=" + status);
        licenseInfoDao.updateHtzt(contractId, status);
    }
}