| | |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.dy.common.mw.protocol.Command; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoPr.PrControllerMapper; |
| | | import com.dy.pipIrrGlobal.daoPr.PrIntakeControllerMapper; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestClientException; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | |
| | | import static com.dy.common.mw.protocol.CommandType.innerCommand; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | * @return |
| | | */ |
| | | public Integer addController(PrController po) { |
| | | prControllerMapper.insert(po); |
| | | int rows = prControllerMapper.insert(po); |
| | | if(rows == 0) { |
| | | return 0; |
| | | } |
| | | PrIntakeController addPrIntakeController = new PrIntakeController(); |
| | | addPrIntakeController.setIntakeid(po.getIntakeId()); |
| | | addPrIntakeController.setControllerid(po.getId()); |
| | |
| | | addPrIntakeController.setOperator(po.getOperator()); |
| | | addPrIntakeController.setOperatedt(po.getOperateDt()); |
| | | addPrIntakeController.setRemarks("绑定"); |
| | | prIntakeControllerMapper.insert(addPrIntakeController); |
| | | return 1; |
| | | int rec = prIntakeControllerMapper.insert(addPrIntakeController); |
| | | if(rec == 0) { |
| | | return 0; |
| | | } |
| | | return 1 ; |
| | | } |
| | | |
| | | /** |